MWATelescope / mwalib

Library to read Murchison Widefield Array (MWA) raw visibilities, voltages and metadata into a common structure
Mozilla Public License 2.0
10 stars 2 forks source link

Implement signal chain correction metadata from new metafits HDU #76

Closed gsleap closed 1 month ago

gsleap commented 1 month ago

Example HDU:

# HDU 2 in 1096952256_metafits.fits:
XTENSION= 'BINTABLE'           / binary table extension
BITPIX  =                    8 / array data type
NAXIS   =                    2 / number of array dimensions
NAXIS1  =                 1035 / length of dimension 1
NAXIS2  =                    8 / length of dimension 2
PCOUNT  =                    0 / number of group parameters
GCOUNT  =                    1 / number of groups
TFIELDS =                    3 / number of table fields
TTYPE1  = 'Receiver_type'
TFORM1  = '10A     '
TTYPE2  = 'Whitening_Filter'
TFORM2  = 'B       '
TTYPE3  = 'Corrections'
TFORM3  = '256E    '
EXTNAME = 'SIGCHAINDATA'       / extension name

This info is a normalised table containing the appropriate corrections (or all 0's if none is needed) for the receiver type+whitening filter combinations. (i.e. it is a lookup table).

We should add the full table to the MetafitsContext as a struct, and then provide the index to that table in the rf_input struct.

gsleap commented 1 month ago

Fixed in a24fad6d19679ac612d12c2f91c630363c368948