-
Notifications
You must be signed in to change notification settings - Fork 2
Home
mwalib is a rust library (with an FFI / C compatible API) for low-level preprocessing tools to seamlessly interact with MWA metadata, voltages and visibilities, including legacy and new MWAX formats.
The three main context structs are the main interface for mwalib. Use the appropriate one depending on what you want to do.
- If you want to work with a metafits file only, then use MetafitsContext. Call it by providing the path to the metafits file and also supply the MWAVersion (see next section for details).
- If you want to work with visibilities, then use CorrelatorContext. Call it by providing the path to the metafits file and any gpubox files.
- If you want to work with voltages, then use VoltageContext. Call it by providing the path to the metafits file and any voltage data files.
MWAVersion is an enum used to identify or command mwalib how to interpret the metadata for an observation. CorrelatorContext and VoltageContexts don't need this supplied as they derive it from the data files provided by the user. However when using a MetafitsContext you need to provide the MWAVersion. The valid values are:
- CorrOldLegacy = 1
- MWA correlator (v1.0), having data files without any batch numbers.
- CorrLegacy = 2
- MWA correlator (v1.0), having data files with "gpubox" and batch numbers in their names.
- CorrMWAXv2 = 3
- MWAX correlator (v2.0)
- VCSLegacyRecombined = 4
- Legacy VCS Recombined
- VCSMWAXv2 = 5
- MWAX VCS
mwalib will attempt, based on the metafits and any data files provided, try to determine a sensible interpretation of what timesteps and coarse channels exist for the observation.
MetafitsContext timesteps and coarse channels are the expected / planned timesteps and coarse channels as specified in the metafits file.