Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/__casac__/agentflagger.py: 58%

130 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-10-31 17:39 +0000

1# This file was automatically generated by SWIG (http://www.swig.org). 

2# Version 3.0.12 

3# 

4# Do not make changes to this file unless you know what you are doing--modify 

5# the SWIG interface file instead. 

6 

7from sys import version_info as _swig_python_version_info 

8if _swig_python_version_info >= (2, 7, 0): 

9 def swig_import_helper(): 

10 import importlib 

11 pkg = __name__.rpartition('.')[0] 

12 mname = '.'.join((pkg, '_agentflagger')).lstrip('.') 

13 try: 

14 return importlib.import_module(mname) 

15 except ImportError: 

16 return importlib.import_module('_agentflagger') 

17 _agentflagger = swig_import_helper() 

18 del swig_import_helper 

19elif _swig_python_version_info >= (2, 6, 0): 

20 def swig_import_helper(): 

21 from os.path import dirname 

22 import imp 

23 fp = None 

24 try: 

25 fp, pathname, description = imp.find_module('_agentflagger', [dirname(__file__)]) 

26 except ImportError: 

27 import _agentflagger 

28 return _agentflagger 

29 try: 

30 _mod = imp.load_module('_agentflagger', fp, pathname, description) 

31 finally: 

32 if fp is not None: 

33 fp.close() 

34 return _mod 

35 _agentflagger = swig_import_helper() 

36 del swig_import_helper 

37else: 

38 import _agentflagger 

39del _swig_python_version_info 

40 

41try: 

42 _swig_property = property 

43except NameError: 

44 pass # Python < 2.2 doesn't have 'property'. 

45 

46try: 

47 import builtins as __builtin__ 

48except ImportError: 

49 import __builtin__ 

50 

51def _swig_setattr_nondynamic(self, class_type, name, value, static=1): 

52 if (name == "thisown"): 

53 return self.this.own(value) 

54 if (name == "this"): 

55 if type(value).__name__ == 'SwigPyObject': 

56 self.__dict__[name] = value 

57 return 

58 method = class_type.__swig_setmethods__.get(name, None) 

59 if method: 

60 return method(self, value) 

61 if (not static): 

62 if _newclass: 

63 object.__setattr__(self, name, value) 

64 else: 

65 self.__dict__[name] = value 

66 else: 

67 raise AttributeError("You cannot add attributes to %s" % self) 

68 

69 

70def _swig_setattr(self, class_type, name, value): 

71 return _swig_setattr_nondynamic(self, class_type, name, value, 0) 

72 

73 

74def _swig_getattr(self, class_type, name): 

75 if (name == "thisown"): 

76 return self.this.own() 

77 method = class_type.__swig_getmethods__.get(name, None) 

78 if method: 

79 return method(self) 

80 raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) 

81 

82 

83def _swig_repr(self): 

84 try: 

85 strthis = "proxy of " + self.this.__repr__() 

86 except __builtin__.Exception: 

87 strthis = "" 

88 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 

89 

90try: 

91 _object = object 

92 _newclass = 1 

93except __builtin__.Exception: 

94 class _object: 

95 pass 

96 _newclass = 0 

97 

98class agentflagger(_object): 

99 """Proxy of C++ casac::agentflagger class.""" 

100 

101 __swig_setmethods__ = {} 

102 __setattr__ = lambda self, name, value: _swig_setattr(self, agentflagger, name, value) 

103 __swig_getmethods__ = {} 

104 __getattr__ = lambda self, name: _swig_getattr(self, agentflagger, name) 

105 __repr__ = _swig_repr 

106 

107 def __init__(self): 

108 """__init__(self) -> agentflagger""" 

109 this = _agentflagger.new_agentflagger() 

110 try: 

111 self.this.append(this) 

112 except __builtin__.Exception: 

113 self.this = this 

114 

115 def done(self): 

