For calibration, the log10(frequnecy_array) causes log warning messaged (due to taking the log of 0). To resolve this, and also to provide a slight speed up, this only calculates the values in the frequency mask