frequency_crossing_threshold function

Frequency of crossing light threshold