Skip to content

Port LIGO_LW I/O to python-ligo-lw

This PR implements a backwards-compatible update to use the new python-ligo-lw library for LIGO_LW I/O, but with fallbacks to glue.ligolw when reading old files.

When reading there is now a try/except that should try and read with the new library, and if that fails, try and use the old library.

When writing:

  • ...tables, the columns/datatypes in the table define the format version, so both libraries are tried (new first)
  • ...segments, there is a new ilwdchar_compat keyword that currently defaults to None, which presents a warning that it will use True (old format), but will be switched to False for the 1.0.0 release (at which time the warning will be removed).

The upshot of this is that GWpy should now be able to seamlessly read LIGO_LW files written in either new or old formats.

Merge request reports