Skip to content

Fix read o4 posteriors

This merge request addresses an issue with reading posterior files in O4 data, specifically handling differences in file formats. The code has been updated to correctly handle two scenarios:

  1. Files that contain both GWTC and bilby-IMRPhenomXPHM-SpinTaylor.
  2. Files that contain GWTC but do not include bilby-IMRPhenomXPHM-SpinTaylor.

The main improvement lies in dynamically selecting the appropriate posterior keys depending on the file's format. For instance, files containing bilby-IMRPhenomXPHM-SpinTaylor now use keys such as posterior, while legacy files use IMRPhenomPv2_posterior. This ensures compatibility across a range of datasets without duplicating logic or risking errors.

Additionally, the extraction of key parameters like luminosity_distanceinclinationright ascension (ra), and declination (dec) has been streamlined to adapt to the different posterior types.

Merge request reports

Loading