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:
- Files that contain both
GWTCandbilby-IMRPhenomXPHM-SpinTaylor. - Files that contain
GWTCbut do not includebilby-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_distance, inclination, right ascension (ra), and declination (dec) has been streamlined to adapt to the different posterior types.