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

703

704

705

706

707

708

709

710

711

712

713

714

715

716

717

# 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('_calanalysis', [dirname(__file__)]) 

        except ImportError: 

            import _calanalysis 

            return _calanalysis 

        if fp is not None: 

            try: 

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

            finally: 

                fp.close() 

            return _mod 

    _calanalysis = swig_import_helper() 

    del swig_import_helper 

else: 

    import _calanalysis 

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 calanalysis(_object): 

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

    __swig_setmethods__ = {} 

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

    __swig_getmethods__ = {} 

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

    __repr__ = _swig_repr 

    def __init__(self): 

        """__init__(self) -> calanalysis""" 

        this = _calanalysis.new_calanalysis() 

        try: self.this.append(this) 

        except: self.this = this 

    __swig_destroy__ = _calanalysis.delete_calanalysis 

    __del__ = lambda self : None; 

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

        """ 

        open(self, caltable = string("")) -> bool 

 

        Summary 

                 

        Open a calibration table. 

 

 

        Description 

                 

        This member function opens a calibration table. 

 

 

        Input Parameters: 

                caltable         Python string containing the calibration table name.  

                 

        Example: 

                 

        ca.open( '<caltable name>' ) 

 

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

                       

        """ 

        return _calanalysis.calanalysis_open(self, *args, **kwargs) 

 

    def close(self): 

        """ 

        close(self) -> bool 

 

        Summary 

                 

        Close a calibration table. 

 

 

        Description 

                 

        This member function closes a calibration table. 

 

        Example: 

                 

        ca.close() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_close(self) 

 

    def calname(self): 

        """ 

        calname(self) -> string 

 

        Summary 

                 

        Return the calibration table name. 

 

 

        Description 

                 

        This member function returns calibration table name. 

 

        Example: 

                 

        caltable = ca.calname() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_calname(self) 

 

    def msname(self): 

        """ 

        msname(self) -> string 

 

        Summary 

                 

        Return the name of the MS that created this calibration table. 

 

 

        Description 

                 

        This member function returns the name of the MS that created this calibration 

        table. 

 

        Example: 

                 

        msname = ca.msname() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_msname(self) 

 

    def viscal(self): 

        """ 

        viscal(self) -> string 

 

        Summary 

                 

        Return the type of calibration table ('B', 'G', 'T', etc.). 

 

 

        Description 

                 

        This member function returns the type of calibration table ('B', 'G', 'T', 

        etc.). 

 

        Example: 

                 

        viscal = ca.viscal() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_viscal(self) 

 

    def partype(self): 

        """ 

        partype(self) -> string 

 

        Summary 

                 

        Return the parameter column type in the calibration table ('Complex' or 

        'Float'). 

 

 

        Description 

                 

        This member function returns the parameter column type in the calibration table 

        ('Complex' or 'Float'). 

 

        Example: 

                 

        partype = ca.partype() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_partype(self) 

 

    def polbasis(self): 

        """ 

        polbasis(self) -> string 

 

        Summary 

                 

        Return the polarization basis in the calibration table ('L' for linear or 'C' 

        for circular). 

 

 

        Description 

                 

        This member function returns the polarization basis in the calibration table 

        ('L' for linear or 'C' for circular). 

 

        Example: 

                 

        polbasis = ca.polbasis() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_polbasis(self) 

 

    def numfield(self): 

        """ 

        numfield(self) -> int 

 

        Summary 

                 

        Return the number of fields in the calibration table. 

 

 

        Description 

                 

        This member function returns the number of fields in the calibration table. 

 

        Example: 

                 

        numfield = ca.numfield() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_numfield(self) 

 

    def field(self, name = True): 

        """ 

        field(self, name = True) -> std::vector<(std::string)> 

 

        Summary 

                 

        Return the fields in the calibration table. 

 

 

        Description 

                 

        This member function returns the fields in the calibration table. 

 

 

        Input Parameters: 

                name             The python boolean which determines whether field names (True) or field numbers (False) are returned. true  

                 

        Example: 

                 

        field = ca.field() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_field(self, name) 

 

    def numantenna(self): 

        """ 

        numantenna(self) -> int 

 

        Summary 

                 

        Return the number of antennas in the calibration table. 

 

 

        Description 

                 

        This member function returns the number of antennas in the calibration table. 

 

        Example: 

                 

        numantenna = ca.numantenna() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_numantenna(self) 

 

    def numantenna1(self): 

        """ 

        numantenna1(self) -> int 

 

        Summary 

                 

        Return the number of antenna 1s in the calibration table. 

 

 

        Description 

                 

        This member function returns the number of antenna 1s in the calibration table. 

 

        Example: 

                 

        numantenna1 = ca.numantenna1() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_numantenna1(self) 

 

    def numantenna2(self): 

        """ 

        numantenna2(self) -> int 

 

        Summary 

                 

        Return the number of antenna 2s in the calibration table. 

 

 

        Description 

                 

        This member function returns the number of antenna 2s in the calibration table. 

 

        Example: 

                 

        numantenna2 = ca.numantenna2() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_numantenna2(self) 

 

    def antenna(self, name = True): 

        """ 

        antenna(self, name = True) -> std::vector<(std::string)> 

 

        Summary 

                 

        Return the antennas in the calibration table. 

 

 

        Description 

                 

        This member function returns the antennas in the calibration table. 

 

 

        Input Parameters: 

                name             The python boolean which determines whether antenna names (True) or antenna numbers (False) are returned. true  

                 

        Example: 

                 

        antenna = ca.antenna() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_antenna(self, name) 

 

    def antenna1(self, name = True): 

        """ 

        antenna1(self, name = True) -> std::vector<(std::string)> 

 

        Summary 

                 

        Return the antenna 1s in the calibration table. 

 

 

        Description 

                 

        This member function returns the antenna 1s in the calibration table. 

 

 

        Input Parameters: 

                name             The python boolean which determines whether antenna 1 names (True) or antenna 1 numbers (False) are returned. true  

                 

        Example: 

                 

        antenna1 = ca.antenna1() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_antenna1(self, name) 

 

    def antenna2(self, name = True): 

        """ 

        antenna2(self, name = True) -> std::vector<(std::string)> 

 

        Summary 

                 

        Return the antenna 2s in the calibration table. 

 

 

        Description 

                 

        This member function returns the antenna 2s in the calibration table. 

 

 

        Input Parameters: 

                name             The python boolean which determines whether antenna 2 names (True) or antenna 2 numbers (False) are returned. true  

                 

        Example: 

                 

        antenna2 = ca.antenna2() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_antenna2(self, name) 

 

    def numfeed(self): 

        """ 

        numfeed(self) -> int 

 

        Summary 

                 

        Return the number of feeds in the calibration table. 

 

 

        Description 

                 

        This member function returns the number of feeds in the calibration table. 

 

        Example: 

                 

        numfeed = ca.numfeed() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_numfeed(self) 

 

    def feed(self): 

        """ 

        feed(self) -> std::vector<(std::string)> 

 

        Summary 

                 

        Return the feeds in the calibration table. 

 

 

        Description 

                 

        This member function returns the feeds in the calibration table. 

 

        Example: 

                 

        feed = ca.feed() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_feed(self) 

 

    def numtime(self): 

        """ 

        numtime(self) -> int 

 

        Summary 

                 

        Return the number of times in the calibration table. 

 

 

        Description 

                 

        This member function returns the number of times in the calibration table. 

 

        Example: 

                 

        numtime = ca.numtime() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_numtime(self) 

 

    def time(self): 

        """ 

        time(self) -> std::vector<(double)> 

 

        Summary 

                 

        Return the times (in MJD seconds) in the calibration table. 

 

 

        Description 

                 

        This member function returns the times (in MJD seconds) in the calibration 

        table. 

 

        Example: 

                 

        time = ca.time() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_time(self) 

 

    def numspw(self): 

        """ 

        numspw(self) -> int 

 

        Summary 

                 

        Return the number of spectral windows in the calibration table. 

 

 

        Description 

                 

        This member function returns the number of spectral windows in the calibration 

        table. 

 

        Example: 

                 

        numspw = ca.numspw() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_numspw(self) 

 

    def spw(self, name = True): 

        """ 

        spw(self, name = True) -> std::vector<(std::string)> 

 

        Summary 

                 

        Return the spectral windows in the calibration table. 

 

 

        Description 

                 

        This member function returns the spectral windows in the calibration table. 

 

 

        Input Parameters: 

                name             The python boolean which determines whether spectral window names (True) or spectral window numbers (False) are returned. true  

                 

        Example: 

                 

        spw = ca.spw() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_spw(self, name) 

 

    def numchannel(self): 

        """ 

        numchannel(self) -> std::vector<(int)> 

 

        Summary 

                 

        Return the number of channels per spectral window in the calibration table. 

 

 

        Description 

                 

        This member function returns the number of channels per spectral window in the 

        calibration table. 

 

        Example: 

                 

        numChannel = ca.numchannel() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_numchannel(self) 

 

    def freq(self): 

        """ 

        freq(self) -> record 

 

        Summary 

                 

        Return the frequencies per spectral window in the calibration table. 

 

 

        Description 

                 

        This member function returns the frequencies per spectral window in the 

        calibration table. 

 

        Example: 

                 

        freq = ca.freq() 

 

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

                       

        """ 

        return _calanalysis.calanalysis_freq(self) 

 

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

        """ 

        get(self, field = initialize_variant(""), antenna = initialize_variant(""),  

            timerange = initialize_variant(""),  

            spw = initialize_variant(""), feed = initialize_variant(""),  

            axis = string("TIME"),  

            ap = string("AMPLITUDE"), norm = False, unwrap = False,  

            jumpmax = 0.0) -> record 

 

        Summary 

                 

        Return the calibration data. 

 

 

        Description 

                 

        This member function returns the calibration data. 

 

 

        Input Parameters: 

                field            The python comma-delimited string or list of strings containing the field names or numbers. The default is '' (all fields).  

                antenna          The python comma-delimited string or list of strings containing the antenna 1s and antenna 2s. The default is '' (all antenna 1s and antenna 2s).  

                timerange        The python list of floats of length two containing the start and stop times (in MJD seconds). The default is [] (the minimum start time and the maximum stop time).  

                spw              The python comma-delimited string containing the spectral window names and numbers along with their channel numbers. The default is '' (all spectral windows and channels).  

                feed             The python comma-delimited string or list of strings containing the feeds. The default is '' (all feeds).  

                axis             The python string containing the user-specified iteration axis. The allowed values are 'TIME' and 'FREQ'. The default is '' ('FREQ'). TIME  

                ap               The python string which determines whether complex gains are converted to amplitudes or phases. The allowed values are 'AMPLITUDE' and 'PHASE'. The default is '' ('AMPLITUDE'). This parameter is ignored when the 'gain' values in the calibration table are real. AMPLITUDE  

                norm             The python boolean which determines whether the amplitudes are normalized along each non-iteration axis. The default is False. This parameter is ignored when the 'gain' values in the calibration table are real or ap='PHASE'. false  

                unwrap           The python boolean which determines whether the phases are unwrapped along each non-iteration axis. The default is False. This parameter is ignored when the 'gain' values in the calibration table are real or ap='AMPLITUDE'. false  

                jumpmax          The python float which determines the maximum phase jump near +/- PI before unwrapping is performed. E.g., jumpmax = 0.1. The default is 0.0. It is ignored if the 'gain' values in the calibration table are real or ap = 'AMPLITUDE'. If the non-iteration axis is frequency: 1) if jumpmax == 0.0, use fringe fitting (only available when the non-iteration axis is time); 2) if jumpmax != 0.0, use simple unwrapping (same algorithm as used when the non-iteration axis is time or frequency). 0.0  

                 

        Example: 

                 

        # All data limited only by the spectral window and channel input 

        data = ca.get( spw='0:4~15,1,2:10~20' ) 

 

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

                       

        """ 

        return _calanalysis.calanalysis_get(self, *args, **kwargs) 

 

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

        """ 

        fit(self, field = initialize_variant(""), antenna = initialize_variant(""),  

            timerange = initialize_variant(""),  

            spw = initialize_variant(""), feed = initialize_variant(""),  

            axis = string("TIME"),  

            ap = string("AMPLITUDE"), norm = False, unwrap = False,  

            jumpmax = 0.0, order = string("AVERAGE"),  

            type = string("LSQ"), weight = False) -> record 

 

        Summary 

                 

        Return the calibration data and fits along the non-iteration axis. 

 

 

        Description 

                 

        This member function returns the calibration data and fits along the 

        non-iteration axis. 

 

 

        Input Parameters: 

                field            The python comma-delimited string or list of strings containing the field names or numbers. The default is '' (all fields).  

                antenna          The python comma-delimited string or list of strings containing the antenna 1s and antenna 2s. The default is '' (all antenna 1s and antenna 2s).  

                timerange        The python list of floats of length two containing the start and stop times (in MJD seconds). The default is [] (the minimum start time and the maximum stop time).  

                spw              The python comma-delimited string containing the spectral window names and numbers along with their channel numbers. The default is '' (all spectral windows and channels).  

                feed             The python comma-delimited string or list of strings containing the feeds. The default is '' (all feeds).  

                axis             The python string containing the user-specified iteration axis. The allowed values are 'TIME' and 'FREQ'. The default is '' ('FREQ'). TIME  

                ap               The python string which determines whether complex gains are converted to amplitudes or phases. The allowed values are 'AMPLITUDE' and 'PHASE'. The default is '' ('AMPLITUDE'). This parameter is ignored when the 'gain' values in the calibration table are real. AMPLITUDE  

                norm             The python boolean which determines whether the amplitudes are normalized along each non-iteration axis. The default is False. This parameter is ignored when the 'gain' values in the calibration table are real or ap='PHASE'. false  

                unwrap           The python boolean which determines whether the phases are unwrapped along each non-iteration axis. The default is False. This parameter is ignored when the 'gain' values in the calibration table are real or ap='AMPLITUDE'. false  

                jumpmax          The python float which determines the maximum phase jump near +/- PI before unwrapping is performed. E.g., jumpmax = 0.1. The default is 0.0. It is ignored if the 'gain' values in the calibration table are real or ap = 'AMPLITUDE'. If the non-iteration axis is frequency: 1) if jumpmax == 0.0, use fringe fitting (only available when the non-iteration axis is time); 2) if jumpmax != 0.0, use simple unwrapping (same algorithm as used when the non-iteration axis is time or frequency). 0.0  

                order            The python string containing the fit order. The allowed values are 'AVERAGE', 'LINEAR', and 'QUADRATIC'. The default is '' ('AVERAGE'). NB: 'QUADRATIC' is not allowed when type = 'ROBUST'. AVERAGE  

                type             The python string containing the fit type. The allowed values are 'LSQ' and 'ROBUST'. The default is '' ('LSQ'). NB: Robust fitting is experimental. It flags outliers. LSQ  

                weight           The python boolean which determines the weighting. The default is False. false  

                 

        Example: 

                 

        # All data limited only by the spectral window and channel input.  The fit order 

        # is linear. 

        data_fit = ca.fit( spw='0:4~15,1,2:10~20', order='LINEAR' ) 

 

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

                       

        """ 

        return _calanalysis.calanalysis_fit(self, *args, **kwargs) 

 

calanalysis_swigregister = _calanalysis.calanalysis_swigregister 

calanalysis_swigregister(calanalysis) 

 

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