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

134 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, '_vpmanager')).lstrip('.') 

13 try: 

14 return importlib.import_module(mname) 

15 except ImportError: 

16 return importlib.import_module('_vpmanager') 

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

26 except ImportError: 

27 import _vpmanager 

28 return _vpmanager 

29 try: 

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

31 finally: 

32 if fp is not None: 

33 fp.close() 

34 return _mod 

35 _vpmanager = swig_import_helper() 

36 del swig_import_helper 

37else: 

38 import _vpmanager 

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

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

100 

101 __swig_setmethods__ = {} 

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

103 __swig_getmethods__ = {} 

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

105 __repr__ = _swig_repr 

106 

107 def __init__(self): 

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

109 this = _vpmanager.new_vpmanager() 

110 try: 

111 self.this.append(this) 

112 except __builtin__.Exception: 

113 self.this = this 

114 

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

116 """ 

117 saveastable(self, _tablename) -> bool 

118 

119 

120 

121 Summary: 

122 Save the vp or pb descriptions as a table 

123 

124 Description: 

125 

126 

127 Save the vp or pb descriptions as a table. Each description is in a different 

128 row of the table. 

129 

130 Input Parameters: 

131 tablename Name of table to save vp descriptions in 

132 

133 -------------------------------------------------------------------------------- 

134 

135 """ 

136 return _vpmanager.vpmanager_saveastable(self, *args, **kwargs) 

137 

138 

139 def loadfromtable(self, *args, **kwargs): 

140 """ 

141 loadfromtable(self, _tablename) -> bool 

142 

143 

144 

145 Summary: 

146 Load the vp or pb descriptions from a table (deleting all previous definitions) 

147 

148 Description: 

149 

150 

151 Load the vp or pb descriptions from a table created, e.g., with saveastable(). 

152 

153 Input Parameters: 

154 tablename Name of table to load vp descriptions from 

155 

156 -------------------------------------------------------------------------------- 

157 

158 """ 

159 return _vpmanager.vpmanager_loadfromtable(self, *args, **kwargs) 

160 

161 

162 def summarizevps(self, *args, **kwargs): 

163 """ 

164 summarizevps(self, _verbose) -> bool 

165 

166 

167 

168 Summary: 

169 Summarize the currently accumulated VP descriptions 

170 

171 Description: 

172 

173 

174 Summarize the currently accumulated VP descriptions to the logger. 

175 

176 Input Parameters: 

177 verbose Print out full record? Otherwise, print summary. 

178 

179 -------------------------------------------------------------------------------- 

180 

181 """ 

182 return _vpmanager.vpmanager_summarizevps(self, *args, **kwargs) 

183 

184 

185 def setcannedpb(self, *args, **kwargs): 

186 """ 

187 setcannedpb(self, _telescope, _othertelescope, _dopb, _commonpb, _dosquint, _paincrement, _usesymmetricbeam) -> record * 

188 

189 

190 

191 Summary: 

192 Select a vp/pb from our library of common pb models 

193 

194 Description: 

195 

196 

197 We have many vp/pb models ready to go for a variety of telescopes. If 'DEFAULT' isselected, the system default for that telescope and frequency is used. 

198 

199 Input Parameters: 

200 telescope Which telescope in the MS will use this vp/pb? 

201 othertelescope If telescope=='OTHER', specify name here 

202 dopb Should we apply the vp/pb to this telescope's data? 

203 commonpb List of common vp/pb models: DEFAULT code figures it out 

204 dosquint Enable the natural beam squint found in the common vp model 

205 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 

206 usesymmetricbeam Not currently used 

207 

208 -------------------------------------------------------------------------------- 

209 

210 """ 

211 return _vpmanager.vpmanager_setcannedpb(self, *args, **kwargs) 

212 

213 

214 def setpbairy(self, *args, **kwargs): 

