The effect of a non-uniform on ripple-trapped neutral beam ions is investigated using both the Monte Carlo method and Fokker-Planck approach. The increase in the neutral particle flux from ripple-trapped ions observed by the CX detector at an L-H transition in the ASDEX Upgrade tokamak is reproduced in both simulations by turning on near the plasma periphery.