hsd_flagdata¶
- hsd_flagdata(vis: list[str] | None = None, autocorr: str | bool | None = None, shadow: str | bool | None = None, scan: str | bool | None = None, scannumber: str | None = None, intents: str | None = None, edgespw: str | bool | None = None, fracspw: str | None = None, fracspwfps: str | float | None = None, online: str | bool | None = None, fileonline: str | None = None, template: str | bool | None = None, filetemplate: str | None = None, pointing: str | bool | None = None, filepointing: str | None = None, incompleteraster: str | bool | None = None, hm_tbuff: str | None = None, tbuff: str | float | None = None, qa0: str | bool | None = None, qa2: str | bool | None = None, parallel: str | bool | None = None, flagbackup: str | bool | None = None) ResultsList[Results][source]¶
Apply deterministic flagging to single-dish MeasurementSets.
Performs a sequence of flagging operations on each MS. The WebLog shows the percentage of flagged data per MS for each agent. The
Before Taskcolumn reports the percentage of data already flagged by binary data flagging (BDF) prior to this task. The reasons for flagging are also displayed visually as a function of time.Flagging agents applied:
Online flags: flags provided by the online system.
Template flags: flags from user-provided
*flagtemplate.txtfiles.Shadow: antennas shadowed by others.
Unwanted intents: scans with intents not required for processing.
Autocorrelation: always disabled (autocorrelations are not used for SD).
Edge channels: leading/trailing channels of each spw.
Pointing outlier (PL2025+): safety-net flag for OFF positions not removed by online flags, which would otherwise cause map creation to crash. A map-size threshold is computed and data points outside it are flagged.
Low transmission: channels with poor atmospheric transmission.
- Parameters:
vis -- The list of input MeasurementSets. Defaults to the list of MeasurementSets defined in the pipeline context.
autocorr --
Flag autocorrelation data.
Default: None (equivalent to False)
shadow --
Flag shadowed antennas.
Default: None (equivalent to True)
scan --
Flag a list of scans and intents specified by scannumber and intents.
Default: None (equivalent to True)
scannumber --
A string containing a comma delimited list of scans to be flagged.
Default: None (equivalent to '')
intents --
A string containing a comma delimited list of intents against which the scans to be flagged are matched. Defaults to intents that are not relevant to pipeline processing.
Example: '*BANDPASS*'
edgespw --
Flag the edge spectral window channels.
Default: None (equivalent to True)
fracspw --
Fraction of the baseline correlator TDM edge channels to be flagged.
Default: None (equivalent to 0.03125)
fracspwfps --
Fraction of the ACA correlator TDM edge channels to be flagged.
Default: None (equivalent to 0.048387)
online --
Apply the online flags.
Default: None (equivalent to True)
fileonline -- File containing the online flags. These are computed by the h_init or hsd_importdata data tasks. If the online flags files are undefined a name of the form 'msname.flagonline.txt' is assumed.
template --
Apply a flagging template.
Default: None (equivalent to True)
filetemplate -- The name of a text file that contains the flagging template for RFI, birdies, telluric lines, etc. If the template flags files is undefined a name of the form 'msname.flagtemplate.txt' is assumed.
pointing --
Apply a flagging template for pointing flag.
Default: None (equivalent to True)
filepointing -- The name of a text file that contains the flagging template for pointing flag. If the template flags files is undefined a name of the form 'msname.flagpointing.txt' is assumed.
incompleteraster --
Apply commands to flag incomplete raster sequence. If this is False, relevant commands in filepointing are simply commented out.
Default: None (equivalent to True)
hm_tbuff --
The heuristic for computing the default time interval padding parameter. The options are 'halfint' and 'manual'. In 'halfint' mode tbuff is set to half the maximum of the median integration time of the science and calibrator target observations.
Default: None (equivalent to 'halfint')
tbuff --
The time in seconds used to pad flagging command time intervals if hm_tbuff='manual'.
Default: None (equivalent to 0.0)
qa0 -- QA0 flags
qa2 -- QA2 flags
parallel --
Execute using CASA HPC functionality, if available.
Options: 'automatic', 'true', 'false', True, False
Default: None (equivalent to 'automatic')
flagbackup --
Back up any pre-existing flags before applying new ones.
Default: None (equivalent to True)
Notes
QA scoring:
Score = 0 if flag fraction >= 60%; Score = 1 if flag fraction <= 5%; linearly interpolated between 0 and 1 for fractions 5%-60%. Applies to
online,shadow,qa0,qa2,before, andtemplateflagging agents.Pointing outlier QA (PL2025+): 1.0 if no pointing outliers detected; 0.83 if outliers detected.
- Returns:
The results object for the pipeline task is returned.
Examples
Do basic flagging on a MeasurementSet:
>>> hsd_flagdata()
Do basic flagging and flag additional scans selected by number:
>>> hsd_flagdata(scannumber='13,18')