215 """ 

216 setpbairy(self, _telescope, _othertelescope, _dopb, _dishdiam, _blockagediam, _maxrad, _reffreq, _squintdir, _squintreffreq, _dosquint, _paincrement, _usesymmetricbeam) -> record * 

217 

218 

219 

220 Summary: 

221 Make an airy disk vp 

222 

223 Description: 

224 

225 

226 Information sufficient to create a portion of the Airy disk voltage pattern. 

227 The Airy disk pattern is formed by Fourier transforming a uniformly illuminated 

228 aperture and is given by 

229 begin{equation} 

230 vp_p(i) = ( areaRatio * 2.0 * j_{1}(x)/x 

231 - 2.0 * j_{1}(x*lengthRatio)/(x*lengthRatio) )/ areaNorm, 

232 end{equation} 

233 where areaRatio is the dish area divided by the blockage area, lengthRatio 

234 is the dish diameter divided by the blockage diameter, and 

235 begin{equation} 

236 x = frac{i * maxrad * 7.016 * dishdiam/24.5m}{N_{samples} * 1.566 * 60}. 

237 end{equation} 

238 

239 Input Parameters: 

240 telescope Which telescope in the MS will use this vp/pb? 

241 othertelescope If telescope=='OTHER', specify name here 

242 dopb Should we apply the vp/pb to this telescope's data? 

243 dishdiam Effective diameter of dish 

244 blockagediam Effective diameter of subreflector blockage 

245 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 

246 reffreq Frequency at which maxrad is specified 

247 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq) 

248 squintreffreq Frequency at which the squint is specified 

249 dosquint Enable the natural beam squint found in the common vp model 

250 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 

251 usesymmetricbeam Not currently used 

252 

253 -------------------------------------------------------------------------------- 

254 

255 """ 

256 return _vpmanager.vpmanager_setpbairy(self, *args, **kwargs) 

257 

258 

259 def setpbcospoly(self, *args, **kwargs): 

260 """ 

261 setpbcospoly(self, _telescope, _othertelescope, _dopb, _coeff, _scale, _maxrad, _reffreq, _isthispb, _squintdir, _squintreffreq, _dosquint, _paincrement, _usesymmetricbeam) -> record * 

262 

263 

264 

265 Summary: 

266 Make a vp/pb from a polynomial of scaled cosines 

267 

268 Description: 

269 

270 

271 A voltage pattern or primary beam of the form 

272 begin{equation} 

273 VP(x) = sum_{i} ( coeff_{i} cos^{2i}( scale_{i} x). 

274 end{equation} 

275 This is a generalization of the WSRT primary beam model. 

276 

277 Input Parameters: 

278 telescope Which telescope in the MS will use this vp/pb? 

279 othertelescope If telescope=='OTHER', specify name here 

280 dopb Should we apply the vp/pb to this telescope's data? 

281 coeff Vector of coefficients of cosines 

282 scale Vector of scale factors of cosines 

283 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 

284 reffreq Frequency at which maxrad is specified 

285 isthispb Do these parameters describe a PB or a VP? 

286 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq) 

287 squintreffreq Frequency at which the squint is specified 

288 dosquint Enable the natural beam squint found in the common vp model 

289 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 

290 usesymmetricbeam Not currently used 

291 

292 -------------------------------------------------------------------------------- 

293 

294 """ 

295 return _vpmanager.vpmanager_setpbcospoly(self, *args, **kwargs) 

296 

297 

298 def setpbgauss(self, *args, **kwargs): 