116 """ 

117 done(self) -> bool 

118 

119 

120 

121 Summary: 

122 Destroy the flag tool 

123 

124 Example: 

125 

126 af.done() 

127 

128 -------------------------------------------------------------------------------- 

129 

130 """ 

131 return _agentflagger.agentflagger_done(self) 

132 

133 

134 def open(self, *args, **kwargs): 

135 """ 

136 open(self, _msname, _ntime) -> bool 

137 

138 

139 

140 Summary: 

141 Open the MS or a calibration table and attach it to the tool. 

142 

143 Input Parameters: 

144 msname Measurement set or calibration table to be processed. Default: 

145 ntime Time interval. If not given, the default will be used. Default: 

146 

147 Example: 

148 

149 af.open(msname,ntime) 

150 

151 -------------------------------------------------------------------------------- 

152 

153 """ 

154 return _agentflagger.agentflagger_open(self, *args, **kwargs) 

155 

156 

157 def selectdata(self, *args, **kwargs): 

158 """ 

159 selectdata(self, _config, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _timerange, _correlation, _intent, _observation) -> bool 

160 

161 

162 

163 Summary: 

164 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.  

165 

166 Input Parameters: 

167 config 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:  

168 field Field indices or source names : example : '2,3C48' 

169 spw Spectral Window Indices or names : example : '1,2' 

170 array Array Indices or names : example : 'VLAA' 

171 feed Feed index or name : example : '1,2' (not supported yet) 

172 scan Scan number : example : '1,2,3' 

173 antenna Baseline number : example : '2,3,4,5' 

174 uvrange UV-distance range, with a unit : example : '2.0-3000.0 m' 

175 timerange Time range, as MJDs or date strings : example : 'xx.x.x.x.x~yy.y.y.y.y' 

176 correlation Correlations/polarizations : example : 'RR,LL,RL,LR,XX,YY,XY,YX,Sol1' 

177 intent Scan intent : example : '*CAL*, *BAND*' 

178 observation Observation Id : example : '2~4' 

179 

180 Example: 

181 

182 Select the whole MS 

183 af.selectdata() 

184 

185 Select a portion of the MS 

186 myrecord={} 

187 myrecord['scan']='1~3' 

188 myrecord['spw']='0:1~10' 

189 af.selectdata(myrecord) 

190 

191 Another way to select a portion of the MS 

192 af.selectdata(scan='3~5', spw='0') 

193 

194 -------------------------------------------------------------------------------- 

195 

196 """ 

197 return _agentflagger.agentflagger_selectdata(self, *args, **kwargs) 

198 

199 

200 def parseagentparameters(self, *args, **kwargs): 

201 """ 

202 parseagentparameters(self, _aparams) -> bool 

203 

204 

205 

206 Summary: 

207 Parse the parameters for the agent (flagging mode). 

208 

209 Description: 

210 

211 The specific data selection parameters for the agent (flagging mode) 

212 are parsed. These parameters are the data selection and mode-specific parameters. 

213 See the example below: 

214 

215 Input Parameters: 

216 aparams 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)  

217 

218 Example: 

219 

220 myrecord={} 

221 myrecord['mode']='clip' 

222 myrecord['scan']='1~3' 

223 myrecord['clipminmax']=[0.02,0.3] 

224 myrecord['apply']=True 

225 af.parseagentparameters(myrecord) 

226 

227 -------------------------------------------------------------------------------- 

228 

229 """ 

230 return _agentflagger.agentflagger_parseagentparameters(self, *args, **kwargs) 

231 

232 

233 def init(self): 

234 """ 

235 init(self) -> bool 

236 

237 

238 

239 Summary: 

240 Initialize the agents 

241 

242 Description: 

243 

244 This method will initialize the agents and create a list of agents 

245 with their specific parameters. It takes no parameters. 

246 

247 Example: 

248 

249 af.init() 

250 

251 -------------------------------------------------------------------------------- 

252 

253 """ 

254 return _agentflagger.agentflagger_init(self) 

255 

256 

257 def run(self, *args, **kwargs): 

