Fixed Pulse Sources cycle calculations

I forgot to limit the calculations to the cycle number.

Now it is fixed !
It only calculates until the last cycle ;)