299 """ 

300 setpbgauss(self, _telescope, _othertelescope, _dopb, _halfwidth, _maxrad, _reffreq, _isthispb, _squintdir, _squintreffreq, _dosquint, _paincrement, _usesymmetricbeam) -> record * 

301 

302 

303 

304 Summary: 

305 Make a Gaussian vp/pb 

306 

307 Description: 

308 

309 

310 Make a Gaussian primary beam given by 

311 begin{equation} 

312 PB(x) = e^{- (x/(halfwidth*sqrt{1/log(2)})) }. 

313 end{equation} 

314 

315 Input Parameters: 

316 telescope Which telescope in the MS will use this vp/pb? 

317 othertelescope If telescope=='OTHER', specify name here 

318 dopb Should we apply the vp/pb to this telescope's data? 

319 halfwidth Half power half width of the Gaussian at the reffreq 

320 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 

321 reffreq Frequency at which maxrad is specified 

322 isthispb Do these parameters describe a PB or a VP? 

323 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq) 

324 squintreffreq Frequency at which the squint is specified 

325 dosquint Enable the natural beam squint found in the common vp model 

326 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 

327 usesymmetricbeam Not currently used 

328 

329 -------------------------------------------------------------------------------- 

330 

331 """ 

332 return _vpmanager.vpmanager_setpbgauss(self, *args, **kwargs) 

333 

334 

335 def setpbinvpoly(self, *args, **kwargs): 

336 """ 

337 setpbinvpoly(self, _telescope, _othertelescope, _dopb, _coeff, _maxrad, _reffreq, _isthispb, _squintdir, _squintreffreq, _dosquint, _paincrement, _usesymmetricbeam) -> record * 

338 

339 

340 

341 Summary: 

342 Make a vp/pb as an inverse polynomial 

343 

344 Description: 

345 

346 

347 The inverse polynomial describes the inverse of the VP or PB 

348 as a polynomial of even powers: 

349 begin{equation} 

350 1/VP(x) = sum_{i} coeff_{i} * x^{2i}. 

351 end{equation} 

352 

353 Input Parameters: 

354 telescope Which telescope in the MS will use this vp/pb? 

355 othertelescope If telescope=='OTHER', specify name here 

356 dopb Should we apply the vp/pb to this telescope's data? 

357 coeff Coefficients of even powered terms 

358 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 

359 reffreq Frequency at which maxrad is specified 

360 isthispb Do these parameters describe a PB or a VP? 

361 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq) 

362 squintreffreq Frequency at which the squint is specified 

363 dosquint Enable the natural beam squint found in the common vp model 

364 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 

365 usesymmetricbeam Not currently used 

366 

367 -------------------------------------------------------------------------------- 

368 

369 """ 

370 return _vpmanager.vpmanager_setpbinvpoly(self, *args, **kwargs) 

371 

372 

373 def setpbnumeric(self, *args, **kwargs): 

374 """ 

375 setpbnumeric(self, _telescope, _othertelescope, _dopb, _vect, _maxrad, _reffreq, _isthispb, _squintdir, _squintreffreq, _dosquint, _paincrement, _usesymmetricbeam) -> record * 

376 

377 

378 

379 Summary: 

380 Make a vp/pb from a user-supplied vector 

381 

382 Description: 

383 

384 

385 Supply a vector of vp/pb sample values taken on a regular grid between x=0 and 

386 x=maxrad. We perform sinc interpolation to fill in the lookup table. 

387 

388 Input Parameters: 

389 telescope Which telescope in the MS will use this vp/pb? 

390 othertelescope If telescope=='OTHER', specify name here 

391 dopb Should we apply the vp/pb to this telescope's data? 

392 vect Vector of vp/pb samples uniformly spaced from 0 to maxrad 

393 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 

394 reffreq Frequency at which maxrad is specified 

395 isthispb Do these parameters describe a PB or a VP? 

396 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq) 

397 squintreffreq Frequency at which the squint is specified 

398 dosquint Enable the natural beam squint found in the common vp model 

399 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 

400 usesymmetricbeam Not currently used 

401 

402 -------------------------------------------------------------------------------- 

403 

404 """ 

405 return _vpmanager.vpmanager_setpbnumeric(self, *args, **kwargs) 

406 

407 

408 def setpbimage(self, *args, **kwargs): 

