Adding NaN checks to ample.
Extending EM demos to Random Scrambled Fourier