implement extract_local_maxima() function
split magnitudes in bins and compute the area by integrating each bin