Coverage for /wheeldirectory/casa-6.7.0-11-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/__casac__/calanalysis.py: 41%

142 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-10-23 15:54 +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, '_calanalysis')).lstrip('.') 

13 try: 

14 return importlib.import_module(mname) 

15 except ImportError: 

16 return importlib.import_module('_calanalysis') 

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

26 except ImportError: 

27 import _calanalysis 

28 return _calanalysis 

29 try: 

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

31 finally: 

32 if fp is not None: 

33 fp.close() 

34 return _mod 

35 _calanalysis = swig_import_helper() 

36 del swig_import_helper 

37else: 

38 import _calanalysis 

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

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

100 

101 __swig_setmethods__ = {} 

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

103 __swig_getmethods__ = {} 

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

105 __repr__ = _swig_repr 

106 

107 def __init__(self): 

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

109 this = _calanalysis.new_calanalysis() 

110 try: 

111 self.this.append(this) 

112 except __builtin__.Exception: 

113 self.this = this 

114 

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

116 """ 

117 open(self, _caltable) -> bool 

118 

119 

120 

121 Summary: 

122 Open a calibration table. 

123 

124 Description: 

125 

126 

127 This member function opens a calibration table. 

128 

129 Input Parameters: 

130 caltable Python string containing the calibration table name.  

131 

132 Example: 

133 

134 ca.open( '<caltable name>' ) 

135 

136 -------------------------------------------------------------------------------- 

137 

138 """ 

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

140 

141 

142 def close(self): 

143 """ 

144 close(self) -> bool 

145 

146 

147 

148 Summary: 

149 Close a calibration table. 

150 

151 Description: 

152 

153 

154 This member function closes a calibration table. 

155 

156 Example: 

157 

158 ca.close() 

159 

160 -------------------------------------------------------------------------------- 

161 

162 """ 

163 return _calanalysis.calanalysis_close(self) 

164 

165 

166 def calname(self): 

167 """ 

168 calname(self) -> string 

169 

170 

171 

172 Summary: 

173 Return the calibration table name. 

174 

175 Description: 

176 

177 

178 This member function returns calibration table name. 

179 

180 Example: 

181 

182 caltable = ca.calname() 

183 

184 -------------------------------------------------------------------------------- 

185 

186 """ 

187 return _calanalysis.calanalysis_calname(self) 

188 

189 

190 def msname(self): 

191 """ 

192 msname(self) -> string 

193 

194 

195 

196 Summary: 

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

198 

199 Description: 

200 

201 

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

203 table. 

204 

205 Example: 

206 

207 msname = ca.msname() 

208 

209 -------------------------------------------------------------------------------- 

210 

211 """ 

212 return _calanalysis.calanalysis_msname(self) 

213 

214 

215 def viscal(self): 

216 """ 

217 viscal(self) -> string 

218 

219 

220 

221 Summary: 

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

223 

224 Description: 

225 

226 

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

228 etc.). 

229 

230 Example: 

231 

232 viscal = ca.viscal() 

233 

234 -------------------------------------------------------------------------------- 

235 

236 """ 

237 return _calanalysis.calanalysis_viscal(self) 

238 

239 

240 def partype(self): 

241 """ 

242 partype(self) -> string 

243 

244 

245 

246 Summary: 

247 Return the parameter column type in the calibration table ('Complex' or 'Float'). 

248 

249 Description: 

250 

251 

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

253 ('Complex' or 'Float'). 

254 

255 Example: 

256 

257 partype = ca.partype() 

258 

259 -------------------------------------------------------------------------------- 

260 

261 """ 

262 return _calanalysis.calanalysis_partype(self) 

263 

264 

265 def polbasis(self): 

266 """ 

267 polbasis(self) -> string 

268 

269 

270 

271 Summary: 

272 Return the polarization basis in the calibration table ('L' for linear or 'C' for circular). 

273 

274 Description: 

275 

276 

277 This member function returns the polarization basis in the calibration table 

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

279 

280 Example: 

281 

282 polbasis = ca.polbasis() 

283 

284 -------------------------------------------------------------------------------- 

285 

286 """ 

287 return _calanalysis.calanalysis_polbasis(self) 

288 

289 

290 def numfield(self): 

291 """ 

292 numfield(self) -> long 

293 

294 

295 

296 Summary: 

297 Return the number of fields in the calibration table. 

298 

299 Description: 

300 

301 

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

303 

304 Example: 

305 

306 numfield = ca.numfield() 

307 

308 -------------------------------------------------------------------------------- 

309 

310 """ 