258 """ 

259 run(self, _writeflags, _sequential) -> record * 

260 

261 

262 

263 Summary: 

264 Execute a list of flagging agents 

265 

266 Description: 

267 

268 

269 Execute a list of flagging agents and write or not to the MS/cal table. The parameter 

270 writeflags controls whether or not to write to the MS. 

271 

272 Input Parameters: 

273 writeflags Write flags to MS (default: True) 

274 sequential Run the agents in the order they are inserted in the list or not. Default is True to run in the original order. 

275 

276 Example: 

277 

278 af.run() 

279 

280 -------------------------------------------------------------------------------- 

281 

282 """ 

283 return _agentflagger.agentflagger_run(self, *args, **kwargs) 

284 

285 

286 def getflagversionlist(self, *args, **kwargs): 

287 """ 

288 getflagversionlist(self, _printflags) -> std::vector< std::string > 

289 

290 

291 

292 Summary: 

293 Print out a list of saved flag_versions. 

294 

295 Description: 

296 

297 

298 Print out the list of flag versions in the MS, unless the parameter printflags=False. The list of names is returned. 

299 

300 Input Parameters: 

301 printflags Print flagversions in logger? 

302 

303 -------------------------------------------------------------------------------- 

304 

305 """ 

306 return _agentflagger.agentflagger_getflagversionlist(self, *args, **kwargs) 

307 

308 

309 def printflagselection(self): 

310 """ 

311 printflagselection(self) -> bool 

312 

313 

314 

315 Summary: 

316 Print out a list of current flag selections.  

317 

318 Description: 

319 

320 

321 Print out a list of current flag selections. 

322 

323 -------------------------------------------------------------------------------- 

324 

325 """ 

326 return _agentflagger.agentflagger_printflagselection(self) 

327 

328 

329 def saveflagversion(self, *args, **kwargs): 

330 """ 

331 saveflagversion(self, _versionname, _comment, _merge) -> bool 

332 

333 

334 

335 Summary: 

336 Save current flags with a version name.  

337 

338 Input Parameters: 

339 versionname Version name 

340 comment Comment for this flag table 

341 merge merge type 

342 

343 -------------------------------------------------------------------------------- 

344 

345 """ 

346 return _agentflagger.agentflagger_saveflagversion(self, *args, **kwargs) 

347 

348 

349 def restoreflagversion(self, *args, **kwargs): 

350 """ 

351 restoreflagversion(self, _versionname, _merge) -> bool 

352 

353 

354 

355 Summary: 

356 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.  

357 

358 Input Parameters: 

359 versionname Version name 

360 merge merge type 

361 

362 -------------------------------------------------------------------------------- 

363 

364 """ 

365 return _agentflagger.agentflagger_restoreflagversion(self, *args, **kwargs) 

366 

367 

368 def deleteflagversion(self, *args, **kwargs): 

369 """ 

370 deleteflagversion(self, _versionname) -> bool 

371 

372 

373 

374 Summary: 

375 Delete a saved flag_version. 

376 

377 Input Parameters: 

378 versionname Version name 

379 

380 -------------------------------------------------------------------------------- 

381 

382 """ 

383 return _agentflagger.agentflagger_deleteflagversion(self, *args, **kwargs) 

384 

385 

386 def parsemanualparameters(self, *args, **kwargs): 

387 """ 

388 parsemanualparameters(self, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _time, _correlation, _intent, _observation, _autocorr, _apply) -> bool 

389 

390 

391 

392 Summary: 

393 Parse data selection parameters and specific parameters for the manual mode. Data selection follows the MS Selection syntax.  

394 

395 Input Parameters: 

396 field Field indices or source names. Example: '2,3C48' 

397 spw Spectral Window Indices or names. Example: '1,2' 

398 array Array Indices or names. Example: 'VLAA' 

399 feed Feed index or name. Example: '1,2' (not supported yet) 

400 scan Scan number. Example: '1,2,3' 

401 antenna Baseline number. Example: '2,3,4,5,132' 

402 uvrange UV-distance range, with a unit. Example: '2.0-3000.0 m' 

403 time Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 

404 correlation Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 

405 intent Scan intent. Example: '*CAL*, *BAND*' 

406 observation Observation Id. Example: '2~4' 

407 autocorr Parameter to flag only auto-correlations. Default: 

408 apply Parameter to flag or unflag the data. Default: 

409 

410 Example: 

411 

412 af.parsemanualparameters(autocorr=True) 

413 

414 -------------------------------------------------------------------------------- 

415 

416 """ 

