function to find peaks (more detailed description in email)
This is an experimental data analysis library for zebra instrument.