311 return _calanalysis.calanalysis_numfield(self) 

312 

313 

314 def field(self, *args, **kwargs): 

315 """ 

316 field(self, _name) -> std::vector< std::string > 

317 

318 

319 

320 Summary: 

321 Return the fields in the calibration table. 

322 

323 Description: 

324 

325 

326 This member function returns the fields in the calibration table. 

327 

328 Input Parameters: 

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

330 

331 Example: 

332 

333 field = ca.field() 

334 

335 -------------------------------------------------------------------------------- 

336 

337 """ 

338 return _calanalysis.calanalysis_field(self, *args, **kwargs) 

339 

340 

341 def numantenna(self): 

342 """ 

343 numantenna(self) -> long 

344 

345 

346 

347 Summary: 

348 Return the number of antennas in the calibration table. 

349 

350 Description: 

351 

352 

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

354 

355 Example: 

356 

357 numantenna = ca.numantenna() 

358 

359 -------------------------------------------------------------------------------- 

360 

361 """ 

362 return _calanalysis.calanalysis_numantenna(self) 

363 

364 

365 def numantenna1(self): 

366 """ 

367 numantenna1(self) -> long 

368 

369 

370 

371 Summary: 

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

373 

374 Description: 

375 

376 

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

378 

379 Example: 

380 

381 numantenna1 = ca.numantenna1() 

382 

383 -------------------------------------------------------------------------------- 

384 

385 """ 

386 return _calanalysis.calanalysis_numantenna1(self) 

387 

388 

389 def numantenna2(self): 

390 """ 

391 numantenna2(self) -> long 

392 

393 

394 

395 Summary: 

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

397 

398 Description: 

399 

400 

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

402 

403 Example: 

404 

405 numantenna2 = ca.numantenna2() 

406 

407 -------------------------------------------------------------------------------- 

408 

409 """ 

410 return _calanalysis.calanalysis_numantenna2(self) 

411 

412 

413 def antenna(self, *args, **kwargs): 

414 """ 

415 antenna(self, _name) -> std::vector< std::string > 

416 

417 

418 

419 Summary: 

420 Return the antennas in the calibration table. 

421 

422 Description: 

423 

424 

425 This member function returns the antennas in the calibration table. 

426 

427 Input Parameters: 

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

429 

430 Example: 

431 

432 antenna = ca.antenna() 

433 

434 -------------------------------------------------------------------------------- 

435 

436 """ 

437 return _calanalysis.calanalysis_antenna(self, *args, **kwargs) 

438 

439 

440 def antenna1(self, *args, **kwargs): 

441 """ 

442 antenna1(self, _name) -> std::vector< std::string > 

443 

444 

445 

446 Summary: 

447 Return the antenna 1s in the calibration table. 

448 

449 Description: 

450 

451 

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

453 

454 Input Parameters: 

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

456 

457 Example: 

458 

459 antenna1 = ca.antenna1() 

460 

461 -------------------------------------------------------------------------------- 

462 

463 """ 

464 return _calanalysis.calanalysis_antenna1(self, *args, **kwargs) 

465 

466 

467 def antenna2(self, *args, **kwargs): 

468 """ 

469 antenna2(self, _name) -> std::vector< std::string > 

470 

471 

472 

473 Summary: 

474 Return the antenna 2s in the calibration table. 

475 

476 Description: 

477 

478 

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

480 

481 Input Parameters: 

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

483 

484 Example: 

485 

486 antenna2 = ca.antenna2() 

487 

488 -------------------------------------------------------------------------------- 

489 

490 """ 

491 return _calanalysis.calanalysis_antenna2(self, *args, **kwargs) 

492 

493 

494 def numfeed(self): 

495 """ 

496 numfeed(self) -> long 

497 

498 

499 

500 Summary: 

501 Return the number of feeds in the calibration table. 

502 

503 Description: 

504 

505 

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

507 

508 Example: 

509 

510 numfeed = ca.numfeed() 

511 

512 -------------------------------------------------------------------------------- 

513 

514 """ 

515 return _calanalysis.calanalysis_numfeed(self) 

516 

517 

518 def feed(self): 

519 """ 

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

521 

522 

523 

524 Summary: 

525 Return the feeds in the calibration table. 

526 

527 Description: 

528 

529 

530 This member function returns the feeds in the calibration table. 

531 

532 Example: 

533 

534 feed = ca.feed() 

535 

536 -------------------------------------------------------------------------------- 

537 

538 """ 