417 return _agentflagger.agentflagger_parsemanualparameters(self, *args, **kwargs) 

418 

419 

420 def parseclipparameters(self, *args, **kwargs): 

421 """ 

422 parseclipparameters(self, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _time, _correlation, _intent, _observation, _datacolumn, _clipminmax, _clipoutside, _channelavg, _chanbin, _timeavg, _timebin, _clipzeros, _apply) -> bool 

423 

424 

425 

426 Summary: 

427 Parse data selection parameters and specific parameters for the clip mode. Data selection follows the MS Selection syntax.  

428 

429 Input Parameters: 

430 field Field indices or source names. Example: '2,3C48' 

431 spw Spectral Window Indices or names. Example: '1,2' 

432 array Array Indices or names. Example: 'VLAA' 

433 feed Feed index or name. Example: '1,2' (not supported yet) 

434 scan Scan number. Example: '1,2,3' 

435 antenna Baseline number. Example: '2,3,4,5' 

436 uvrange UV-distance range, with a unit. Example: '2.0-3000.0 m' 

437 time Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 

438 correlation Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 

439 intent Scan intent. Example: '*CAL*, *BAND*' 

440 observation Observation Id. Example: '2~4' 

441 datacolumn Data column to use for clipping. Supported columns for cal tables are FPARAM,CPARAM,SNR. Example: 'DATA'. Default:  

442 clipminmax Range to use for clipping. Example: [100.0,200.0]  

443 clipoutside Clip points outside this range? [True/False]. Default:  

444 channelavg Average data over channels before clipping? [True/False]. Default:  

445 chanbin Width (bin) of input channels to average to form an output channel. 

446 timeavg Average data over time ranges. [True/False]. Default:  

447 timebin Bin width for time average. Example: '2s' 

448 clipzeros Clip zero-value data. [True/False]. Default:  

449 apply Parameter to flag or unflag data. Default: 

450 

451 Example: 

452 

453 The correlation parameter can be used with an operator for the clip mode. 

454 The operator should be written only once and it will affect all the polarizations 

455 given in the string. See the example below: 

456 

457 af.parseclipparameters(clipzeros=True, clipminmax=[0.,4.], correlation='ABS_XX,XY') 

458 

459 or for a calibration table: 

460 af.parseclipparameters(clipzeros=True, clipminmax=[0.,4.], correlation='Sol1') 

461 

462 -------------------------------------------------------------------------------- 

463 

464 """ 

465 return _agentflagger.agentflagger_parseclipparameters(self, *args, **kwargs) 

466 

467 

468 def parsequackparameters(self, *args, **kwargs): 

469 """ 

470 parsequackparameters(self, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _time, _correlation, _intent, _observation, _quackmode, _quackinterval, _quackincrement, _apply) -> bool 

471 

472 

473 

474 Summary: 

475 Parse data selection parameters and specific parameters for the quack mode. Data selection follows the MS Selection syntax.  

476 

477 Input Parameters: 

478 field Field indices or source names. Example: '2,3C48' 

479 spw Spectral Window Indices or names. Example: '1,2' 

480 array Array Indices or names. Example: 'VLAA' 

481 feed Feed index or name. Example: '1,2' (not supported yet) 

482 scan Scan number. Example: '1,2,3' 

483 antenna Baseline number. Example: '2,3,4,5' 

484 uvrange UV-distance range, with a unit. Example: '2.0-3000.0 m' 

485 time Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 

486 correlation Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 

487 intent Scan intent. Example: '*CAL*, *BAND*' 

488 observation Observation Id. Example: '2~4' 

489 quackmode Quack mode. Default: 

490 quackinterval Quack length in seconds. Default: 

491 quackincrement Increment quack flagging in time taking into account flagged data or not. Default: 

492 apply Parameter to flag or unflag the data. Default: 

493 

494 Example: 

495 

496 af.parsequackparameters(scan='1~3', quackmode='beg', quackinterval=1) 

497 

498 -------------------------------------------------------------------------------- 

499 

500 """ 

