ApplyCal

Apply an existing calibration to a MeasurementSet.

inputs

type

type:

string

default:

applycal

doc:

Case-insensitive step type; must be ‘applycal’ (or ‘correct’) .

correction

type:

enum

doc:

Type of correction to perform, can be one of ‘gain’, ‘tec’, ‘clock’, ‘(common)rotationangle’ / ‘rotation’, ‘(common)scalarphase’, ‘(common)scalaramplitude’ or ‘rotationmeasure’ (create multiple ApplyCal steps for multiple corrections). When using H5Parm, this is for now the name of the soltab; the type will be deduced from the metadata in that soltab, except for full Jones, in which case correction should be ‘fulljones’. For diagonal solutions (stored as phase and amplitude), use two applycal steps, see the example under applycal.steps .

symbols:

gain, tec, clock, rotationangle, rotation, scalarphase, scalaramplitude, rotationmeasure, fulljones

direction

type:

string?

doc:

If using H5Parm, the direction of the solution to use .

interpolation

type:

enum

default:

nearest

doc:

If using H5Parm, the type of interpolation (in time and frequency) to use, can be one of ‘nearest’ or ‘linear’ .

symbols:

nearest, linear

invert

type:

boolean?

default:

True

doc:

Invert the corrections, to correct the data. Default is true. If you want to corrupt the data, set it to false

missingantennabehavior

type:

string

default:

error

doc:

(new in version 5.2) What to do if an antenna is not in the H5Parm. Possible values are error (stop the program), flag (flag all data involving this antenna) and unit (treat the solutions for this antenna as 1, e.g. no correction for this antenna).

parmdb

type:

string

doc:

Path of parmdb in which the parameters are stored. This can also be an H5Parm file, in that case the filename has to end in ‘.h5’ . When this is not set, or it is set to an empty string, ApplyCal will use the buffer for a solution to use.

solset

type:

string?

doc:

In case of applying an H5Parm file: the name of the solset to be used. If empty, defaults to the name of one solset present in the H5Parm (if more solsets are present in an H5Parm and solset is left empty, an error will be thrown) .

soltab

type:

string[]?

doc:

The name or names of the H5 soltab. Currently only used when correction=fulljones, in which case soltab should list two names (amplitude and phase soltab).

step_name

type:

string

default:

applycal

doc:

unique name for the step .

steps

type:

list

default:

[]

doc:

(new in version 3.1) ApplyCal substeps, e.g. [myApplyCal1, myApplyCal2]. Their parameters can be specified through e.g. <step>.myApplyCal1.correction=tec. If a parameter is not given for the substep, it takes the value from <step>. A typical example is to use this to apply phase and amplitude corrections simultaneously: steps=[applycal], applycal.correction=phase000 # will be overridden, applycal.steps=[amp,phase], applycal.amp.correction=amplitude000, applycal.phase.correction=phase000 .

timeslotsperparmupdate

type:

int?

doc:

Number of time slots of the gain solution file that are buffered. This optimization balances between reading too many times and the required memory size. It applies both to the reading of h5parm and parmdb formats .

default:

200

updateweights

type:

boolean?

doc:

Update the weights column, in a way consistent with the weights being inverse proportional to the autocorrelations (e.g. if ‘autoweights’ was used before) .