flint.casa

Utilities related to using casa tasks

Functions

applycal(→ str)

Generate the CASA applycal command

args_to_casa_task_string(→ str)

Given a set of arguments, convert them to a string that can

copy_with_mstranform(→ pathlib.Path)

Use the casa task mstransform to create nspw spectral windows

cvel(→ str)

Generate the CASA cvel command

gaincal(→ str)

Generate the CASA gaincal command

mstransform(→ str)

Construct and run CASA's mstransform task.

Module Contents

flint.casa.applycal(**kwargs) str[source]

Generate the CASA applycal command

Returns:

The command to execute

Return type:

str

flint.casa.args_to_casa_task_string(task: str, **kwargs) str[source]

Given a set of arguments, convert them to a string that can be used to run the corresponding CASA task that can be passed via casa -c for execution

Parameters:

task (str) – The name of the task that will be executed

Returns:

The formatted string that will be given to CASA for execution

Return type:

str

flint.casa.copy_with_mstranform(casa_container: pathlib.Path, ms_path: pathlib.Path) pathlib.Path[source]

Use the casa task mstransform to create nspw spectral windows in the input measurement set. This is necessary when attempting to use gaincal to solve for some frequency-dependent solution.

Parameters:
  • casa_container (Path) – Path to the singularity container with CASA tooling

  • ms_path (Path) – The measurement set that should be reformed to have nspw spectral windows

Returns:

The path to the measurement set that was updated

Return type:

Path

flint.casa.cvel(**kwargs) str[source]

Generate the CASA cvel command

Returns:

The command to execute

Return type:

str

flint.casa.gaincal(**kwargs) str[source]

Generate the CASA gaincal command

Returns:

The command to execute

Return type:

str

flint.casa.mstransform(**kwargs) str[source]

Construct and run CASA’s mstransform task.

Parameters:
  • casa_container (Path) – Container with the CASA tooling

  • ms (str) – Path to the measurement set to transform

  • output_ms (str) – Path of the output measurement set produced by the transform

Returns:

The mstransform string

Return type:

str