501 return _agentflagger.agentflagger_parsequackparameters(self, *args, **kwargs) 

502 

503 

504 def parseelevationparameters(self, *args, **kwargs): 

505 """ 

506 parseelevationparameters(self, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _time, _correlation, _intent, _observation, _lowerlimit, _upperlimit, _apply) -> bool 

507 

508 

509 

510 Summary: 

511 Parse data selection parameters and specific parameters for the elevation mode. Data selection follows the MS Selection syntax.  

512 

513 Input Parameters: 

514 field Field indices or source names. Example: '2,3C48' 

515 spw Spectral Window Indices or names. Example: '1,2' 

516 array Array Indices or names. Example: 'VLAA' 

517 feed Feed index or name. Example: '1,2' (not supported yet) 

518 scan Scan number. Example: '1,2,3' 

519 antenna Baseline number. Example: '2,3,4,5' 

520 uvrange UV-distance range, with a unit. Example: '2.0-3000.0 m' 

521 time Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 

522 correlation Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 

523 intent Scan intent. Example: '*CAL*, *BAND*' 

524 observation Observation Id. Example: '2~4' 

525 lowerlimit The limiting elevation in degrees. Data obtained at lower antenna elevations will get flagged. Default:  

526 upperlimit The limiting elevation in degrees. Data obtained at higher antenna elevations will get flagged. Default:  

527 apply Parameter to flag or unflag the data. Default: 

528 

529 Example: 

530 

531 To unflag, set the apply parameter. 

532 af.parseelevationparameters(upperlimit=50.,lowerlimit=10.0, apply=False) 

533 

534 -------------------------------------------------------------------------------- 

535 

536 """ 

537 return _agentflagger.agentflagger_parseelevationparameters(self, *args, **kwargs) 

538 

539 

540 def parsetfcropparameters(self, *args, **kwargs): 

