aocal File Format
Introduction
The aocal file format is used by various MWA software to store calibration solutions.
The following software uses aocal files:
Cotter (although cotter is not supported by the MWA community any more)
File Naming
The aocal filename can be anything, however in some circumstances we adopt a formal naming policy for each of use by software.
MWAX Beamformer naming
For the MWAX Beamformer we use the following naming:
OBSID_NTILES_NFCHAN_RCHAN_calfile.bin
Where:
OBSID: Observation ID of the calibrator which produced these cailbration solutions.
NTILES: zero padded three digit number of MWA tiles in the solution (001-256).
NFCHAN: zero padded four digit number of fine channels in the solution (0000-6400).
RCHAN: zero padded three digit receiver channel number (000-255).
So for example an aocal file for calibrator obs_id 1234567890 which has 128 tiles, 32 fine channels per coarse channel, on receiver channel 121 would be named: 1234567890_128_0032_121_calfile.bin
File Format
The aocal file format is a binary file consisting of a 48 byte header plus a data section.
NOTE: bytes are encoded using little endian.
Header Format
Bytes | Datatype | Fieldname | Description |
|---|---|---|---|
0- 7 | char[8] | intro | 8-byte null terminated string "MWAOCAL" |
8-11 | uint32 | file_type | Always 0, reserved for indicating something other than complex Jones solutions |
12-15 | uint32 | structure_type | Always 0, reserved for indicating different ordering |
16-19 | uint32 | interval_count | Number of solution intervals in file |
20-23 | uint32 | antenna_count | Number of antennas that were in the data set (but were not necessary all solved for) |
24-27 | uint32 | fine_channel_count | Number of (fine) channels in the data set |
28-31 | uint32 | polarisation_count | Number of polarisations solved for -- always 4. |
32-39 | float64 | start_time | Start time of solutions. Either 0 or GPS time (See Note 1) |
40-47 | float64 | end_time | End time of solutions. Either 0 or GPS time (See Note 1) |
Data Format
After the header, follow 2 x nSolution doubles, with
Where:
nSolutions = interval_count * antenna_count * fine_channel_count * polarisation_count
Ordered in the way as given, so:
time | ant | fchan | pol | real | imag |
|---|---|---|---|---|---|
0 | 0 | 0 | XX | [0] | [1] |
0 | 0 | 0 | XY | [2] | [3] |
0 | 0 | 0 | YX | [4] | [5] |
0 | 0 | 0 | YY | [6] | [7] |
0 | 0 | 1 | XX | [8] | [9] |
… |
|
|
|
|
|
0 | 0 | 767 | XX | [3064] | [3065] |
0 | 0 | 767 | XY | [3066] | [3067] |
0 | 0 | 767 | YX | [3068] | [3068] |
0 | 0 | 767 | YY | [3070] | [3071] |
0 | 1 | 0 | XX | [3072] | [3073] |
… |
|
|
|
|
|
In this example there are 128 antennas and 768 fine channels (equivalent to 24 coarse chans with 40 kHz fine channels.
Notes:
The original author of the aocal format, André Offringa states in the code that the start time and end time are in AIPS format, however, the code only writes zeros. Noting this, Hyperdrive writes GPS times.
If a solution is not available, either because no data were selected during calibration for this interval or because the calibration diverged, a "NaN" will be stored in the doubles belonging to that solution.