IGWN LIGO Light-Weight XML I/O Library

raw JSON →
2.1.1 verified Mon Apr 27 auth: no python

A Python library for reading, writing, and manipulating LIGO Light-Weight XML (LIGO_LW) documents. Version 2.1.1 requires Python >=3.9. Development is active on GitHub.

pip install igwn-ligolw
error ImportError: No module named 'ligolw'
cause The package was renamed and the old name is not backwards compatible.
fix
Install igwn-ligolw: pip install igwn-ligolw
error ImportError: libxml2.so.2: cannot open shared object file
cause Missing libxml2 runtime library.
fix
Install libxml2: sudo apt-get install libxml2 (or equivalent for your OS)
breaking The package was renamed from 'python-ligo-lw' to 'igwn-ligolw'. Old installations will not update automatically.
fix Uninstall the old package and install igwn-ligolw.
deprecated The top-level module 'ligolw' is used; do not import from 'igwn.ligolw'.
fix Use 'import ligolw' directly.
gotcha The library relies on external dependencies like 'libxml2' for some features. Missing system libraries can cause import errors.
fix Install system dependencies: sudo apt-get install libxml2-dev libxslt1-dev (Linux) or use conda.

Load a LIGO_LW XML file and print the document object.

import ligolw
from ligolw import utils
load_doc = utils.load_filename('test.xml', contenthandler=ligolw.LIGOLWContentHandler)
print(load_doc)