Source code for casatools.agentflagger

#
# stub class definition file for docstring parsing
#

[docs]class agentflagger: r""" Tool for manual and automated flagging The *agentflagger* tool performs manual as well as automatic synthesis flagging operations within casapy. The *agentflagger* tool can operate on one measurement set at a time. **Open the Measurement Set or Calibration Table and Attach it to the Tool** The first thing to do is to open the MS or calibration table and attach it to the agentflagger tool. Use the af.open method, which requires the MS name and optionally the time interval, over which to buffer data before running the algorithm. The time interval is set by default to 0.0, which means a 'scan' length. The 'ntime' parameter is important for the modes tfcrop, rflag and extend. ``af.open('uid_X002.ms')`` **Select the Data** Once the MS is open, the next step is to select the data. This step will use the MS selection tool to select the portion of the MS given by the parameters. There are two ways of selecting the data: 1) Create a Python dictionary which internally will be transformed into a record containing the selection parameters: :: # Select the whole MS. af.selectdata() Select a portion of the MS using a dictionary. myrecord={} myrecord['scan']='1~3' myrecord['spw']='0:1~10' af.selectdata(myrecord) 2) Parse the parameter names directly to the function: :: af.selectdata(scan='1~3', spw='0:1~10') **Parse the Parameters for the Flagging Mode(s)** Each flagging mode is called an agent. The available agents are: manual, clip, quack, shadow, elevation, tfcrop, rflag, extend, unflag and summary. Each one of these agents may or may not take configuration parameters and data selection parameters. Once the desired flagging modes are chosen, it is time to give the configuration parameters to the tool. Ommited parameters will take default values as defined in each agent. There are two ways of parsing the agent's parameters. 1) Using the general method af.parseagentparameters(): :: Construct a dictionary with the parameters for each agent. Each agent's parameters should go to a different 'key' of the dictionary. Example: # Create a shadow agent: myagents = {} myagents['mode'] = 'shadow' af.parseagentparameters(myagents) # Add a summary agent to the list. myagents = {} myagents['mode'] = 'summary myagents['spwchan'] = True af.parseagentparameters(myagents) # Add a manual agent to the same internal list of agents. myagents = {} myagents['mode'] = 'manual' myagents['scan'] = '1~3,18~20' af.parseagentparameters(myagents) # Add a clip agent to flag the zero-value data. myagents = {} myagents['mode'] = 'clip' myagents['clipzeros'] = True af.parseagentparameters(myagents) # Add another summary agent to the list. myagents = {} myagents['mode'] = 'summary' myagents['spwchan'] = True af.parseagentparameters(myagents) 2) The other way to parse agent's parameters is to use the convenience functions. The above example would become: :: # Create a shadow agent: af.parseshadowparameters() # Add a summary agent to the list. af.parsesummaryparameters(spwchan=True) # Add a manual agent to the same internal list of agents. af.parsemanualparameters(scan='1~3,18~20') # Add a clip agent to flag the zero-value data. af.parseclipparameters(clipzeros=True) # Add another summary agent to the list. af.parsesummaryparameters(spwchan=True) **Initialize the Agents** The above step create a list of the agents that the tool will use to process the data. This step will check several parameters and apply constraints. It will set the iteration approach to COMBINE_SCANS_MAP_ANTENNA_PAIRS_ONLY if the agent is either tfcrop or extend and combinescans is set to True. Otherwise it will set it to COMPLETE_SCAN_MAP_ANTENNA_PAIRS_ONLY. If the list contains agents that set ntime more than once, this method will get the maximum value of ntime and use it for all agents. If a tfcrop agent is present, this method will create one agent per each polarization available, if correlation is set to ALL. In the same way, if an agent tfcrop, rflag or clip is present, the asyncio mechanism will be switched on. ``af.init()`` **Run the tool** Run the tool to apply or unapply the flags. The run method takes two parameters, writeflags and sequential. The parameter writeflags controls whether to write the flags or not to the MS. By default it is set to True. The sequential parameter tells to apply/unapply the flags in parallel or not. By default it is set to True, which means that the agents will run in sequential. The run method gathers several reports, depending on wich agents are run. The display and summary agents produce reports that can be retrieved from calling the run method. The reports are returned via a Python dictionary. ``myreports = af.run(writeflags=True)`` The dictionary returned in 'myreports' will contain four reports from the two summary agents that were added previously. The first report is the normal summary for each selection parameter. The second report gives the antenna positions for plotting. **Destroy the tool** Do not forget to destroy and close the tool at the end. ``af.done()`` **Rflag specific actions** Currently the agentflagger does not support the 'calculate' and 'apply' actions directly. These actions are distinguished only by the flagdata task. When selecting mode='rflag' the agentflagger will run as 'apply'. The 'calculate' action of the flagdata task can be emulated by setting the tool parameter 'writeflags' to False as follows: :: myagents = {} myagents['mode'] = 'rflag' myagents['writeflags'] = False ... af.parseagentparameters(myagents) Or, in a more compact example, with the following parameters the agentflagger will run as 'apply'. The default value of writeflags (not given) is True: ``af.parseagentparameters({'mode':'rflag', 'extend flags': False})`` But here, by setting writeflags to False, the agentflagger will run as 'calculate'. That is, it will not flag the MS, but it will calculate and return the thresholds: ``af.parseagentparameters({'mode':'rflag', 'extend flags': False, writeflags=False})`` Note that the writeflags parameter needs to be passed in the set of parameters that are parsed initially, before running the agentflagger, for the agentflagger to be able to calculate the RFlag thresholds and return a dictionary with the values calculated. """
[docs] def agentflagger(self): r""" Create a \*agentflagger\* tool, and initialize some variables. """ pass
[docs] def done(self): r""" Destroy the flag tool """ pass
[docs] def open(self, msname='', ntime=0.0): r""" Open the MS or a calibration table and attach it to the tool. .. rubric:: Parameters - ``msname (string='')`` - Measurement set or calibration table to be processed. Default: - ``ntime (double=0.0)`` - Time interval. If not given, the default will be used. Default: .. rubric:: Returns ``bool`` .. rubric:: Examples :: af.open(msname,ntime) """ pass
[docs] def selectdata(self, config='', field='', spw='', array='', feed='', scan='', antenna='', uvrange='', timerange='', correlation='', intent='', observation=''): r""" Select the data based on the given parameters. For unspecified parameters, the full data range is assumed. All data selection parameters follow the MS Selection syntax. .. rubric:: Parameters - ``config (record='')`` - The record (dictionary) config may be given or not. If it is not given, and no specific parameter is given either, the whole MS will be selected. The record may contain any data selection parameters supported by MS Selection such as: - ``field (string='')`` - Field indices or source names : example : '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names : example : '1,2' - ``array (string='')`` - Array Indices or names : example : 'VLAA' - ``feed (string='')`` - Feed index or name : example : '1,2' (not supported yet) - ``scan (string='')`` - Scan number : example : '1,2,3' - ``antenna (string='')`` - Baseline number : example : '2,3,4,5' - ``uvrange (string='')`` - UV-distance range, with a unit : example : '2.0-3000.0 m' - ``timerange (string='')`` - Time range, as MJDs or date strings : example : 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations : example : 'RR,LL,RL,LR,XX,YY,XY,YX,Sol1' - ``intent (string='')`` - Scan intent : example : '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id : example : '2~4' .. rubric:: Returns ``bool`` .. rubric:: Examples :: Select the whole MS af.selectdata() Select a portion of the MS myrecord={} myrecord['scan']='1~3' myrecord['spw']='0:1~10' af.selectdata(myrecord) Another way to select a portion of the MS af.selectdata(scan='3~5', spw='0') """ pass
[docs] def parseagentparameters(self, aparams=''): r""" The specific data selection parameters for the agent (flagging mode) are parsed. These parameters are the data selection and mode-specific parameters. See the example below: .. rubric:: Parameters - ``aparams (record='')`` - It takes a record (dictionary) with the specific parameters for the flagging mode. The record may contain any data selection parameters supported by MS Selection, as well as mode-specific parameters such as: (1) array,feed,scan,field,spw,intent,correlation,antenna,uvrange,observation (2) mode (which can be: manual,clip,quack,shadow,elevation,tfcrop,extendflags,unflag or summary) . For flagging mode=clip, the parameters are: expression, datacolumn, clipminmax, etc. . See the documentation of the task flagdata for all the available parameters for each mode.\n (3) apply: default is True (True for flagging and False for unflagging) Example: myrecord={} myrecord['mode']='clip' myrecord['scan']='1~3' myrecord['clipminmax']=[0.02,0.3] myrecord['apply']=True af.parseagentparameters(myrecord) .. rubric:: Returns ``bool`` .. rubric:: Examples :: myrecord={} myrecord['mode']='clip' myrecord['scan']='1~3' myrecord['clipminmax']=[0.02,0.3] myrecord['apply']=True af.parseagentparameters(myrecord) """ pass
[docs] def init(self): r""" This method will initialize the agents and create a list of agents with their specific parameters. It takes no parameters. """ pass
[docs] def run(self, writeflags=True, sequential=True): r""" Execute a list of flagging agents and write or not to the MS/cal table. The parameter writeflags controls whether or not to write to the MS. .. rubric:: Parameters - ``writeflags (bool=True)`` - Write flags to MS (default: True) - ``sequential (bool=True)`` - Run the agents in the order they are inserted in the list or not. Default is True to run in the original order. .. rubric:: Returns ``record`` .. rubric:: Examples :: af.run() """ pass
[docs] def getflagversionlist(self, printflags=True): r""" Print out the list of flag versions in the MS, unless the parameter printflags=False. The list of names is returned. .. rubric:: Parameters - ``printflags (bool=True)`` - Print flagversions in logger? .. rubric:: Returns ``stringVec`` """ pass
[docs] def printflagselection(self): r""" Print out a list of current flag selections. """ pass
[docs] def saveflagversion(self, versionname='', comment='', merge=''): r""" Save current flags with a version name. .. rubric:: Parameters - ``versionname (string='')`` - Version name - ``comment (string='')`` - Comment for this flag table - ``merge (string='')`` - merge type .. rubric:: Returns ``bool`` """ pass
[docs] def restoreflagversion(self, versionname='', merge=''): r""" Restore flags from a saved flag_version. \n versionname : name of flag version to restore to main table \n merge : Type of operation to perform during restoration. \n merge = replace : replaces the main table flags. \n merge = and : logical AND with main table flags \n merge = or : logical OR with main table flags \n Default : replace. .. rubric:: Parameters - ``versionname (stringVec='')`` - Version name - ``merge (string='')`` - merge type .. rubric:: Returns ``bool`` """ pass
[docs] def deleteflagversion(self, versionname=''): r""" Delete a saved flag_version. .. rubric:: Parameters - ``versionname (stringVec='')`` - Version name .. rubric:: Returns ``bool`` """ pass
[docs] def parsemanualparameters(self, field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', autocorr=False, apply=True): r""" Parse data selection parameters and specific parameters for the manual mode. Data selection follows the MS Selection syntax. .. rubric:: Parameters - ``field (string='')`` - Field indices or source names. Example: '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names. Example: '1,2' - ``array (string='')`` - Array Indices or names. Example: 'VLAA' - ``feed (string='')`` - Feed index or name. Example: '1,2' (not supported yet) - ``scan (string='')`` - Scan number. Example: '1,2,3' - ``antenna (string='')`` - Baseline number. Example: '2,3,4,5,132' - ``uvrange (string='')`` - UV-distance range, with a unit. Example: '2.0-3000.0 m' - ``time (string='')`` - Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' - ``intent (string='')`` - Scan intent. Example: '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id. Example: '2~4' - ``autocorr (bool=False)`` - Parameter to flag only auto-correlations. Default: - ``apply (bool=True)`` - Parameter to flag or unflag the data. Default: .. rubric:: Returns ``bool`` .. rubric:: Examples :: af.parsemanualparameters(autocorr=True) """ pass
[docs] def parseclipparameters(self, field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', datacolumn='DATA', clipminmax='', clipoutside=True, channelavg=False, chanbin=1, timeavg=False, timebin='', clipzeros=False, apply=True): r""" Parse data selection parameters and specific parameters for the clip mode. Data selection follows the MS Selection syntax. .. rubric:: Parameters - ``field (string='')`` - Field indices or source names. Example: '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names. Example: '1,2' - ``array (string='')`` - Array Indices or names. Example: 'VLAA' - ``feed (string='')`` - Feed index or name. Example: '1,2' (not supported yet) - ``scan (string='')`` - Scan number. Example: '1,2,3' - ``antenna (string='')`` - Baseline number. Example: '2,3,4,5' - ``uvrange (string='')`` - UV-distance range, with a unit. Example: '2.0-3000.0 m' - ``time (string='')`` - Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' - ``intent (string='')`` - Scan intent. Example: '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id. Example: '2~4' - ``datacolumn (string='DATA')`` - Data column to use for clipping. Supported columns for cal tables are FPARAM,CPARAM,SNR. Example: 'DATA'. Default: - ``clipminmax (doubleVec='')`` - Range to use for clipping. Example: [100.0,200.0] - ``clipoutside (bool=True)`` - Clip points outside this range? [True/False]. Default: - ``channelavg (bool=False)`` - Average data over channels before clipping? [True/False]. Default: - ``chanbin ({int, intVec}=1)`` - Width (bin) of input channels to average to form an output channel. - ``timeavg (bool=False)`` - Average data over time ranges. [True/False]. Default: - ``timebin (string='')`` - Bin width for time average. Example: '2s' - ``clipzeros (bool=False)`` - Clip zero-value data. [True/False]. Default: - ``apply (bool=True)`` - Parameter to flag or unflag data. Default: .. rubric:: Returns ``bool`` .. rubric:: Examples :: The correlation parameter can be used with an operator for the clip mode. The operator should be written only once and it will affect all the polarizations given in the string. See the example below: af.parseclipparameters(clipzeros=True, clipminmax=[0.,4.], correlation='ABS_XX,XY') or for a calibration table: af.parseclipparameters(clipzeros=True, clipminmax=[0.,4.], correlation='Sol1') """ pass
[docs] def parsequackparameters(self, field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', quackmode='beg', quackinterval=1.0, quackincrement=False, apply=True): r""" Parse data selection parameters and specific parameters for the quack mode. Data selection follows the MS Selection syntax. .. rubric:: Parameters - ``field (string='')`` - Field indices or source names. Example: '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names. Example: '1,2' - ``array (string='')`` - Array Indices or names. Example: 'VLAA' - ``feed (string='')`` - Feed index or name. Example: '1,2' (not supported yet) - ``scan (string='')`` - Scan number. Example: '1,2,3' - ``antenna (string='')`` - Baseline number. Example: '2,3,4,5' - ``uvrange (string='')`` - UV-distance range, with a unit. Example: '2.0-3000.0 m' - ``time (string='')`` - Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' - ``intent (string='')`` - Scan intent. Example: '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id. Example: '2~4' - ``quackmode (string='beg')`` - Quack mode. Default: - ``quackinterval (double=1.0)`` - Quack length in seconds. Default: - ``quackincrement (bool=False)`` - Increment quack flagging in time taking into account flagged data or not. Default: - ``apply (bool=True)`` - Parameter to flag or unflag the data. Default: .. rubric:: Returns ``bool`` .. rubric:: Examples :: af.parsequackparameters(scan='1~3', quackmode='beg', quackinterval=1) """ pass
[docs] def parseelevationparameters(self, field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', lowerlimit=0.0, upperlimit=90.0, apply=True): r""" Parse data selection parameters and specific parameters for the elevation mode. Data selection follows the MS Selection syntax. .. rubric:: Parameters - ``field (string='')`` - Field indices or source names. Example: '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names. Example: '1,2' - ``array (string='')`` - Array Indices or names. Example: 'VLAA' - ``feed (string='')`` - Feed index or name. Example: '1,2' (not supported yet) - ``scan (string='')`` - Scan number. Example: '1,2,3' - ``antenna (string='')`` - Baseline number. Example: '2,3,4,5' - ``uvrange (string='')`` - UV-distance range, with a unit. Example: '2.0-3000.0 m' - ``time (string='')`` - Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' - ``intent (string='')`` - Scan intent. Example: '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id. Example: '2~4' - ``lowerlimit (double=0.0)`` - The limiting elevation in degrees. Data obtained at lower antenna elevations will get flagged. Default: - ``upperlimit (double=90.0)`` - The limiting elevation in degrees. Data obtained at higher antenna elevations will get flagged. Default: - ``apply (bool=True)`` - Parameter to flag or unflag the data. Default: .. rubric:: Returns ``bool`` .. rubric:: Examples :: To unflag, set the apply parameter. af.parseelevationparameters(upperlimit=50.,lowerlimit=10.0, apply=False) """ pass
[docs] def parsetfcropparameters(self, field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', ntime=0.0, combinescans=False, datacolumn='DATA', timecutoff=4.0, freqcutoff=3.0, timefit='line', freqfit='poly', maxnpieces=7, flagdimension='freqtime', usewindowstats='none', halfwin=1, extendflags=True, apply=True, channelavg=False, chanbin=1, timeavg=False, timebin=''): r""" Parse data selection parameters and specific parameters for the time and frequency mode. Data selection follows the MS Selection syntax. .. rubric:: Parameters - ``field (string='')`` - Field indices or source names. Example: '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names. Example: '1,2' - ``array (string='')`` - Array Indices or names. Example: 'VLAA' - ``feed (string='')`` - Feed index or name. Example: '1,2' (not supported yet) - ``scan (string='')`` - Scan number. Example: '1,2,3' - ``antenna (string='')`` - Baseline number. Example: '2,3,4,5' - ``uvrange (string='')`` - UV-distance range, with a unit. Example: '2.0-3000.0 m' - ``time (string='')`` - Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' - ``intent (string='')`` - Scan intent. Example: '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id. Example: '2~4' - ``ntime (double=0.0)`` - Time-range to use for each chunk (in seconds or minutes). Default: - ``combinescans (bool=False)`` - Accumulate data across scans depending on the value of ntime. Default: - ``datacolumn (string='DATA')`` - Data column to use for clipping. Example: 'DATA'. Default: - ``timecutoff (double=4.0)`` - Flagging thresholds in units of deviation from the fit. Default: - ``freqcutoff (double=3.0)`` - Flagging thresholds in units of deviation from the fit. Default: - ``timefit (string='line')`` - Fitting function for the time direction (poly/line). Default: - ``freqfit (string='poly')`` - Fitting function for the frequency direction (poly/line). Default: - ``maxnpieces (int=7)`` - Number of pieces in the polynomial-fits (for \'freqfit\' or \'timefit\' = \'poly\'). Default: - ``flagdimension (string='freqtime')`` - Dimensions along which to calculate fits (freq/time/freqtime/timefreq). Default: - ``usewindowstats (string='none')`` - Calculate additional flags using sliding window statistics (none,sum,std,both). Default: - ``halfwin (int=1)`` - Half-width of sliding window to use with \'usewindowstats\' (1,2,3). Default: - ``extendflags (bool=True)`` - Extend the flags in time, frequency and correlations. Default: - ``apply (bool=True)`` - Parameter to flag or unflag the data. Default: - ``channelavg (bool=False)`` - Average data over channels before clipping? [True/False]. Default: - ``chanbin ({int, intVec}=1)`` - Width (bin) of input channels to average to form an output channel. - ``timeavg (bool=False)`` - Average data over time ranges. [True/False]. Default: - ``timebin (string='')`` - Bin width for time average. Example: '2s' .. rubric:: Returns ``bool`` .. rubric:: Examples :: The correlation parameter can be used with an operator for the tfcrop mode. The operator should be written only once and it will affect all the polarizations given in the string. Note that if ntime='scan' and combinescans=True, all the scans will be loaded at once, thus requesting a lot of memory depending on the available spws. The parameter combinescans should be set to True only when ntime is specified as a time-interval (not 'scan'). By default, the flags will be extended in time, if more than 50\% of the timeranges are flagged, 80\% of the channels are flagged and it will extend to other polarizations too. This is similar to running the extend mode after running tfcrop on the MS. af.parsetfcropparameters(spw='9', ntime=10.0, combinescans=True, correlation='ABS_XX,XY', extendflags=True) """ pass
[docs] def parseantintparameters(self, field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', antint_ref_antenna='', minchanfrac=0.6, verbose=False, apply=True): r""" Parse data selection parameters and specific parameters for the antint mode. Data selection follows the MS Selection syntax. .. rubric:: Parameters - ``field (string='')`` - Field indices or source names. Example: '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names. Example: '1,2' - ``array (string='')`` - Array Indices or names. Example: 'VLAA' - ``feed (string='')`` - Feed index or name. Example: '1,2' (not supported yet) - ``scan (string='')`` - Scan number. Example: '1,2,3' - ``antenna (string='')`` - Baseline number. Example: '2,3,4,5' - ``uvrange (string='')`` - UV-distance range, with a unit. Example: '2.0-3000.0 m' - ``time (string='')`` - Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' - ``intent (string='')`` - Scan intent. Example: '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id. Example: '2~4' - ``antint_ref_antenna (string='')`` - Antenna for which the fractions of channels flagged will be checked. - ``minchanfrac (double=0.6)`` - Minimum fraction of flagged channels required for a baseline to be deemed as flagged. Default: - ``verbose (bool=False)`` - Print timestamps of flagged integrations to the log. Default: - ``apply (bool=True)`` - Parameter to flag or unflag the data. Default: .. rubric:: Returns ``bool`` .. rubric:: Examples :: af.parseantintparameters(antint_ref_antenna='ea10', minchanfrac=0.45, verbose=True) """ pass
[docs] def parseextendparameters(self, field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', ntime=0.0, combinescans=False, extendpols=True, growtime=50.0, growfreq=50.0, growaround=False, flagneartime=False, flagnearfreq=False, apply=True): r""" Parse data selection parameters and specific parameters for the extend mode. Data selection follows the MS Selection syntax. .. rubric:: Parameters - ``field (string='')`` - Field indices or source names. Example: '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names. Example: '1,2' - ``array (string='')`` - Array Indices or names. Example: 'VLAA' - ``feed (string='')`` - Feed index or name. Example: '1,2' (not supported yet) - ``scan (string='')`` - Scan number. Example: '1,2,3' - ``antenna (string='')`` - Baseline number. Example: '2,3,4,5' - ``uvrange (string='')`` - UV-distance range, with a unit. Example: '2.0-3000.0 m' - ``time (string='')`` - Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' - ``intent (string='')`` - Scan intent. Example: '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id. Example: '2~4' - ``ntime (double=0.0)`` - Time-range to use for each chunk (in seconds or minutes). Default: - ``combinescans (bool=False)`` - Accumulate data across scans.. Default: - ``extendpols (bool=True)`` - If any correlation is flagged, flag all correlations. Default: - ``growtime (double=50.0)`` - Flag all \'ntime\' integrations if more than X\% of the timerange is flagged (0-100). Default: - ``growfreq (double=50.0)`` - Flag all selected channels if more than X\% of the frequency range is flagged(0-100). Default: - ``growaround (bool=False)`` - Flag data based on surrounding flags. Default: - ``flagneartime (bool=False)`` - Flag one timestep before and after a flagged one. Default: - ``flagnearfreq (bool=False)`` - Flag one channel before and after a flagged one. Default: - ``apply (bool=True)`` - Parameter to flag or unflag the data. Default: .. rubric:: Returns ``bool`` .. rubric:: Examples :: af.parseextendparameters(extendpols=True) """ pass
[docs] def parsesummaryparameters(self, field='', spw='', array='', feed='', scan='', antenna='', uvrange='', time='', correlation='', intent='', observation='', spwchan=False, spwcorr=False, basecnt=False, fieldcnt=False, name=''): r""" Parse data selection parameters and specific parameters for the summary mode. Data selection follows the MS Selection syntax. .. rubric:: Parameters - ``field (string='')`` - Field indices or source names. Example: '2,3C48' - ``spw (string='')`` - Spectral Window Indices or names. Example: '1,2' - ``array (string='')`` - Array Indices or names. Example: 'VLAA' - ``feed (string='')`` - Feed index or name. Example: '1,2' (not supported yet) - ``scan (string='')`` - Scan number. Example: '1,2,3' - ``antenna (string='')`` - Baseline number. Example: '2,3,4,5' - ``uvrange (string='')`` - UV-distance range, with a unit. Example: '2.0-3000.0 m' - ``time (string='')`` - Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' - ``correlation (string='')`` - Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' - ``intent (string='')`` - Scan intent. Example: '*CAL*, *BAND*' - ``observation (string='')`` - Observation Id. Example: '2~4' - ``spwchan (bool=False)`` - List the number of flags per spw and per channel. Default: - ``spwcorr (bool=False)`` - List the number of flags per spw and per correlation. Default: - ``basecnt (bool=False)`` - List the number of flags per baseline. Default: - ``fieldcnt (bool=False)`` - List the number of flags per field. Default: - ``name (string='')`` - Name of this summary report. Default: summary .. rubric:: Returns ``bool`` .. rubric:: Examples :: af.parsesummaryparameters(spwchan=True, basecnt=True) """ pass