Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

584

585

586

587

588

589

590

591

592

593

594

595

596

597

598

599

600

601

602

603

604

605

606

607

608

609

610

611

612

613

614

615

616

617

618

619

620

621

622

623

624

625

626

627

628

629

630

631

632

633

634

635

636

637

638

639

640

641

642

643

644

645

646

647

648

649

650

651

652

653

654

655

656

657

658

659

660

661

662

663

664

665

666

667

668

669

670

671

672

673

674

675

676

677

678

679

680

681

682

683

684

685

686

687

688

689

690

691

692

693

694

695

696

697

698

699

700

701

702

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

# Version 2.0.4 

# 

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

# the SWIG interface file instead. 

 

 

 

from sys import version_info 

if version_info >= (2,6,0): 

    def swig_import_helper(): 

        from os.path import dirname 

        import imp 

        fp = None 

        try: 

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

        except ImportError: 

            import _agentflagger 

            return _agentflagger 

        if fp is not None: 

            try: 

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

            finally: 

                fp.close() 

            return _mod 

    _agentflagger = swig_import_helper() 

    del swig_import_helper 

else: 

    import _agentflagger 

del version_info 

try: 

    _swig_property = property 

except NameError: 

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

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

    if (name == "thisown"): return self.this.own(value) 

    if (name == "this"): 

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

            self.__dict__[name] = value 

            return 

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

    if method: return method(self,value) 

    if (not static): 

        self.__dict__[name] = value 

    else: 

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

 

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

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

 

def _swig_getattr(self,class_type,name): 

    if (name == "thisown"): return self.this.own() 

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

    if method: return method(self) 

    raise AttributeError(name) 

 

def _swig_repr(self): 

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

    except: strthis = "" 

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

 

try: 

    _object = object 

    _newclass = 1 

except AttributeError: 

    class _object : pass 

    _newclass = 0 

 

 

