hsd_tsysflag¶
- hsd_tsysflag(vis: list[str] | None = None, caltable: list[str] | None = None, flag_nmedian: bool | str | None = None, fnm_limit: Integral | str | None = None, fnm_byfield: bool | str | None = None, flag_derivative: bool | str | None = None, fd_max_limit: Integral | str | None = None, flag_edgechans: bool | str | None = None, fe_edge_limit: Integral | str | None = None, flag_fieldshape: bool | str | None = None, ff_refintent: str | None = None, ff_max_limit: Integral | str | None = None, flag_birdies: bool | str | None = None, fb_sharps_limit: Integral | str | None = None, flag_toomany: bool | str | None = None, tmf1_limit: Integral | str | None = None, tmef1_limit: Integral | str | None = None, metric_order: str | None = None, normalize_tsys: bool | str | None = None, filetemplate: str | None = None) ResultsList[Results][source]¶
Flag deviant system temperature measurements for single-dish data.
Applies a sequence of heuristic flagging tests to the Tsys caltable. If a manual flagging template is provided via
filetemplate, those flags are applied first. The WebLog shows the Tsys spectra per spw per antenna after all flagging has been applied.The flagging tests, applied in order, are:
nmedian (
flag_nmedian): flag Tsys spectra whose median value is more thanfnm_limit(default 3.0) times the median of all spectra.derivative (
flag_derivative): flag spectra with a high median derivative (fd_max_limit), targetingringingspectra.edgechans (
flag_edgechans): flag the edge channels of each spw (fe_edge_limit).fieldshape (
flag_fieldshape): flag spectra whose shape differs significantly from the reference BANDPASS intent shape (ff_max_limit,ff_refintent).birdies (
flag_birdies): flag narrow spectral features (fb_sharps_limit).toomany (
flag_toomany): flag all antennas in a timestamp/spw if the fraction already flagged exceedstmf1_limit; flag all timestamps in a spw if the fraction entirely flagged exceedstmef1_limit.
- Parameters:
vis -- List of input MeasurementSets (Not used)
caltable --
List of input Tsys calibration tables.
Example: caltable=['X132.ms.tsys.s2.tbl']
Default: None (equivalent to [] - Use the table currently stored in the pipeline context)
flag_nmedian --
True to flag Tsys spectra with high median value.
Default: None (equivalent to True)
fnm_limit --
Flag spectra with median value higher than fnm_limit * median of this measure over all spectra.
Default: None (equivalent to 2.0)
fnm_byfield --
Evaluate the nmedian metric separately for each field.
Default: None (equivalent to True)
flag_derivative --
True to flag Tsys spectra with high median derivative.
Default: None (equivalent to True)
fd_max_limit --
Flag spectra with median derivative higher than fd_max_limit * median of this measure over all spectra.
Default: None (equivalent to 5.0)
flag_edgechans --
True to flag edges of Tsys spectra.
Default: None (equivalent to True)
fe_edge_limit --
Flag channels whose channel to channel difference > fe_edge_limit * median across spectrum.
Default: None (equivalent to 3.0)
flag_fieldshape --
True to flag Tsys spectra with a radically different shape to those of the ff_refintent.
Default: None (equivalent to True)
ff_refintent --
Data intent that provides the reference shape for 'flag_fieldshape'.
Default: None (equivalent to 'BANDPASS')
ff_max_limit --
Flag Tsys spectra with 'fieldshape' metric values > ff_max_limit.
Default: None (equivalent to 13)
flag_birdies --
True to flag channels covering sharp spectral features.
Default: None (equivalent to True)
fb_sharps_limit --
Flag channels bracketing a channel to channel difference > fb_sharps_limit.
Default: None (equivalent to 0.15)
flag_toomany --
True to flag Tsys spectra for which a proportion of antennas for given timestamp and/or proportion of antennas that are entirely flagged in all timestamps exceeds their respective thresholds.
Default: None (equivalent to True)
tmf1_limit --
Flag Tsys spectra for all antennas in a timestamp and spw if proportion of antennas already flagged in this timestamp and spw exceeds tmf1_limit.
Default: None (equivalent to 0.666)
tmef1_limit --
Flag Tsys spectra for all antennas and all timestamps in a spw, if proportion of antennas that are already entirely flagged in all timestamps exceeds tmef1_limit.
Default: None (equivalent to 0.666)
metric_order --
Order in which to evaluate the flagging metrics that are enabled. Disabled metrics are skipped. Default order is as follows:
nmedian derivative edgechans fieldshape birdies toomany
normalize_tsys --
True to create a normalized Tsys table that is used to evaluate the Tsys flagging metrics. All newly found flags are also applied to the original Tsys caltable that continues to be used for subsequent calibration.
Default: None (equivalent to False)
filetemplate -- The name of a text file that contains the manual Tsys flagging template. If the template flags file is undefined, a name of the form 'msname.flagtsystemplate.txt' is assumed.
- Returns:
The results object for the pipeline task is returned.
Examples
Flag Tsys measurements using all recommended tests:
>>> hsd_tsysflag()
Flag using all tests except
fieldshape:
>>> hsd_tsysflag(flag_fieldshape=False)