541 """ 

542 parsetfcropparameters(self, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _time, _correlation, _intent, _observation, _ntime, _combinescans, _datacolumn, _timecutoff, _freqcutoff, _timefit, _freqfit, _maxnpieces, _flagdimension, _usewindowstats, _halfwin, _extendflags, _apply, _channelavg, _chanbin, _timeavg, _timebin) -> bool 

543 

544 

545 

546 Summary: 

547 Parse data selection parameters and specific parameters for the time and frequency mode. Data selection follows the MS Selection syntax.  

548 

549 Input Parameters: 

550 field Field indices or source names. Example: '2,3C48' 

551 spw Spectral Window Indices or names. Example: '1,2' 

552 array Array Indices or names. Example: 'VLAA' 

553 feed Feed index or name. Example: '1,2' (not supported yet) 

554 scan Scan number. Example: '1,2,3' 

555 antenna Baseline number. Example: '2,3,4,5' 

556 uvrange UV-distance range, with a unit. Example: '2.0-3000.0 m' 

557 time Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 

558 correlation Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 

559 intent Scan intent. Example: '*CAL*, *BAND*' 

560 observation Observation Id. Example: '2~4' 

561 ntime Time-range to use for each chunk (in seconds or minutes). Default: 

562 combinescans Accumulate data across scans depending on the value of ntime. Default: 

563 datacolumn Data column to use for clipping. Example: 'DATA'. Default:  

564 timecutoff Flagging thresholds in units of deviation from the fit. Default: 

565 freqcutoff Flagging thresholds in units of deviation from the fit. Default: 

566 timefit Fitting function for the time direction (poly/line). Default: 

567 freqfit Fitting function for the frequency direction (poly/line). Default: 

568 maxnpieces Number of pieces in the polynomial-fits (for 'freqfit' or 'timefit' = 'poly'). Default: 

569 flagdimension Dimensions along which to calculate fits (freq/time/freqtime/timefreq). Default: 

570 usewindowstats Calculate additional flags using sliding window statistics (none,sum,std,both). Default: 

571 halfwin Half-width of sliding window to use with 'usewindowstats' (1,2,3). Default: 

572 extendflags Extend the flags in time, frequency and correlations. Default: 

573 apply Parameter to flag or unflag the data. Default: 

574 channelavg Average data over channels before clipping? [True/False]. Default:  

575 chanbin Width (bin) of input channels to average to form an output channel. 

576 timeavg Average data over time ranges. [True/False]. Default:  

577 timebin Bin width for time average. Example: '2s' 

578 

579 Example: 

580 

581 The correlation parameter can be used with an operator for the tfcrop mode. 

582 The operator should be written only once and it will affect all the polarizations 

583 given in the string. Note that if ntime='scan' and combinescans=True, all the scans will 

584 be loaded at once, thus requesting a lot of memory depending on the available spws. 

585 The parameter combinescans should be set to True only when ntime is specified as a 

586 time-interval (not 'scan'). By default, the flags will be extended in time, if 

587 more than 50% of the timeranges are flagged, 80% of the channels are flagged and 

588 it will extend to other polarizations too. This is similar to running the extend 

589 mode after running tfcrop on the MS. 

590 

591 af.parsetfcropparameters(spw='9', ntime=10.0, combinescans=True, correlation='ABS_XX,XY', extendflags=True) 

592 

593 -------------------------------------------------------------------------------- 

594 

595 """ 

596 return _agentflagger.agentflagger_parsetfcropparameters(self, *args, **kwargs) 

597 

598 

599 def parseantintparameters(self, *args, **kwargs): 

600 """ 

601 parseantintparameters(self, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _time, _correlation, _intent, _observation, _antint_ref_antenna, _minchanfrac, _verbose, _apply) -> bool 

602 

603 

604 

605 Summary: 

606 Parse data selection parameters and specific parameters for the antint mode. Data selection follows the MS Selection syntax.  

607 

608 Input Parameters: 

609 field Field indices or source names. Example: '2,3C48' 

610 spw Spectral Window Indices or names. Example: '1,2' 

611 array Array Indices or names. Example: 'VLAA' 

612 feed Feed index or name. Example: '1,2' (not supported yet) 

613 scan Scan number. Example: '1,2,3' 

614 antenna Baseline number. Example: '2,3,4,5' 

615 uvrange UV-distance range, with a unit. Example: '2.0-3000.0 m' 

616 time Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 

617 correlation Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 

618 intent Scan intent. Example: '*CAL*, *BAND*' 

619 observation Observation Id. Example: '2~4' 

620 antint_ref_antenna Antenna for which the fractions of channels flagged will be checked. 

621 minchanfrac Minimum fraction of flagged channels required for a baseline to be deemed as flagged. Default: 

622 verbose Print timestamps of flagged integrations to the log. Default: 

623 apply Parameter to flag or unflag the data. Default: 

624 

625 Example: 

626 

627 af.parseantintparameters(antint_ref_antenna='ea10', minchanfrac=0.45, verbose=True) 

628 

629 -------------------------------------------------------------------------------- 

630 

631 """ 

632 return _agentflagger.agentflagger_parseantintparameters(self, *args, **kwargs) 

633 

634 

635 def parseextendparameters(self, *args, **kwargs): 