409 """ 

410 setpbimage(self, _telescope, _othertelescope, _dopb, _realimage, _imagimage, _compleximage, _antnames) -> record * 

411 

412 

413 

414 Summary: 

415 Make a vp/pb from a user-supplied image 

416 

417 Description: 

418 

419 

420 Experimental: Supply an image of the E Jones elements. The format of the 

421 image is: 

422 begin{description} 

423 item[Shape] nx by ny by 4 complex polarizations (RR, RL, LR, LL or 

424 XX, XY, YX, YY) by 1 channel. 

425 item[Direction coordinate] Az, El 

426 item[Stokes coordinate] All four ``stokes'' parameters must be present 

427 in the sequence RR, RL, LR, LL or XX, XY, YX, YY. 

428 item[Frequency] Only one channel is currently needed - frequency 

429 dependence beyond that is ignored. 

430 end{description} 

431 

432 If a compleximage is specified the real and imaginary images is to be left empty. 

433 

434 The other option is to provide the real and imaginary part of the E-Jones as seperale {tt float} images 

435 On that case 

436 one or two images may be specified - the real (must be present) and 

437 imaginary parts (optional). 

438 

439 Note that beamsquint must be intrinsic to the images themselves. 

440 This will be accounted for correctly by regridding of the images 

441 from Az-El to Ra-Dec according to the parallactic angle. 

442 

443 antnames is the Vector of names for which this response pattern apply '*' is for all 

444 The name has to match exactly the name of the Antennas in the ANTENNA table of the MS with which 

445 you want to use this VPManager table or object. 

446 

447 Input Parameters: 

448 telescope Which telescope in the MS will use this vp/pb? 

449 othertelescope If telescope=='OTHER', specify name here 

450 dopb Should we apply the vp/pb to this telescope's data? 

451 realimage Real part of vp as an image 

452 imagimage Imaginary part of vp as an image 

453 compleximage complex vp as an image of complex numbers; if specified realimage and imagimage are ignored 

454 antnames antenna names for which this pattern is valid; default is all antennas 

455 

456 -------------------------------------------------------------------------------- 

457 

458 """ 

459 return _vpmanager.vpmanager_setpbimage(self, *args, **kwargs) 

460 

461 

462 def setpbpoly(self, *args, **kwargs): 

463 """ 

464 setpbpoly(self, _telescope, _othertelescope, _dopb, _coeff, _maxrad, _reffreq, _isthispb, _squintdir, _squintreffreq, _dosquint, _paincrement, _usesymmetricbeam) -> record * 

465 

466 

467 

468 Summary: 

469 Make a vp/pb from a polynomial 

470 

471 Description: 

472 

473 

474 The VP or PB is described as a polynomial of even powers: 

475 begin{equation} 

476 VP(x) = sum_{i} coeff_{i} * x^{2i}. 

477 end{equation} 

478 

479 Input Parameters: 

480 telescope Which telescope in the MS will use this vp/pb? 

481 othertelescope If telescope=='OTHER', specify name here 

482 dopb Should we apply the vp/pb to this telescope's data? 

483 coeff Coefficients of even powered terms 

484 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 

485 reffreq Frequency at which maxrad is specified 

486 isthispb Do these parameters describe a PB or a VP? 

487 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq) 

488 squintreffreq Frequency at which the squint is specified 

489 dosquint Enable the natural beam squint found in the common vp model 

490 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 

491 usesymmetricbeam Not currently used 

492 

493 -------------------------------------------------------------------------------- 

494 

495 """ 

496 return _vpmanager.vpmanager_setpbpoly(self, *args, **kwargs) 

497 

498 

499 def setpbantresptable(self, *args, **kwargs): 

