Numpy/Scipy modulus function
According to the doc, np.mod(x1,x2)=x1-floor(x1/x2)*x2. The problem here is that you are working with very small values, a dark domain where floating point errors (truncation...) happen quite often and results are often unpredictable...
I don't think you should spend a lot of time worrying about that.
The Numpy 'modulus' function is used in a code to check if a certain time is an integral multiple of the time-step.
But some weird behavior is seeen. 

numpy.mod(121e-12,1e-12) returns 1e-12
numpy.mod(60e-12,1e-12) returns 'a very small value' (compared to 1e-12).

If you play around numpy.mode('122-126'e-12,1e-12) it gives randomly 0 and 1e-12.
Can someone please explain why?
Thanks much