539 return _calanalysis.calanalysis_feed(self) 

540 

541 

542 def numtime(self): 

543 """ 

544 numtime(self) -> long 

545 

546 

547 

548 Summary: 

549 Return the number of times in the calibration table. 

550 

551 Description: 

552 

553 

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

555 

556 Example: 

557 

558 numtime = ca.numtime() 

559 

560 -------------------------------------------------------------------------------- 

561 

562 """ 

563 return _calanalysis.calanalysis_numtime(self) 

564 

565 

566 def time(self): 

567 """ 

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

569 

570 

571 

572 Summary: 

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

574 

575 Description: 

576 

577 

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

579 table. 

580 

581 Example: 

582 

583 time = ca.time() 

584 

585 -------------------------------------------------------------------------------- 

586 

587 """ 

588 return _calanalysis.calanalysis_time(self) 

589 

590 

591 def numspw(self): 

592 """ 

593 numspw(self) -> long 

594 

595 

596 

597 Summary: 

598 Return the number of spectral windows in the calibration table. 

599 

600 Description: 

601 

602 

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

604 table. 

605 

606 Example: 

607 

608 numspw = ca.numspw() 

609 

610 -------------------------------------------------------------------------------- 

611 

612 """ 

613 return _calanalysis.calanalysis_numspw(self) 

614 

615 

616 def spw(self, *args, **kwargs): 

617 """ 

618 spw(self, _name) -> std::vector< std::string > 

619 

620 

621 

622 Summary: 

623 Return the spectral windows in the calibration table. 

624 

625 Description: 

626 

627 

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

629 

630 Input Parameters: 

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

632 

633 Example: 

634 

635 spw = ca.spw() 

636 

637 -------------------------------------------------------------------------------- 

638 

639 """ 

640 return _calanalysis.calanalysis_spw(self, *args, **kwargs) 

641 

642 

643 def numchannel(self): 

644 """ 

645 numchannel(self) -> std::vector< long > 

646 

647 

648 

649 Summary: 

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

651 

652 Description: 

653 

654 

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

656 calibration table. 

657 

658 Example: 

659 

660 numChannel = ca.numchannel() 

661 

662 -------------------------------------------------------------------------------- 

663 

664 """ 

665 return _calanalysis.calanalysis_numchannel(self) 

666 

667 

668 def freq(self): 

669 """ 

670 freq(self) -> record * 

671 

672 

673 

674 Summary: 

675 Return the frequencies per spectral window in the calibration table. 

676 

677 Description: 

678 

679 

680 This member function returns the frequencies per spectral window in the 

681 calibration table. 

682 

683 Example: 

684 

685 freq = ca.freq() 

686 

687 -------------------------------------------------------------------------------- 

688 

689 """ 

690 return _calanalysis.calanalysis_freq(self) 

691 

692 

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

694 """ 

695 get(self, _field, _antenna, _timerange, _spw, _feed, _axis, _ap, _norm, _unwrap, _jumpmax) -> record * 

696 

697 

698 

699 Summary: 

700 Return the calibration data. 

701 

702 Description: 

703 

704 

705 This member function returns the calibration data. 

706 

707 Input Parameters: 

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

709 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).  

710 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).  

711 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).  

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

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

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

715 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'.  

716 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'.  

717 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).  

718 

719 Example: 

720 

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

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

723 

724 -------------------------------------------------------------------------------- 

725 

726 """ 

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

728 

729 

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

731 """ 

732 fit(self, _field, _antenna, _timerange, _spw, _feed, _axis, _ap, _norm, _unwrap, _jumpmax, _order, _type, _weight) -> record * 

733 

734 

735 

736 Summary: 

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

738 

739 Description: 

740 

741 

742 This member function returns the calibration data and fits along the 

743 non-iteration axis. 

744 

745 Input Parameters: 

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

747 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).  

748 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).  

749 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).  

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

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

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

753 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'.  

754 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'.  

755 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).  

756 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'.  

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

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

759 

760 Example: 

761 

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

763 # is linear. 

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

765 

766 -------------------------------------------------------------------------------- 

767 

768 """ 

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

770 

771 __swig_destroy__ = _calanalysis.delete_calanalysis 

772 __del__ = lambda self: None 

773calanalysis_swigregister = _calanalysis.calanalysis_swigregister 

774calanalysis_swigregister(calanalysis) 

775 

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

777 

778