500 """ 

501 setpbantresptable(self, _telescope, _othertelescope, _dopb, _antresppath) -> bool 

502 

503 

504 

505 Summary: 

506 Declare a reference to an antenna responses table 

507 

508 Description: 

509 

510 

511 Declare a reference to an antenna responses table containing a set of VP/PB definitions. 

512 

513 Input Parameters: 

514 telescope Which telescope in the MS will use this vp/pb? 

515 othertelescope If telescope=='OTHER', specify name here 

516 dopb Should we apply the vp/pb to this telescope's data? 

517 antresppath The path to the antenna responses table (absolute or relative to CASA data dir.) 

518 

519 -------------------------------------------------------------------------------- 

520 

521 """ 

522 return _vpmanager.vpmanager_setpbantresptable(self, *args, **kwargs) 

523 

524 

525 def reset(self): 

526 """ 

527 reset(self) -> bool 

528 

529 

530 

531 Summary: 

532 Reinitialize the VPManager (will erase all VPs and defaults defined on the command line) 

533 

534 Description: 

535 

536 

537 Reinitialize the VPManager database. 

538 Erase all VPs and defaults defined on the command line. 

539 

540 -------------------------------------------------------------------------------- 

541 

542 """ 

543 return _vpmanager.vpmanager_reset(self) 

544 

545 

546 def setuserdefault(self, *args, **kwargs): 

547 """ 

548 setuserdefault(self, _vplistnum, _telescope, _anttype) -> bool 

549 

550 

551 

552 Summary: 

553 Select the VP which is to be used by the imager for the given telescope and antenna type 

554 

555 Description: 

556 

557 

558 Selects the VP which is to be used by the imager for the given telescope and antenna type. 

559 Overwrites a previous default. Returns True if successful. 

560 

561 Input Parameters: 

562 vplistnum The number of the vp as displayed by summarizevps(), or -1 for internal default, or -2 for unset 

563 telescope Which telescope in the MS will use this vp/pb? 

564 anttype Which antennatype will use this vp/pb? Default: '' = all 

565 

566 -------------------------------------------------------------------------------- 

567 

568 """ 

569 return _vpmanager.vpmanager_setuserdefault(self, *args, **kwargs) 

570 

571 

572 def getuserdefault(self, *args, **kwargs): 

573 """ 

574 getuserdefault(self, _telescope, _anttype) -> long 

575 

576 

577 

578 Summary: 

579 Get the vp list number of the present default VP/PB for the given parameters (-1 = internal PB, -2 = none) 

580 

581 Description: 

582 

583 

584 Get the vp list number of the present default VP/PB for the given parameters. 

585 

586 Input Parameters: 

587 telescope Which telescope in the MS will use this vp/pb? 

588 anttype Which antennatype will use this vp/pb? Default: '' = all 

589 

590 -------------------------------------------------------------------------------- 

591 

592 """ 

593 return _vpmanager.vpmanager_getuserdefault(self, *args, **kwargs) 

594 

595 

596 def getanttypes(self, *args, **kwargs): 

597 """ 

598 getanttypes(self, _telescope, _obstime, _freq, _obsdirection) -> std::vector< std::string > 

599 

600 

601 

602 Summary: 

603 Return the list of available antenna types for the given parameters 

604 

605 Description: 

606 

607 

608 Get a list of the available antenna types. 

609 

610 Input Parameters: 

611 telescope Telescope name 

612 obstime Time of the observation (for versioning and reference frame calculations)  

613 freq Frequency of the observation (may include reference frame, default: LSRK)  

614 obsdirection Direction of the observation (may include reference frame, default: J2000). default: Zenith  

615 

616 -------------------------------------------------------------------------------- 

617 

618 """ 

619 return _vpmanager.vpmanager_getanttypes(self, *args, **kwargs) 

620 

621 

622 def numvps(self, *args, **kwargs): 

