flint.predict.addmodel

Tooling around the use of the addmodel program packaged with calibrate.

This tooling requires the calibrate container.

Classes

AddModelOptions

Container for options into the addmodel program packaged

Functions

add_model(→ AddModelOptions)

Use the addmodel program to predict the sky-model visibilities

add_model_options_to_command(→ str)

Generate the command to execute addmodel

cli(→ None)

get_parser(→ argparse.ArgumentParser)

Module Contents

class flint.predict.addmodel.AddModelOptions(/, **data: Any)[source]

Bases: flint.options.BaseOptions

Container for options into the addmodel program packaged with aocalibrate

datacolumn: str[source]

The column that will be operated against

mode: Literal['a', 's', 'c', 'v'][source]

The mode addmodel will be operating under, where where a=add model to visibilities (default), s=subtract model from visibilities, c=copy model to visibilities, z=zero visibilities

model_path: pathlib.Path[source]

Path to the sky-model that will be inserted

ms_path: pathlib.Path[source]

Path to the measurement set that will be interacted with

flint.predict.addmodel.add_model(add_model_options: AddModelOptions, container: pathlib.Path, remove_datacolumn: bool = False) AddModelOptions[source]

Use the addmodel program to predict the sky-model visibilities from a compatible source list (e.g. wsclean -save-source-list)

Parameters:
  • add_model_options (AddModelOptions) – The set of supported options to be supplied to addmodel

  • container (Path) – The calibrate container that contains the addmodel program

  • remove_datacolumn (bool, optional) – Whether to first remove the datacolumn specified in add_model_options before predicting. If False it should be overwritten. Defaults to False.

Returns:

The options used to run addmodel (same as input)

Return type:

AddModelOptions

flint.predict.addmodel.add_model_options_to_command(add_model_options: AddModelOptions) str[source]

Generate the command to execute addmodel

Parameters:

add_model_options (AddModelOptions) – The collection of supported options used to generate the command

Returns:

The generated addmodel command

Return type:

str

flint.predict.addmodel.cli() None[source]
flint.predict.addmodel.get_parser() argparse.ArgumentParser[source]