Skip to content

Gated times in npz + gating fix for pygwb_pipe

Max Lalleman requested to merge max.lalleman/pygwb:Gated_times_in_npz into master

Fixed a small issue in pygwb_pipe related to gating and added saving of gated times in npz files, so pickles are not needed. Here is what this MR does:

  • The attribute ifo.gates is a SegmentList from gwpy that tells us the segments in the interferometer which have been gated. At the moment, this information is only saved in and can only be taken from the pickled baselines. Due to us moving away a bit from the pickled baselines and their relative to npz-files bigger memory usage, I want the gates to be saved in the npz (or other) datafiles. For me, I also think npz-files are more handy to use in the gating analysis compared to pickled baselines. We need this segment information for the gating analysis of O3/ER/O4. This will be saved in the psds_and_csds-file.
  • When no gating is applied, the code will automatically give an empty SegmentList to ifo.gates and thus the saving process will experience no issues. I am hesitant to not save anything when the ifo.gates is an empty list, because there could be no segments flagged for gating in a job and that would also be important information.

Next to that, I fixed a small issue in line 120 of pygwb_pipe which assigned the gates of ifo_1 to ifo_2. And I added support for using the shortened version of hdf5, "h5", for save_data_type.

Edited by Max Lalleman

Merge request reports