class agentflagger(_object): 

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

    __swig_setmethods__ = {} 

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

    __swig_getmethods__ = {} 

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

    __repr__ = _swig_repr 

    def __init__(self): 

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

        this = _agentflagger.new_agentflagger() 

        try: self.this.append(this) 

        except: self.this = this 

    __swig_destroy__ = _agentflagger.delete_agentflagger 

    __del__ = lambda self : None; 

    def done(self): 

        """ 

        done(self) -> bool 

 

        Summary 

                Destroy the flag tool 

        Example: 

                 

        af.done() 

 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _agentflagger.agentflagger_done(self) 

 

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

        """ 

        open(self, msname = string(""), ntime = 0.0) -> bool 

 

        Summary 

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

 

        Input Parameters: 

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

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

                 

        Example: 

                 

        af.open(msname,ntime) 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        selectdata(self, config = initialize_record(""), field = string(""),  

            spw = string(""), array = string(""), feed = string(""),  

            scan = string(""), antenna = string(""),  

            uvrange = string(""), timerange = string(""),  

            correlation = string(""), intent = string(""),  

            observation = string("")) -> bool 

 

        Summary 

                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. 

             

 

        Input Parameters: 

                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: 

          

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

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

                array            Array Indices or names : example : 'VLAA'  

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

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

                antenna          Baseline number : example : '2-3,4-5,132 ????'  

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

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

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

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

                observation      Observation Id : example : '2~4'  

                 

        Example: 

                 

        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') 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        parseagentparameters(self, aparams) -> bool 

 

        Summary 

                Parse the parameters for the agent (flagging mode). 

 

        Description 

                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: 

 

 

        Input Parameters: 

                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, datacolumns, clipminmax, etc.  

         See the documentation of the task tflagger for all the available parameters for each mode. 

          

         (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) 

          

                 

        Example: 

                 

        myrecord={} 

        myrecord['mode']='clip' 

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

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

        myrecord['apply']=True 

        af.parseagentparameters(myrecord) 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

    def init(self): 

        """ 

        init(self) -> bool 

 

        Summary 

                Initialize the agents 

 

        Description 

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

        with their specific parameters. It takes no parameters. 

 

        Example: 

                 

        af.init() 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _agentflagger.agentflagger_init(self) 

 

    def run(self, writeflags = True, sequential = True): 

        """ 

        run(self, writeflags = True, sequential = True) -> record 

 

        Summary 

                Execute a list of flagging agents 

 

        Description 

                 

        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. 

 

 

        Input Parameters: 

                writeflags       Write flags to MS true  

                sequential       Run the task in sequential or in parallel. true  

                 

        Example: 

                 

        af.run() 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _agentflagger.agentflagger_run(self, writeflags, sequential) 

 

    def getflagversionlist(self, printflags = True): 

        """ 

        getflagversionlist(self, printflags = True) -> std::vector<(std::string)> 

 

        Summary 

                Print out a list of saved flag_versions. 

 

        Description 

                  

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

 

 

        Input Parameters: 

                printflags       Print flagversions in logger? true  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _agentflagger.agentflagger_getflagversionlist(self, printflags) 

 

    def printflagselection(self): 

        """ 

        printflagselection(self) -> bool 

 

        Summary 

                Print out a list of current flag selections. 

            

 

        Description 

                 

        Print out a list of current flag selections. 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _agentflagger.agentflagger_printflagselection(self) 

 

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

        """ 

        saveflagversion(self, versionname = string(""), comment = string(""), merge = string("")) -> bool 

 

        Summary 

                Save current flags with a version name. 

                     

 

        Description 

                  

 

 

        Input Parameters: 

                versionname      Version name  

                comment          Comment for this flag table  

                merge            merge type  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        restoreflagversion(self, versionname = std::vector< string >(1, ""), merge = string("")) -> bool 

 

        Summary 

                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. 

                                  n 

            

 

        Description 

                  

 

 

        Input Parameters: 

                versionname      Version name  

                merge            merge type  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        deleteflagversion(self, versionname = std::vector< string >(1, "")) -> bool 

 

        Summary 

                Delete a saved flag_version. 

 

        Description 

                  

 

 

        Input Parameters: 

                versionname      Version name  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        parsemanualparameters(self, field = string(""), spw = string(""), array = string(""),  

            feed = string(""), scan = string(""),  

            antenna = string(""), uvrange = string(""), time = string(""),  

            correlation = string(""), intent = string(""),  

            observation = string(""),  

            autocorr = False, apply = True) -> bool 

 

        Summary 

                Parse data selection parameters and specific parameters 

        for the manual mode. 

             

 

        Input Parameters: 

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

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

                array            Array Indices or names. Example: 'VLAA'  

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

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

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

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

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

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

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

                observation      Observation Id. Example: '2~4'  

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

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

                 

        Example: 

                 

        af.parsemanualparameters(autocorr=True) 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        parseclipparameters(self, field = string(""), spw = string(""), array = string(""),  

            feed = string(""), scan = string(""),  

            antenna = string(""), uvrange = string(""), time = string(""),  

            correlation = string(""), intent = string(""),  

            observation = string(""),  

            datacolumn = string("DATA"), clipminmax = std::vector< double >(),  

            clipoutside = True, channelavg = False,  

            clipzeros = False, apply = True) -> bool 

 

        Summary 

                Parse data selection parameters and specific parameters 

        for the clip mode. 

             

 

        Input Parameters: 

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

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

                array            Array Indices or names. Example: 'VLAA'  

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

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

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

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

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

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

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

                observation      Observation Id. Example: '2~4'  

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

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

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

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

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

                apply            Parameter to flag or unflag data. Default: true  

                 

        Example: 

                 

        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') 

 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        parsequackparameters(self, field = string(""), spw = string(""), array = string(""),  

            feed = string(""), scan = string(""),  

            antenna = string(""), uvrange = string(""), time = string(""),  

            correlation = string(""), intent = string(""),  

            observation = string(""),  

            quackmode = string("beg"), quackinterval = 0.0,  

            quackincrement = False, apply = True) -> bool 

 

        Summary 

                Parse data selection parameters and specific parameters 

        for the quack mode. 

             

 

        Input Parameters: 

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

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

                array            Array Indices or names. Example: 'VLAA'  

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

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

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

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

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

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

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

                observation      Observation Id. Example: '2~4'  

                quackmode        Quack mode. Default: beg  

                quackinterval    Quack length in seconds. Default: 0.0  

                quackincrement   Flag incrementally in time. Default: false  

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

                 

        Example: 

                 

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

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        parseelevationparameters(self, field = string(""), spw = string(""), array = string(""),  

            feed = string(""), scan = string(""),  

            antenna = string(""), uvrange = string(""), time = string(""),  

            correlation = string(""), intent = string(""),  

            observation = string(""),  

            lowerlimit = 0.0, upperlimit = 90.0, apply = True) -> bool 

 

        Summary 

                Parse data selection parameters and specific parameters 

        for the elevation mode. 

             

 

        Input Parameters: 

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

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

                array            Array Indices or names. Example: 'VLAA'  

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

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

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

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

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

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

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

                observation      Observation Id. Example: '2~4'  

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

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

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

                 

        Example: 

                 

        To unflag, set the apply parameter. 

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

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        parsetfcropparameters(self, field = string(""), spw = string(""), array = string(""),  

            feed = string(""), scan = string(""),  

            antenna = string(""), uvrange = string(""), time = string(""),  

            correlation = string(""), intent = string(""),  

            observation = string(""),  

            ntime = 0.0, combinescans = False, datacolumn = string("DATA"),  

            timecutoff = 4.0, freqcutoff = 3.0,  

            timefit = string("line"), freqfit = string("poly"),  

            maxnpieces = 7, flagdimension = string("freqtime"),  

            usewindowstats = string("none"),  

            halfwin = 1, extendflags = True,  

            apply = True) -> bool 

 

        Summary 

                Parse data selection parameters and specific parameters 

        for the time and frequency mode. 

             

 

        Input Parameters: 

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

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

                array            Array Indices or names. Example: 'VLAA'  

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

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

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

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

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

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

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

                observation      Observation Id. Example: '2~4'  

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

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

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

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

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

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

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

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

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

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

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

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

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

                 

        Example: 

                 

        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) 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        parseextendparameters(self, field = string(""), spw = string(""), array = string(""),  

            feed = string(""), scan = string(""),  

            antenna = string(""), uvrange = string(""), time = string(""),  

            correlation = string(""), intent = string(""),  

            observation = string(""),  

            ntime = 0.0, combinescans = False, extendpols = True,  

            growtime = 50.0, growfreq = 50.0, growaround = False,  

            flagneartime = False, flagnearfreq = False,  

            apply = True) -> bool 

 

        Summary 

                Parse data selection parameters and specific parameters 

        for the extend mode. 

             

 

        Input Parameters: 

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

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

                array            Array Indices or names. Example: 'VLAA'  

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

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

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

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

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

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

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

                observation      Observation Id. Example: '2~4'  

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

                combinescans     Accumulate data across scans.. Default: false  

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

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

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

                growaround       Flag data based on surrounding flags. Default: false  

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

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

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

                 

        Example: 

                 

        af.parseextendparameters(extendpols=True) 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        parsesummaryparameters(self, field = string(""), spw = string(""), array = string(""),  

            feed = string(""), scan = string(""),  

            antenna = string(""), uvrange = string(""), time = string(""),  

            correlation = string(""), intent = string(""),  

            observation = string(""),  

            spwchan = False, spwcorr = False, basecnt = False,  

            name = string("")) -> bool 

 

        Summary 

                Parse data selection parameters and specific parameters 

        for the summary mode. 

             

 

        Input Parameters: 

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

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

                array            Array Indices or names. Example: 'VLAA'  

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

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

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

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

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

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

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

                observation      Observation Id. Example: '2~4'  

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

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

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

                name             Name of this summary report. Default: summary  

                 

        Example: 

                 

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

 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

agentflagger_swigregister = _agentflagger.agentflagger_swigregister 

agentflagger_swigregister(agentflagger) 

 

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