Predicting model visibilities with addmodel¶
The addmodel program that is packaged in the larger calibrate container can be used to predict model visibilities into an existing measurement set.
Model specification¶
The model predicted is described by a text file with a BBS style source representation. It is this format that is used by the wsclean --save-source-list option. A complete descip[tion of the format is available at the above link. A subset example of the format is below (purely for clarity):
Format = Name, Type, Ra, Dec, I, SpectralIndex, LogarithmicSI, ReferenceFrequency='743990740.7407408', MajorAxis, MinorAxis, Orientation
174748-312315,GAUSSIAN,17:47:48.619992,-31.23.15.20016,0.19411106571231185,[-3.806350913533059,-4.135453173684361],true,743990740.7407408,68.5999984741211,68.5999984741211,59.79999923706055,
Implementation details¶
The addmodel application itself is very speedy and memory efficient. When using it be aware of how it scales. A larger set of model sources to predict or a larger set of frequency/time/baselines to predict across will increase the computation required. Much of this is linear – doubling the number of sources to predict will double the computation required. Memory usage is fairly constant, and addmodel is generally intelligent in how it chunks the data to predict across.
The general rule of thumb is to acquire as many CPUs as possible when running addmodel as it will happily vectorise across many threads.
Accessing via the CLI¶
The primary entry point for the visibility prediction with addmodel in flint is with flint_addmodel:
Predict a set of model visibilities from a model with addmodel
usage: flint_addmodel [-h] [--remove-datacolumn]
calibrate_container model_path ms_path mode datacolumn
Positional Arguments¶
- calibrate_container
Path to the container with addmodel
Named Arguments¶
- --remove-datacolumn
Remove the column being predicted into before predicting. See the AddModelOptions.datacolumn option.
Default:
False
Inputs for AddModelOptions¶
- model_path
Path to the sky-model that will be inserted
Default:
PydanticUndefined- ms_path
Path to the measurement set that will be interacted with
Default:
PydanticUndefined- mode
The mode
addmodelwill be operating under, where where a=add model to visibilities (default), s=subtract model from visibilities, c=copy model to visibilities, z=zero visibilitiesDefault:
PydanticUndefined- datacolumn
The column that will be operated against
Default:
PydanticUndefined