gwastro / pycbc

Core package to analyze gravitational-wave data, find signals, and study their parameters. This package was used in the first direct detection of gravitational waves (GW150914), and is used in the ongoing analysis of LIGO/Virgo data.
http://pycbc.org
GNU General Public License v3.0
314 stars 348 forks source link

Use HFile instead of h5py.File in most places #4792

Closed GarethCabournDavies closed 3 months ago

GarethCabournDavies commented 3 months ago

Use pycbc.io.hdf's HFile class rather than h5py.File directly so that we can make changes to the functionality.

For example checksumming, version information, and anything else we may want

Standard information about the request

This is a change to utilise potential future features This change touches everywhere in the code, but affects nothing

This change follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines

Contents

Not quite find-and-replace, but update everywhere which uses h5py.File to pycbc.io.HFile

Links to any issues or associated PRs

1525 #4768

Testing

Broadly, this should be checked by the CI running --help for all executables

GarethCabournDavies commented 3 months ago

Note that I haven't touched bin/plotting/pycbc_plot_bank_bins, as that is already subclassing h5py.File, though I'm not sure whether the functionality which is there already exists elsewhere

GarethCabournDavies commented 3 months ago

I have also avoided live (due to efficiency worries) and inference, so as not to interfere with the h5py.File wrapper used there