Skip to content

Add table format to read in SNAX features

Created by: myNameIsPatrick

This adds in a new EventTable format, hdf5.snax, to read in SNAX-based features (formally known as GstLAL feature extractor).

Example:

>>> from gwpy.table import EventTable
>>> data = EventTable.read('H-GSTLAL_IDQ_FEATURES-1255853400-20.h5', 'H1:SUS-PRM_M3_WIT_P_DQ', format='hdf5.snax')
>>> data
<EventTable length=319>
       time        frequency     q        snr       phase      duration 
     float64        float32   float32   float32    float32     float32  
------------------ --------- --------- --------- ------------ ----------
 1255853400.046875 29.116926  8.01923  3.179394 0.0115922745 0.59008665
...

EventTable.read() takes in an additional positional argument, channel, to specify the channel needed from the file since multiple channels are contained within.

I added a unit test, test_read_snax in gwpy/table/tests/test_table.py as well.

Merge request reports