hsd_atmcor

hsd_atmcor(atmtype: int | str | list[int] | list[str] | None = None, dtem_dh: float | str | dict | list[float] | list[str] | list[dict] | None = None, h0: float | str | dict | list[float] | list[str] | list[dict] | None = None, infiles: str | list[str] | None = None, antenna: str | list[str] | None = None, parallel: bool | str | None = None, field: str | list[str] | None = None, spw: str | list[str] | None = None, pol: str | list[str] | None = None) ResultsList[SDATMCorrectionResults][source]

Apply offline ATM correction for residual atmospheric effects in calibrated single-dish spectra.

Corrects residual atmospheric line features in the science target spectra caused by incomplete sky calibration due to elevation differences between ON_SOURCE and OFF_SOURCE measurements. The correction is based on the atmospheric model described in Sawada et al. (2021).

By default (atmtype='auto'), the pipeline evaluates all four standard atmospheric models and selects the best fit:

  • atmtype=1: tropical

  • atmtype=2: mid-latitude summer

  • atmtype=3: mid-latitude winter

  • atmtype=4: subarctic summer

All models use a fixed temperature gradient (dTem_dh=-5.6 K/km) and fixed water vapour scale height (h0=2 km). If user-defined parameters are provided, the automatic model selection is disabled.

The WebLog shows a list of the calibrated MSs with the selected model parameters (atmType, h0, dTem_dh) and integrated spectra (amplitude vs. frequency) after correction; magenta curves show the atmospheric transmission. Spectra before correction can be found on the hsd_applycal WebLog page.

Parameters:
  • atmtype --

    Type of atmospheric transmission model represented as an integer. Available options are as follows. Integer values can be given as either integer or string, i.e. both 1 and '1' are acceptable.

    • 'auto': perform heuristics to choose best model (default).

    • 1: tropical.

    • 2: mid latitude summer.

    • 3: mid latitude winter.

    • 4: subarctic summer.

    • 5: subarctic winter.

    If list of integer is given, it also performs heuristics using the provided values instead of default, [1, 2, 3, 4], which is used when 'auto' is provided. List input should not contain 'auto'.

    Default: None (equivalent to 'auto')

  • dtem_dh --

    Temperature gradient [K/km], e.g. -5.6 ("" = Tool default). The value is directly passed to initialization method for ATM model. Float and string types are acceptable. Float value is interpreted as the value in K/km. String value should be the numeric value with unit such as '-5.6K/km'. When list of values are given, it will trigger heuristics to choose best model from the provided value.

    Default: None (equivalent to tool default, -5.6K/km)

  • h0 --

    Scale height for water [km], e.g. 2.0 ("" = Tool default). The value is directly passed to initialization method for ATM model. Float and string types are acceptable. Float value is interpreted as the value in kilometer. String value should be the numeric value with unit compatible with length, such as '2km' or '2000m'. When list of values are given, it will trigger heuristics to choose best model from the provided value.

    Default: None (equivalent to tool default, 2.0km)

  • infiles -- ASDM or MS files to be processed. This parameter behaves as data selection parameter. The name specified by infiles must be registered to context before you run hsd_atmcor.

  • antenna --

    Data selection by antenna names or ids.

    Example: 'PM03,PM04', '' (all antennas)

  • parallel -- Execute using CASA HPC functionality, if available. Default is None, which intends to turn on parallel processing if possible.

  • field --

    Data selection by field names or ids.

    Example: '*Sgr*,M100', '' (all fields)

  • spw --

    Data selection by spw ids.

    Example: '3,4' (spw 3 and 4), '' (all spws)

  • pol --

    Data selection by polarizations.

    Example: 'XX,YY' (correlation XX and YY), '' (all polarizations)

Notes

QA scoring:

  • QA = 1.0 if ATM correction is successfully applied.

  • QA = N/A if ATM correction is not applied.

  • QA = 0.0 if an error occurs during the correction.

Returns:

The results object for the pipeline task is returned.

Examples

  1. Apply ATM correction with automatic model selection:

>>> hsd_atmcor()
  1. Specify an atmospheric model and data selection:

>>> hsd_atmcor(atmtype=1, antenna='PM03,PM04', field='*Sgr*,M100')
  1. Specify a different model per EB:

>>> hsd_atmcor(atmtype=[1, 2])