636 """ 

637 parseextendparameters(self, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _time, _correlation, _intent, _observation, _ntime, _combinescans, _extendpols, _growtime, _growfreq, _growaround, _flagneartime, _flagnearfreq, _apply) -> bool 

638 

639 

640 

641 Summary: 

642 Parse data selection parameters and specific parameters for the extend mode. Data selection follows the MS Selection syntax.  

643 

644 Input Parameters: 

645 field Field indices or source names. Example: '2,3C48' 

646 spw Spectral Window Indices or names. Example: '1,2' 

647 array Array Indices or names. Example: 'VLAA' 

648 feed Feed index or name. Example: '1,2' (not supported yet) 

649 scan Scan number. Example: '1,2,3' 

650 antenna Baseline number. Example: '2,3,4,5' 

651 uvrange UV-distance range, with a unit. Example: '2.0-3000.0 m' 

652 time Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 

653 correlation Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 

654 intent Scan intent. Example: '*CAL*, *BAND*' 

655 observation Observation Id. Example: '2~4' 

656 ntime Time-range to use for each chunk (in seconds or minutes). Default: 

657 combinescans Accumulate data across scans.. Default: 

658 extendpols If any correlation is flagged, flag all correlations. Default: 

659 growtime Flag all 'ntime' integrations if more than X% of the timerange is flagged (0-100). Default: 

660 growfreq Flag all selected channels if more than X% of the frequency range is flagged(0-100). Default: 

661 growaround Flag data based on surrounding flags. Default: 

662 flagneartime Flag one timestep before and after a flagged one. Default: 

663 flagnearfreq Flag one channel before and after a flagged one. Default: 

664 apply Parameter to flag or unflag the data. Default: 

665 

666 Example: 

667 

668 af.parseextendparameters(extendpols=True) 

669 

670 -------------------------------------------------------------------------------- 

671 

672 """ 

673 return _agentflagger.agentflagger_parseextendparameters(self, *args, **kwargs) 

674 

675 

676 def parsesummaryparameters(self, *args, **kwargs): 

677 """ 

678 parsesummaryparameters(self, _field, _spw, _array, _feed, _scan, _antenna, _uvrange, _time, _correlation, _intent, _observation, _spwchan, _spwcorr, _basecnt, _fieldcnt, _name) -> bool 

679 

680 

681 

682 Summary: 

683 Parse data selection parameters and specific parameters for the summary mode. Data selection follows the MS Selection syntax.  

684 

685 Input Parameters: 

686 field Field indices or source names. Example: '2,3C48' 

687 spw Spectral Window Indices or names. Example: '1,2' 

688 array Array Indices or names. Example: 'VLAA' 

689 feed Feed index or name. Example: '1,2' (not supported yet) 

690 scan Scan number. Example: '1,2,3' 

691 antenna Baseline number. Example: '2,3,4,5' 

692 uvrange UV-distance range, with a unit. Example: '2.0-3000.0 m' 

693 time Time range, as MJDs or date strings. Example: 'xx.x.x.x.x~yy.y.y.y.y' 

694 correlation Correlations/polarizations. Example: 'RR,LL,RL,LR,XX,YY,XY,YX' 

695 intent Scan intent. Example: '*CAL*, *BAND*' 

696 observation Observation Id. Example: '2~4' 

697 spwchan List the number of flags per spw and per channel. Default: 

698 spwcorr List the number of flags per spw and per correlation. Default: 

699 basecnt List the number of flags per baseline. Default: 

700 fieldcnt List the number of flags per field. Default: 

701 name Name of this summary report. Default: summary 

702 

703 Example: 

704 

705 af.parsesummaryparameters(spwchan=True, basecnt=True) 

706 

707 -------------------------------------------------------------------------------- 

708 

709 """ 

710 return _agentflagger.agentflagger_parsesummaryparameters(self, *args, **kwargs) 

711 

712 __swig_destroy__ = _agentflagger.delete_agentflagger 

713 __del__ = lambda self: None 

714agentflagger_swigregister = _agentflagger.agentflagger_swigregister 

715agentflagger_swigregister(agentflagger) 

716 

717# This file is compatible with both classic and new-style classes. 

718 

719