Median Frequency Calculation

The median frequency of a spectrum is calculated in two steps:
1) The Intensity in the signal in the whole spectrum is summed, and divided by 2
2) The frequency is selected at which the cumulative intensity (i.e. all the intensity values for frequencies lower and including the focal intensity) first exceeds the value calculated in step 1.