Forked from André Offringa's MWA data reduction code.
If any of this code is used, please cite Offringa et al. (2016).
Colloquially referred to as aocalibrate in Flint.
Note that MWA Hyperdrive is a more modern, and well-supported implementation of these algorithems.
- C++ compiler (g++ recommended)
- CASA (Common Astronomy Software Applications) libraries
- GSL (GNU Scientific Library)
- Boost libraries
# Create build directory
mkdir -p build
cd build
# Configure and build
cmake ../
make
# Install (optional)
sudo make installIf casacore is not in standard system locations:
cmake ../ -DCMAKE_PREFIX_PATH=/path/to/casacoreExample for conda:
cmake ../ -DCMAKE_PREFIX_PATH=$HOME/miniforge3/envs/casacorecd build
rm -rf *
cmake ../
make- CASA libraries not found: Use
-DCMAKE_PREFIX_PATH=/path/to/casacore - GSL/Boost not found: Install via package manager (
apt-get,brew, etc.) - Build errors: Ensure casacore version 3.6+ is installed
These tools perform "MitchCal":
a direction-independent full-polarization self-calibration. This is performed with the mitchcal tool, which is the authors’ custom implementation of the algorithm described by Mitchell et al. (2008)
In the current form of this repo, only a single time-step, frequency dependent solution is computed. This is suitable for a bandpass calibration.
The CLI hooks are:
calibrate
# Usage: calibrate [-p <phases.txt> <gains.txt>] [-refmod <0|1|2> [-minuv <min uvw dist in m>] [-maxuv <min uvw dist in m>] [-startscan <scan>] [-endscan <scan>] [-a <min-accuracy> <stop-accuracy>] [-i <niter>] [-j <threads>] [-m <model>] [-scalar] [-diag] [-rhs <rhs solutions>] [-rotation] [-t timesteps] [-datacolumn <name>] [-quiet] <measurementset.ms> <solutions.bin>
# This will calculate "static" phase offsets for all stations. It produces approximate least-squares solutions.
# refmode=0 process all baselines; =1 only include baselines to reference antenna; =2 exclude baselines to reference antenna.applysolutions
# Usage: applysolutions [-datacolumn <name>] [-gflag <solutions-flag-file.txt>] [-startscan <scan>] [-endscan <scan>] [-copy/-nocopy] [-s xx xy yx yy] <ms> <gains-bin-file>
# Will apply the found solution matrices.
# Options:
# -copy/-nocopy Don't(/do) alter the original DATA column but store the corrected data in the CORRECTED_DATA (this is std CASA behaviour)
# default: -copyaddmodel
# Usage: addmodel [-usemodelcol] [-datacolumn <COLUMN>] [-m <a|s|c|z>] [-n <σ>] <model> <ms>
# Modify visibilities using a model. If -usemodelcol is specified then the MODEL_DATA column is used as the source model otherwise the specified component model file is used. The modification to use is defined with the mode switch(-m) where a=add model to visibilities (default), s=subtract model from visibilities, c=copy model to visibilities, z=zero visibilities.