Predicting model visibilities with addmodel¶
The addmodel program, which is packaged in the larger calibrate container, can be used to predict model visibilities into an existing measurement set.
Model specification¶
The model to predict is described by a text file with a BBS-style source representation. This is the format written by the wsclean -save-source-list option. A complete description of the format is available at the above link. A short example of the format is below:
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 fast and memory efficient. When using it, be aware of how it scales. More model sources to predict, or more channels, times and 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 it predicts across.
As a general rule of thumb, give addmodel as many CPUs as possible, as it will happily spread the work across many threads.
Accessing via the CLI¶
The primary entry point for visibility prediction with addmodel in flint is 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 {a,s,c,v}
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
Possible choices: a, s, c, v
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