623 """ 

624 numvps(self, _telescope, _obstime, _freq, _obsdirection) -> long 

625 

626 

627 

628 Summary: 

629 Return the number of vps/pbs available for the given parameters 

630 

631 Description: 

632 

633 

634 Can be used to, e.g., determine the number of antenna types. 

635 Note: if a global response is defined for the telescope, this will increase the count of 

636 available vps/pbs by 1. 

637 

638 Input Parameters: 

639 telescope Telescope name 

640 obstime Time of the observation (for versioning and reference frame calculations)  

641 freq Frequency of the observation (may include reference frame, default: LSRK)  

642 obsdirection Direction of the observation (may include reference frame, default: J2000). default: Zenith  

643 

644 -------------------------------------------------------------------------------- 

645 

646 """ 

647 return _vpmanager.vpmanager_numvps(self, *args, **kwargs) 

648 

649 

650 def getvp(self, *args, **kwargs): 

651 """ 

652 getvp(self, _telescope, _antennatype, _obstime, _freq, _obsdirection) -> record * 

653 

654 

655 

656 Summary: 

657 Return the default vps/pbs record for the given parameters 

658 

659 Description: 

660 

661 

662 Record is empty if no matching vp/pb could be found. 

663 

664 Input Parameters: 

665 telescope Telescope name 

666 antennatype The antenna type as a string, e.g. 'DV' 

667 obstime Time of the observation (for versioning and reference frame calculations), e.g. 2011/12/12T00:00:00  

668 freq Frequency of the observation (may include reference frame, default: LSRK)  

669 obsdirection Direction of the observation (may include reference frame, default: J2000), default:  

670 

671 -------------------------------------------------------------------------------- 

672 

673 """ 

674 return _vpmanager.vpmanager_getvp(self, *args, **kwargs) 

675 

676 

677 def getvps(self, *args, **kwargs): 

678 """ 

679 getvps(self, _telescope, _antennas, _obstimestart, _obstimeend, _minfreq, _maxfreq, _obsdirection) -> record * 

680 

681 

682 

683 Summary: 

684 Return the default vps/pbs records for the given antenna list as subrecords in one record 

685 

686 Description: 

687 

688 

689 Record is empty if no matching vp/pb could be found. 

690 

691 Input Parameters: 

692 telescope Telescope name 

693 antennas The antenna names, e.g., as taken from the MS ANTENNA table 

694 obstimestart Time of the start of the observation (for versioning and reference frame calculations), e.g. 2011/12/12T00:00:00  

695 obstimeend Time of the end of the observation (for versioning and reference frame calculations), e.g. 2011/12/12T00:00:00  

696 minfreq Minimum frequency of the observation (may include reference frame, default: LSRK)  

697 maxfreq Maximum frequency of the observation (may include reference frame, default: LSRK)  

698 obsdirection Direction of the observation (may include reference frame, default: J2000), default:  

699 

700 -------------------------------------------------------------------------------- 

701 

702 """ 

703 return _vpmanager.vpmanager_getvps(self, *args, **kwargs) 

704 

705 

706 def createantresp(self, *args, **kwargs): 

