Fast folding algorithm for detection of periodic pulse trains | Synapse