Skip to content

Feature: Save injections from commandline

This MR adds a command line tool to read and injection file and save the found injections and other necessary properties of the injection set to a pickle file. The user specifies the vt_file, which is presumed to be in the usual format used for LVK analyses, as well as the IFAR and/or SNR thresholds (these have default values if not provided, taken from the original parser). The user also specifies the parameters to read and transform the prior into as well as the filename to save the injections (defaults to injections.pkl).

An example using the semianalytic injections would be: gwpopulation_pipe_read_injections /home/rp.o4/offline-injections/semianalytic/T2400073-v1/samples-rpo4a_v1_1ifo-1366933504-23846400.hdf -p mass_1 -p mass_ratio -p a_1 -p a_2 -p cos_tilt_1 -p cos_tilt_2 -p redshift --save_as test_inj.pkl

@colm.talbot

Note this also has a minor change to data_collection.py so the user can specify the name and location of the saved injection file. The change is written is a way that does not break the current behavior of gwpopulation_pipe_data_collection.

Edited by Jacob Golomb

Merge request reports