707 """ 

708 createantresp(self, _imdir, _starttime, _bandnames, _bandminfreq, _bandmaxfreq) -> bool 

709 

710 

711 

712 Summary: 

713 Create a standard-format AntennaResponses table 

714 

715 Description: 

716 

717 

718 The AntennaResponses table serves CASA to look up the location of images describing the 

719 response of observatory antennas. Three types of images are supported: 'VP' - real voltage patterns, 

720 'AIF' - complex aperture illumination patterns, 'EFP' - complex electric field patterns. 

721 For each image, a validity range can be defined in Azimuth, Elevation, and Frequency. 

722 Furthermore, an antenna type (for heterogeneous arrays), a receiver type (for the case of 

723 several receivers on the same antenna having overlapping frequency bands), and a beam number 

724 (for the case of multiple beams per antenna) are associated with each response image. 

725 

726 The images need to be stored in a single directory DIR of arbitrary name and need to 

727 have file names following the pattern 

728 begin{verbatim} 

729 obsname_beamnum_anttype_rectype_azmin_aznom_azmax_elmin_elnom_elmax_freqmin_freqnom_freqmax_frequnit_comment_functype.im 

730 end{verbatim} 

731 where the individual name elements mean the following (none of the elements may contain 

732 the space character, but they may be empty strings if they are not numerical values): 

733 begin{description} 

734 item[obsname] - name of the observatory as in the Observatories table, e.g. 'ALMA' 

735 item[beamnum] - the numerical beam number (integer) for the case of multiple beams, e.g. 0 

736 item[anttype] - name of the antenna type, e.g. 'DV' 

737 item[rectype] - name of the receiver type, e.g. '' 

738 item[azmin, aznom, azmax] - numerical value (degrees) of the minimal, the nominal, and 

739 the maximal Azimuth where this response is valid, e.g. '-10.5_0._10.5' 

740 item[elmin, elnom, elmax] - numerical value (degrees) of the minimal, the nominal, and 

741 the maximal Elevation where this response is valid, e.g. '10._45._80.' 

742 item[freqmin, freqnom, freqmax] - numerical value (degrees) of the minimal, the nominal, and 

743 the maximal Frequency (in units of frequnit) where this response is valid, e.g. '84._100._116.' 

744 item[frequnit] - the unit of the previous three frequencies, e.g. 'GHz' 

745 item[comment] - any string containing only characters permitted in file names and not empty space 

746 item[functype] - the type of the image as defined above ('VP', 'AIF', or 'EFP') 

747 end{description} 

748 

749 The createantresp method will then extract the parameters from all the images in DIR 

750 and create the lookup table in the same directory. 

751 

752 Input Parameters: 

753 imdir Path to the directory containing the response images 

754 starttime Time from which onwards the response is valid, format YYYY/MM/DD/hh:mm:ss 

755 bandnames List containing the names of the observatory's frequency bands 

756 bandminfreq List containing the lower edges of the observatory's frequency bands, e.g. ['80GHz','120GHz'] 

757 bandmaxfreq List containing the upper edges of the observatory's frequency bands, e.g. ['120GHz','180GHz'] 

758 

759 -------------------------------------------------------------------------------- 

760 

761 """ 

762 return _vpmanager.vpmanager_createantresp(self, *args, **kwargs) 

763 

764 

765 def getrespimagename(self, *args, **kwargs): 

766 """ 

767 getrespimagename(self, _telescope, _starttime, _frequency, _functype, _anttype, _azimuth, _elevation, _rectype, _beamnumber) -> string 

768 

769 

770 

771 Summary: 

772 Get the image name for the given parameters from the given responses table 

773 

774 Description: 

775 

776 

777 Given the observatory name, the antenna type, the receiver type, the observing frequency, the 

778 observing direction, and the beam number, find the applicable response image and return its name. 

779 

780 Input Parameters: 

781 telescope Which telescope is described by this response? 

782 starttime Time at which the response has to be valid, format YYYY/MM/DD/hh:mm:ss 

783 frequency The frequency at which the response has to be valid, e.g. '100GHz' 

784 functype Type of the responsefunction requested, e.g. 'EFP' 

785 anttype Antenna type (observatory-dependent) 

786 azimuth Azimuth of the observation (at the location of the observatory, 0 is North), e.g. '5deg' 

787 elevation Elevation of the observation (at the location of the observatory, 0 is North), e.g. '60deg' 

788 rectype Receiver type (observatory-dependent) 

789 beamnumber Beam number (for the case of multiple beams per receiver) 

790 

791 -------------------------------------------------------------------------------- 

792 

793 """ 

794 return _vpmanager.vpmanager_getrespimagename(self, *args, **kwargs) 

795 

796 __swig_destroy__ = _vpmanager.delete_vpmanager 

797 __del__ = lambda self: None 

798vpmanager_swigregister = _vpmanager.vpmanager_swigregister 

799vpmanager_swigregister(vpmanager) 

800 

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

802 

803