DP3¶
Flint can run steps of DP3 against a measurement set. DP3 is installed from pip with the dp3 extra (Linux x86_64 only):
pip install 'askap-flint[dp3]'
DP3 is driven through its Python interface, so no container is needed. Each task builds the DP3 settings in memory and makes a single pass over the measurement set, updating it in place.
Tasks¶
The tasks live in flint.dp3:
dp3_flag: flags withaoflagger, using the packagedASKAP.luastrategy unless another is given. Apreflaggerstep can run first.dp3_ddecal: solves for gains against the model column withddecal, and returns the measurement set withh5parmset to the solutions.dp3_gaincal: the same, withgaincal.dp3_applycal: applies one or more solution tables from an h5parm, writing the corrected data to a new column (CORRECTED_DATAby default). The measurement set’sh5parmis used when none is given.dp3_solve_apply: solves and applies in one call. Withgaincalthis is a single pass over the data. Withddecalthe solutions are written to an h5parm and then applied.
Calibration solves against the measurement set’s model_column (e.g. MODEL_DATA written by wsclean), which must be set.
Each step has an options class (e.g. DP3DDECalOptions) whose fields are DP3 settings for that step. Unset options are left to DP3’s defaults. They can also be set in a strategy file under the dp3preflagger, dp3aoflagger, dp3ddecal, dp3gaincal and dp3applycal modes.
Accessing via the CLI¶
Run DP3 steps against measurement sets through DP3’s Python interface
usage: flint_dp3 [-h] {flag,ddecal,gaincal,applycal} ...
Positional Arguments¶
- task
Possible choices: flag, ddecal, gaincal, applycal
Sub-commands¶
flag¶
Flag with aoflagger
flint_dp3 flag [-h] [--column COLUMN] [--strategy STRATEGY]
[--memoryperc MEMORYPERC] [--timewindow TIMEWINDOW]
ms
Positional Arguments¶
- ms
The measurement set to flag
Named Arguments¶
- --column
The column to flag
Default:
'DATA'
Inputs for DP3AOFlaggerOptions¶
- --strategy
The aoflagger .lua strategy file. The packaged ASKAP strategy is used if unset.
- --memoryperc
Percentage of system memory aoflagger may use
- --timewindow
Number of time slots flagged together
ddecal¶
Solve for gains with ddecal
flint_dp3 ddecal [-h] [--column COLUMN] [--model-column MODEL_COLUMN]
[--h5parm H5PARM]
[--mode {scalar,scalarphase,scalaramplitude,diagonal,diagonalphase,diagonalamplitude,fulljones,tec,tec+delay,tec+phase,tec+phase+delay,rotation,rotation+diagonal,faradayrotation,leakage,leakageamplitude}]
[--solint SOLINT] [--nchan NCHAN] [--maxiter MAXITER]
[--tolerance TOLERANCE] [--uvlambdamin UVLAMBDAMIN]
[--propagatesolutions PROPAGATESOLUTIONS]
ms
Positional Arguments¶
- ms
The measurement set to solve
Named Arguments¶
- --column
The data column
Default:
'DATA'- --model-column
The model column
Default:
'MODEL_DATA'- --h5parm
The output h5parm
Inputs for DP3DDECalOptions¶
- --mode
Possible choices: scalar, scalarphase, scalaramplitude, diagonal, diagonalphase, diagonalamplitude, fulljones, tec, tec+delay, tec+phase, tec+phase+delay, rotation, rotation+diagonal, faradayrotation, leakage, leakageamplitude
What to solve for
Default:
'scalarphase'- --solint
Number of time slots per solution. 0 uses the whole observation.
Default:
1- --nchan
Number of channels per solution. 0 uses the whole band.
Default:
0- --maxiter
Maximum number of solver iterations
- --tolerance
Convergence tolerance of the solver
- --uvlambdamin
Ignore baselines shorter than this many wavelengths
- --propagatesolutions
Start each solution interval from the previous solutions
gaincal¶
Solve for gains with gaincal
flint_dp3 gaincal [-h] [--column COLUMN] [--model-column MODEL_COLUMN]
[--h5parm H5PARM]
[--caltype {scalar,scalarphase,scalaramplitude,diagonal,diagonalphase,diagonalamplitude,fulljones,tec,tec+phase}]
[--solint SOLINT] [--nchan NCHAN] [--maxiter MAXITER]
[--tolerance TOLERANCE] [--uvlambdamin UVLAMBDAMIN]
[--propagatesolutions PROPAGATESOLUTIONS]
ms
Positional Arguments¶
- ms
The measurement set to solve
Named Arguments¶
- --column
The data column
Default:
'DATA'- --model-column
The model column
Default:
'MODEL_DATA'- --h5parm
The output h5parm
Inputs for DP3GainCalOptions¶
- --caltype
Possible choices: scalar, scalarphase, scalaramplitude, diagonal, diagonalphase, diagonalamplitude, fulljones, tec, tec+phase
What to solve for
Default:
'scalarphase'- --solint
Number of time slots per solution. 0 uses the whole observation.
Default:
1- --nchan
Number of channels per solution. 0 uses the whole band.
Default:
0- --maxiter
Maximum number of solver iterations
- --tolerance
Convergence tolerance of the solver
- --uvlambdamin
Ignore baselines shorter than this many wavelengths
- --propagatesolutions
Start each solution interval from the previous solutions
applycal¶
Apply an h5parm
flint_dp3 applycal [-h] [--column COLUMN] [--output-column OUTPUT_COLUMN]
[--correction CORRECTION [CORRECTION ...]]
[--solset SOLSET] [--interpolation {nearest,linear}]
[--updateweights UPDATEWEIGHTS] [--invert INVERT]
ms h5parm
Positional Arguments¶
- ms
The measurement set to correct
- h5parm
The h5parm to apply
Named Arguments¶
- --column
The data column
Default:
'DATA'- --output-column
The corrected data column
Default:
'CORRECTED_DATA'
Inputs for DP3ApplyCalOptions¶
- --correction
Soltabs to apply in turn, e.g. [‘phase000’] or [‘rotationmeasure000’]
Default:
['phase000']- --solset
The solset holding the soltabs. DP3 picks one if unset.
- --interpolation
Possible choices: nearest, linear
How solutions are interpolated in time and frequency
- --updateweights
Update the weights along with the data
- --invert
Apply the inverse of the solutions, i.e. correct the data