hsd_blflag¶
- hsd_blflag(iteration: str | int | None = None, edge: str | int | list[int] | None = None, flag_tsys: str | bool | None = None, tsys_thresh: str | int | float | None = None, flag_prfre: str | bool | None = None, prfre_thresh: str | int | float | None = None, flag_pofre: str | bool | None = None, pofre_thresh: str | int | float | None = None, flag_prfr: str | bool | None = None, prfr_thresh: str | int | float | None = None, flag_pofr: str | bool | None = None, pofr_thresh: str | int | float | None = None, flag_prfrm: str | bool | None = None, prfrm_thresh: str | int | float | None = None, prfrm_nmean: str | int | None = None, flag_pofrm: str | bool | None = None, pofrm_thresh: str | int | float | None = None, pofrm_nmean: str | int | None = None, plotflag: str | bool | None = None, parallel: bool | str | None = None, infiles: str | list[str] | None = None, antenna: str | list[str] | None = None, field: str | list[str] | None = None, spw: str | list[str] | None = None, pol: str | list[str] | None = None) ResultsList[Results][source]¶
Flag spectra based on post-baseline quality criteria for single-dish data.
Flags spectra using up to five criteria evaluated on both pre-fit and post-fit spectra:
Expected RMS (
flag_prfre/flag_pofre): flag based on the expected RMS calculated from the radiometer equation.Calculated RMS (
flag_prfr/flag_pofr): flag based on the RMS computed directly from the spectrum.Running mean (
flag_prfrm/flag_pofrm): flag based on a running mean comparison for pre-fit and post-fit spectra.Tsys flagging (
flag_tsys): flag based on the Tsys values.
The WebLog shows the percentage of flagged data per MS and detailed per-criterion plots; clicking
Plotsdisplays figures evaluating each criterion as a function of rows, with flagged data in red and unflagged data in blue.- Parameters:
iteration --
Number of iterations to perform sigma clipping to calculate threshold value of flagging.
Default: None (equivalent to 5.0)
edge --
Number of channels to be dropped from the edge. The value must be a list of integer with length of one or two. If list length is one, same number will be applied both side of the band.
Example: [10,20], [10]
Default: None (equivalent to [0, 0])
flag_tsys -- Activate (True) or deactivate (False) Tsys flag. Default is None which is equivalent to True.
tsys_thresh -- Threshold value for Tsys flag. Default is None which sets 3.0 as a threshold.
flag_prfre -- Activate (True) or deactivate (False) flag by expected rms of pre-fit spectra. Default is None which is equivalent to True.
prfre_thresh -- Threshold value for flag by expected rms of pre-fit spectra. Default is None which sets 3.0 to a threshold.
flag_pofre -- Activate (True) or deactivate (False) flag by expected rms of post-fit spectra. Default is None which is equivalent to True.
pofre_thresh -- Threshold value for flag by expected rms of post-fit spectra. Default is None which sets 1.333 to a threshold.
flag_prfr -- Activate (True) or deactivate (False) flag by rms of pre-fit spectra. Default is None which is equivalent to True.
prfr_thresh -- Threshold value for flag by rms of pre-fit spectra. Default is None which sets 4.5 to a threshold.
flag_pofr -- Activate (True) or deactivate (False) flag by rms of post-fit spectra. Default is None which is equivalent to True.
pofr_thresh -- Threshold value for flag by rms of post-fit spectra. Default is None which sets 4.0 to a threshold.
flag_prfrm -- Activate (True) or deactivate (False) flag by running mean of pre-fit spectra. Default is None which is equivalent to True.
prfrm_thresh -- Threshold value for flag by running mean of pre-fit spectra. Default is None which sets 5.5 to a threshold.
prfrm_nmean -- Number of channels for running mean of pre-fit spectra. Default is None which sets 5 channels for running mean.
flag_pofrm -- Activate (True) or deactivate (False) flag by running mean of post-fit spectra. Default is None which is equivalent to True.
pofrm_thresh -- Threshold value for flag by running mean of post-fit spectra. Default is None which sets 5.0 to a threshold.
pofrm_nmean -- Number of channels for running mean of post-fit spectra. Default is None which sets 5 channels for running mean.
plotflag -- True to plot result of data flagging. Default is None which is equivalent to True.
parallel --
Execute using CASA HPC functionality, if available.
Options: 'automatic', 'true', 'false', True, False
Default: None (equivalent to 'automatic')
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_blflag.
Default: None (process all registered data)
antenna --
Data selection by antenna names or ids.
Example: 'PM03,PM04', '' (all antennas)
Default: None (process all antennas)
field --
Data selection by field names or ids.
Example: '*Sgr*,M100', '' (all fields)
Default: None (process all science fields)
spw --
Data selection by spw ids.
Example: '3,4' (spw 3 and 4), '' (all spws)
Default: None (process all science spws)
pol --
Data selection by polarizations.
Example: 'XX,YY' (correlation XX and YY), '' (all polarizations)
Default: None (process all polarizations)
Notes
QA scoring (per source per spw):
QA = 1.0 if additional flagging is 0%-5%.
QA = 1.0-0.5 if additional flagging is 5%-50%.
QA = 0.0 if additional flagging > 50%.
- Returns:
The results object for the pipeline task is returned.
Examples
Run all flagging rules:
>>> hsd_blflag()