Command-line tools
General
Flag RFI with AOFlagger
Run AOFlagger on a Measurement Set (MS).
usage: low_flag_rfi [-h] [--rfi-strategy {comprehensive,fast,extended}]
[--chunk-size CHUNK_SIZE]
ms_path
Positional Arguments
- ms_path
Path to the Measurement Set
Named Arguments
- --rfi-strategy
Possible choices: comprehensive, fast, extended
Optional packaged AOFlagger strategy to use.
- --chunk-size
AOFlagger chunk size in timesteps. Default: 1800.
Default:
1800
(De)Rotate visibilities
usage: low_vis_rotate [-h] [-c COLUMN] [-w WRITE_TO_COLUMN]
[-m {ground,analytic,oskardipole,eep}] [-i] [-d]
[--eepdir EEPDIR] [--eepbase EEPBASE]
[--eepsuff EEPSUFF] [--eepcorr]
msname [msname ...]
Positional Arguments
- msname
Name of MS. This can be a wildcard string. If more than one MS name matches, the process will run for each of them one at a time.
Named Arguments
- -c, --column
MS column name to read. This is also the column that will be written to if not –dryrun, and unless –write_to_column is used.
Default:
'CORRECTED_DATA'- -w, --write_to_column
Write result to another column? (USE WITH CAUTION) [default value of COLUMN argument]
- -m, --mode
Possible choices: ground, analytic, oskardipole, eep
Conversion mode. Choose from “ground” rotation (not recommended), “analytic”, “oskardipole”, or “eep”.
Default:
'analytic'- -i, --invert
Invert sense of rotation? Use this option if you are forward modeling (applying to MODEL_DATA) or undoing a previously-applied rotation.
Default:
False- -d, --dryrun
Only compute the rotations but do not write back into the MS? Useful with -p.
Default:
False- --eepdir
EEP base directory. Ignored unless MODE is EEP.
Default:
/shared/eep-data/Perturbed_Vogel_HARP/Average_EEPs- --eepbase
EEP filename base. Ignored unless MODE is EEP.
Default:
'HARP_SKALA41_randvogel_avg_'- --eepsuff
EEP filename suffix. Ignored unless MODE is EEP.
Default:
'.npz'- --eepcorr
Apply the EEP PA correction? Ignored unless MODE is EEP.
Default:
False
Generate a GLEAM Sky Model
Create AO calibration model from MS.
usage: low_gleam_model [-h] [-o OUTPUT_PATH] [-m {csv,skymodel}]
[-s {single,wide}] [-f REFFREQ] [-r RADIUS]
ms_path
Positional Arguments
- ms_path
Path to the measurement set.
Named Arguments
- -o, --output-path
Path to save the AO calibration model.
- -m, --model-type
Possible choices: csv, skymodel
Type of model to create.
Default:
'csv'- -s, --sky-type
Possible choices: single, wide
Type of sky model to create. ‘single’ will create a single source mode. Wide will sample many, attenudated by the beam.
Default:
'single'- -f, --reffreq
Reference frequency in MHz
- -r, --radius
Search radius for sources in degrees
Default:
1
Get a field name
Get field name from a Measurement Set (MS).
usage: low_get_field_name [-h] [--field-index FIELD_INDEX] ms_path
Positional Arguments
- ms_path
Path to the Measurement Set (MS) directory.
Named Arguments
- --field-index
Index of the field to retrieve the name for.
Default:
0
Convert a CASA delay calibration table to text
Convert a CASA caltable to a text file
usage: low_delay_table_to_txt [-h] caltable
Positional Arguments
- caltable
Path to calibration table(s).
Run calibration with SDP tools
Plotting
Plot AOCalibrate solutions
Run calibrate and apply the solutions given a measurement set and sky-model.
usage: low_aocalibrate_plot [-h] [--ref-ant REF_ANT] [--ms MS] aosolutions
Positional Arguments
- aosolutions
Path to the solution file to inspect and plot
Named Arguments
- --ref-ant
The reference antenna to use when plotting the bandpass solutions. If -1, the best one will be selected.
Default:
-1- --ms
The measurement set to use when plotting the bandpass solutions.
Plot baseline spectra
Plot visibilities per baseline.
usage: low_plot_baselines [-h] [--out-dir OUT_DIR] [--no-fast-plot]
[--norm {lin,log,sqrt}]
[--plot-type {spectrum,delay,delay-rate}]
[--data-column DATA_COLUMN]
[--data-type {amp,phase,real,imag}]
[--max-concurrent MAX_CONCURRENT]
[--max-baselines MAX_BASELINES]
ms_path
Positional Arguments
- ms_path
Path to visibilities.
Named Arguments
- --out-dir
Output directory for plots. Defaults to the MS directory.
- --no-fast-plot
Use pcolormesh instead of pcolorfast.
Default:
False- --norm
Possible choices: lin, log, sqrt
Plot normalisation.
Default:
'lin'- --plot-type
Possible choices: spectrum, delay, delay-rate
Type of plot.
Default:
'spectrum'- --data-column
Data column to plot.
Default:
'DATA'- --data-type
Possible choices: amp, phase, real, imag
Type of data to plot.
Default:
'amp'- --max-concurrent
Number of worker processes.
Default:
4- --max-baselines
Maximum number of baselines to plot.
Plot fringes
Plot fringes per for all baselines.
usage: low_plot_fringes [-h] [--out-dir OUT_DIR]
[--pols {XX,XY,YX,YY} [{XX,XY,YX,YY} ...]]
[--freq-min-mhz FREQ_MIN_MHZ]
[--freq-max-mhz FREQ_MAX_MHZ] [--spw-id SPW_ID]
[--max-baselines MAX_BASELINES]
[--show-coarse-channels]
[--coarse-channel-min COARSE_CHANNEL_MIN]
[--coarse-channel-max COARSE_CHANNEL_MAX]
[--data-column DATA_COLUMN]
ms_path
Positional Arguments
- ms_path
Path to visibilities.
Named Arguments
- --out-dir
Output directory for plots. Defaults to the MS directory.
- --pols
Possible choices: XX, XY, YX, YY
Polarisations to plot.
- --freq-min-mhz
Minimum frequency in MHz.
Default:
0- --freq-max-mhz
Maximum frequency in MHz.
Default:
inf- --spw-id
Spectral window ID.
Default:
0- --max-baselines
Maximum number of baselines to plot.
- --show-coarse-channels
Overlay coarse channel boundaries on the plot.
Default:
False- --coarse-channel-min
Minimum coarse channel index.
Default:
0- --coarse-channel-max
Maximum coarse channel index.
Default:
512- --data-column
Data column
Default:
'DATA'
Plot animated fringes for single baseline
Make an animation (default = GIF) of amplitudes an phases for a given baseline over time
usage: low_animate_fringes [-h] [--tfactor TFACTOR] [--ffactor FFACTOR]
[--rad] [--linear] [--delay_samples DELAY_SAMPLES]
[--intra_chan_delay_samples INTRA_CHAN_DELAY_SAMPLES]
[--output_animation OUTPUT_ANIMATION] [--pols POLS]
ms_path stations stations
Positional Arguments
- ms_path
Path to visibilities
- stations
The two stations comprising the desired baseline
Named Arguments
- --tfactor
Number of time bins to average together (default: do no averaging)
Default:
1- --ffactor
Number of channels to average together (default: do no averaging)
Default:
1- --rad
Plot phase angles in radians instead of the default degrees
Default:
False- --linear
Plot amplitudes on a linear scale instead of the default log scale
Default:
False- --delay_samples
Apply an overall phase slope across all channels corresponding to a delay of DELAY_SAMPLES*1.08us of pre-channelised data
Default:
0- --intra_chan_delay_samples
Apply a phase slope across coarse channels corresponding to a delay of DELAY_SAMPLES*1.08us of post-channelised data
Default:
0- --output_animation
Output (path to) file name where the animation gets written (default = ‘STATION1_STATION2_anim.gif’). If given the special value SHOW, then plt.show() is called instead of writing the result to file.
- --pols
Comma-separated list of polarisations to plot. Supported polarisations are (‘XX’, ‘XY’, ‘YX’, ‘YY’).
Default:
'XX,YY'
Plot fringe rates across baselines
Plot phase vs time over baselines per station.
usage: low_plot_fringerate [-h] [--out-dir OUT_DIR] [--freq-mhz FREQ_MHZ]
[--bw-mhz BW_MHZ] [--uv-min-m UV_MIN_M]
[--data-column DATA_COLUMN]
ms_path
Positional Arguments
- ms_path
Path to visibilities.
Named Arguments
- --out-dir
Output directory for plots. Defaults to the MS directory.
- --freq-mhz
Frequency to select in MHz or special valuues of ‘start’, ‘mid’, or ‘end’
Default:
mid- --bw-mhz
Bandwidth to average over in MHz
Default:
1- --uv-min-m
Minimum UV distance in metres for a baseline to be included
Default:
500- --data-column
Data column to plot.
Default:
'DATA'
MS Fixes
Reverse baseline antenna ordering
Reverse baseline ordering in a MeasurementSet
usage: low_reverse_baselines [-h] [-c CHUNKSIZE] [-d] ms_path
Positional Arguments
- ms_path
Path to MS file
Named Arguments
- -c, --chunksize
Number of rows to process in a chunk
Default:
1000- -d, --dry-run
Do not execute baseline reversal - just check the ANTENNA1/2 ordering
Default:
False
Add a subtable to an MS
Copy an existing table (e.g. PHASED_ARRAY) to another table as a subtable
usage: low_add_subtable [-h] [-d] [-f] [-n NAME] ms subtable
Positional Arguments
- ms
Path to target MeasurementSet
- subtable
Path to subtable to add
Named Arguments
- -d, --dry-run
Dry run
Default:
False- -f, --force
Force the subtable to be replaced
Default:
False- -n, --name
Set telescope name
Rename the telescope in an MS
Rename TELESCOPE_NAME in a MeasurementSet
usage: low_rename_telescope [-h] [-n NAME] ms_path
Positional Arguments
- ms_path
Path to target MeasurementSet
Named Arguments
- -n, --name
Set telescope name
Default:
'SKA-LOW'
Fix WEIGHT/WEIGHT_SPECTRUM tables
Fix WEIGHT/WEIGHT_SPECTRUM column using FD, INTERVAL, and channel bandwidth in MS
usage: low_fix_weights [-h] [-c CHUNKSIZE] [-d] ms_path
Positional Arguments
- ms_path
Path to target MeasurementSet
Named Arguments
- -c, --chunksize
Number of rows to process in a chunk
Default:
1000- -d, --dry-run
Do not write new columns to MS
Default:
False
Fix INTERVAL table
Fix INTERVAL column using TIME in MS
usage: low_fix_interval [-h] ms_path
Positional Arguments
- ms_path
Path to target MeasurementSet