Skip to content

Spectrum notching

Arianna Renzini requested to merge spectrum_notching into master

As discussed in the review and further in the hackathon meeting on 22nd July 2022, we have decided to implement notching at the spectrogram level as opposed to on the spectrum level. The differences come into the weights that are calculated in the postprocessing.postprocess_Y_sigma function, which calculated the even/odd overlapping averages.

The difference between approaches - notching before or after this postprocessing calculation - arise as we are using overlapping segments, hence a correlation between frequency bins of consecutive segments exists. The difference is very small (sub-percent level), however we have decided to implement the notching before the postprocessing.postprocess_Y_sigma calculation as this allows us to use the code to perform both approaches:

A) if one provides notches to the pipeline, these are applied consistently from the start (i.e., at the spectrogram level); the data in the notches is not removed, hence when plotting the spectra the lines still exist, to avoid issues with gwpy.FrequencySeries and divisions by zero/infinity/nans, however the data within the notches is never used anywhere in the baseline. One may also plot the "notched" spectra by applying the baseline.frequency_mask at any stage of the analysis/postprocessing/checks.

B) if one doesn't provide notches to the pipeline, but wishes to apply them a posteriori, this is still supported and one may provide the notches to a complete Baseline object and re-calculate baseline.set_point_estimate_sigma with the new notch list passed in.

Merge request reports