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

150 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, '_synthesisimager')).lstrip('.') 

13 try: 

14 return importlib.import_module(mname) 

15 except ImportError: 

16 return importlib.import_module('_synthesisimager') 

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

26 except ImportError: 

27 import _synthesisimager 

28 return _synthesisimager 

29 try: 

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

31 finally: 

32 if fp is not None: 

33 fp.close() 

34 return _mod 

35 _synthesisimager = swig_import_helper() 

36 del swig_import_helper 

37else: 

38 import _synthesisimager 

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

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

100 

101 __swig_setmethods__ = {} 

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

103 __swig_getmethods__ = {} 

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

105 __repr__ = _swig_repr 

106 

107 def __init__(self): 

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

109 this = _synthesisimager.new_synthesisimager() 

110 try: 

111 self.this.append(this) 

112 except __builtin__.Exception: 

113 self.this = this 

114 

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

116 """ 

117 selectdata(self, _selpars) -> bool 

118 

119 

120 

121 Summary: 

122 Select data from one MS 

123 

124 Input Parameters: 

125 selpars All parameters that control selection within one MS 

126 

127 -------------------------------------------------------------------------------- 

128 

129 """ 

130 return _synthesisimager.synthesisimager_selectdata(self, *args, **kwargs) 

131 

132 

133 def tuneselectdata(self): 

134 """ 

135 tuneselectdata(self) -> record * 

136 

137 

138 

139 Summary: 

140 reselect the data to match image definition 

141 

142 -------------------------------------------------------------------------------- 

143 

144 """ 

145 return _synthesisimager.synthesisimager_tuneselectdata(self) 

146 

147 

148 def defineimage(self, *args, **kwargs): 

149 """ 

150 defineimage(self, _impars, _gridpars) -> bool 

151 

152 

153 

154 Summary: 

155 Define image coordinate systems FTMs 

156 

157 Input Parameters: 

158 impars All parameters that control image coordinate system definition 

159 gridpars All parameters that control ftmachines and gridding parameters 

160 

161 -------------------------------------------------------------------------------- 

162 

163 """ 

164 return _synthesisimager.synthesisimager_defineimage(self, *args, **kwargs) 

165 

166 

167 def normalizerinfo(self, *args, **kwargs): 

168 """ 

169 normalizerinfo(self, _normpars) -> bool 

170 

171 

172 

173 Summary: 

174 pass normalizer info for C++ normalization in lieu of python based normalization 

175 

176 Input Parameters: 

177 normpars Normalization parameters in a record 

178 

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

180 

181 """ 

182 return _synthesisimager.synthesisimager_normalizerinfo(self, *args, **kwargs) 

183 

184 

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

186 """ 

187 setdata(self, _msname, _spw, _freqbeg, _freqend, _freqframe, _field, _antenna, _timestr, _scan, _obs, _state, _uvdist, _taql, _usescratch, _readonly, _incrmodel) -> bool 

188 

189 

190 

191 Summary: 

192 Select data from one MS via conventional parameters (in lieu of selectdata) 

193 

194 Description: 

195 

196 

197 Select data from one MS. Call this function in succession if there are 

198 multiple MSs. 

199 

200 Input Parameters: 

201 msname Name of one measurement set 

202 spw Spectral Window / Channel / Frequency selection 

203 freqbeg Starting frequency/velocity/channel as a string with units. If spw is also supplied, the intersection will be used 

204 freqend End frequency/velocity/channel as a string with units. 

205 freqframe Frequency frame in which freqbeg and freqend are specified. 

206 field Field selection 

207 antenna Antenna / Baseline selection 

208 timestr Time range selection 

209 scan Scan selection 

210 obs Observation id selection 

211 state Scan Intent or State selection 

212 uvdist UV range selection 

213 taql Generic taql selection 

214 usescratch Use scratch column (True) or virtual records (False) for model data 

215 readonly Open the MS in readonly mode. No model data will be written. 

216 incrmodel Subtract existing model data and start with residuals 

217 

218 -------------------------------------------------------------------------------- 

219 

220 """ 

221 return _synthesisimager.synthesisimager_setdata(self, *args, **kwargs) 

222 

223 

224 def setimage(self, *args, **kwargs): 

225 """ 

226 setimage(self, _imagename, _nx, _ny, _cellx, _celly, _stokes, _phasecenter, _nchan, _freqstart, _freqstep, _restfreq, _facets, _ftmachine, _ntaylorterms, _reffreq, _projection, _distance, _freqframe, _tracksource, _trackdir, _overwrite, _padding, _useautocorr, _usedoubleprec, _wprojplanes, _convfunc, _startmodel, _aterm, _psterm, _mterm, _wbawp, _cfcache, _usepointing, _pointingoffsetsigdev, _dopbcorr, _conjbeams, _computepastep, _rotatepastep) -> bool 

227 

228 

229 

230 Summary: 

231 Define the image coordinate systems and types via conventinal parameters in lieu of defineimage 

232 

233 Description: 

234 

235 

236 Define the image coordinate systems and shapes. 

237 

238 Input Parameters: 

239 imagename Base image name 

240 nx Total number of spatial pixels in x 

241 ny Total number of spatial pixels in y 

242 cellx Cellsize in x (e.g. '1arcsec') 

243 celly Cellsize in y (e.g. '1arcsec') 

244 stokes Stokes parameters to image (e.g. 'IQUV') 

245 phasecenter Direction of phase center as a diretion measure or a field id  

246 nchan Number of channels; a -1 (default) means all the channels as selected in selectvis and combined into one continuum channel  

247 freqstart Start channel; A 0-relative channel number of the spwid or a frequency quantity or a velocity quantity or radial velocity measure 

248 freqstep Step in channel; integer for number of channels or frequency quantity or velocity quantity or radial velocity measure 

249 restfreq rest frequency to use; default => use the one available in ms  

250 facets Number of facets on each axis 

251 ftmachine FT-Machine type 

252 ntaylorterms Number of terms for a spectral Taylor expansion 

253 reffreq Reference Frequency of the image. Also used in the Taylor expansion. 

254 projection Image coordinate system projection 

255 distance Distance to object: usually ignore this! (m) 

256 freqframe Frequency frame in which freqstart and freqstep are specified. 

257 tracksource Track a source. 

258 trackdir Name of moving source, e.g planet or moon, to keep fixed in image 

259 overwrite Overwrite the image if it exists (true) 

260 padding FFT padding 

261 useautocorr Use auto correlations 

262 usedoubleprec Double Precision gridding or not 

263 wprojplanes Number of w-projection planes 

264 convfunc Name of convolution function 

265 startmodel Starting model ( image name or component list name ) 

266 aterm Set the antenna aperture tmer (aterm) on/off 

267 psterm Set the Prolate Spheroidal term (psterm) on/off 

268 mterm Set the mosaic term (mterm) on/off 

269 wbawp Set usage of the wide-band A-Projection algorithm 

270 cfcache Name of convolution function disk cache 

271 usepointing Control application of the pointing correction 

272 pointingoffsetsigdev Control application of the pointing correction for heterogenous array allowing for antenna pointing group identification using this parameter. The parameter has a significant cost on the memory used for gridding. Please utilize it wisely. 

273 dopbcorr Control normalization of the raw image by the model PB 

274 conjbeams Set conjbeams on/off 

275 computepastep Increment in PA after which re-computation of the GCFs is triggered. 360.0 implies compute GCFs for only the first PA value encountered in the MS. 

276 rotatepastep Increment in PA after which trigger in-memory rotation of the GCF nearest to the current PA value in the CF cache. 

277 

278 -------------------------------------------------------------------------------- 

279 

280 """ 

281 return _synthesisimager.synthesisimager_setimage(self, *args, **kwargs) 

282 

283 

284 def setweighting(self, *args, **kwargs): 

285 """ 

286 setweighting(self, _type, _rmode, _noise, _robust, _fieldofview, _npixels, _multifield, _usecubebriggs, _uvtaper) -> bool 

287 

288 

289 

290 Summary: 

291 Set parameters to control weighting during imaging 

292 

293 Input Parameters: 

294 type Data weighting scheme 

295 rmode rmode 

296 noise Noise level 

297 robust Robustness weighting factor 

298 fieldofview Field of view 

299 npixels NPixels 

300 multifield Multifield 

301 usecubebriggs Use per channel weight density calculation for Briggs style weighting 

302 uvtaper Parameters of uv-taper Gaussian 

303 

304 -------------------------------------------------------------------------------- 

305 

306 """ 

307 return _synthesisimager.synthesisimager_setweighting(self, *args, **kwargs) 

308 

309 

310 def makepsf(self): 

311 """ 

312 makepsf(self) -> bool 

313 

314 

315 

316 Summary: 

317 Make the psf 

318 

319 -------------------------------------------------------------------------------- 

320 

321 """ 

322 return _synthesisimager.synthesisimager_makepsf(self) 

323 

324 

325 def apparentsens(self): 

326 """ 

327 apparentsens(self) -> record * 

328 

329 

330 

331 Summary: 

332 Calculate apparent aggregate sensitivity in the selected visibilities 

333 

334 -------------------------------------------------------------------------------- 

335 

336 """ 

337 return _synthesisimager.synthesisimager_apparentsens(self) 

338 

339 

340 def predictmodel(self): 

341 """ 

342 predictmodel(self) -> bool 

343 

344 

345 

346 Summary: 

347 Predict model visibilities. 

348 

349 -------------------------------------------------------------------------------- 

350 

351 """ 

352 return _synthesisimager.synthesisimager_predictmodel(self) 

353 

354 

355 def drygridding(self, *args, **kwargs): 

356 """ 

357 drygridding(self, _cflist) -> bool 

358 

359 

360 

361 Summary: 

362 Run a dry gridding run. 

363 

364 Description: 

365 

366 

367 

368 

369 Input Parameters: 

370 cflist List of CFs  

371 

372 -------------------------------------------------------------------------------- 

373 

374 """ 

375 return _synthesisimager.synthesisimager_drygridding(self, *args, **kwargs) 

376 

377 

378 def fillcfcache(self, *args, **kwargs): 

379 """ 

380 fillcfcache(self, _cflist, _ftmname, _cfcpath, _pstermon, _atermon, _conjbeams) -> bool 

381 

382 

383 

384 Summary: 

385 Fill a potentially blank CFCache held inside the AWProject-class FTMachines.  

386 

387 Description: 

388 

389 

390 

391 

392 Input Parameters: 

393 cflist List of CFs  

394 ftmname Name of the FTMachine used  

395 cfcpath Path to the CFCache on the disk  

396 pstermon Is the PS-term ON?  

397 atermon Is the A-term ON?  

398 conjbeams Use WB A-Projection algorithm (use frequency-conjugate beams)?  

399 

400 -------------------------------------------------------------------------------- 

401 

402 """ 

403 return _synthesisimager.synthesisimager_fillcfcache(self, *args, **kwargs) 

404 

405 

406 def reloadcfcache(self): 

407 """ 

408 reloadcfcache(self) -> bool 

409 

410 

411 

412 Summary: 

413 Re-load the CFCache, the name of which should already be set in the tool.  

414 

415 Description: 

416 

417 

418 

419 

420 -------------------------------------------------------------------------------- 

421 

422 """ 

423 return _synthesisimager.synthesisimager_reloadcfcache(self) 

424 

425 

426 def executemajorcycle(self, *args, **kwargs): 

427 """ 

428 executemajorcycle(self, _controls) -> bool 

429 

430 

431 

432 Summary: 

433 Run a major cycle 

434 

435 Input Parameters: 

436 controls All parameters that control major cycle 

437 

438 -------------------------------------------------------------------------------- 

439 

440 """ 

441 return _synthesisimager.synthesisimager_executemajorcycle(self, *args, **kwargs) 

442 

443 

444 def makepb(self): 

445 """ 

446 makepb(self) -> bool 

447 

448 

449 

450 Summary: 

451 Make the primary beam 

452 

453 -------------------------------------------------------------------------------- 

454 

455 """ 

456 return _synthesisimager.synthesisimager_makepb(self) 

457 

458 

459 def makesdimage(self): 

460 """ 

461 makesdimage(self) -> bool 

462 

463 

464 

465 Summary: 

466 Make the single-dish image 

467 

468 -------------------------------------------------------------------------------- 

469 

470 """ 

471 return _synthesisimager.synthesisimager_makesdimage(self) 

472 

473 

474 def makesdpsf(self): 

475 """ 

476 makesdpsf(self) -> bool 

477 

478 

479 

480 Summary: 

481 Make the single-dish PSF 

482 

483 -------------------------------------------------------------------------------- 

484 

485 """ 

486 return _synthesisimager.synthesisimager_makesdpsf(self) 

487 

488 

489 def makeimage(self, *args, **kwargs): 

490 """ 

491 makeimage(self, _type, _image, _compleximage, _model) -> bool 

492 

493 

494 

495 Summary: 

496 calculate images of different type by gridding 

497 

498 Description: 

499 

500 

501 This tool function actually does gridding (and Fourier inversion if 

502 needed) of visibility data to make an image. It allows calculation of 

503 various types of image: 

504 begin{description} 

505 item[observed] Make the dirty image from the DATA column ({em default}) 

506 item[model] Make the dirty image from the MODEL_DATA column 

507 item[corrected] Make the dirty image from the CORRECTED_DATA column 

508 item[residual] Make the dirty image from the difference of the 

509 CORRECTED_DATA and MODEL_DATA columns 

510 item[psf] Make the point spread function 

511 item[singledish] Make a single dish image 

512 item[coverage] Make a single dish or mosaic coverage image 

513 item[holography] Make a complex holography image (experimental) 

514 

515 end{description} 

516 

517 Input Parameters: 

518 type Type of output image 

519 image Name of output image 

520 compleximage Name of output complex image 

521 model In case of multifield which image 

522 

523 -------------------------------------------------------------------------------- 

524 

525 """ 

526 return _synthesisimager.synthesisimager_makeimage(self, *args, **kwargs) 

527 

528 

529 def unlockimages(self, *args, **kwargs): 

530 """ 

531 unlockimages(self, _imagefieldid) -> bool 

532 

533 

534 

535 Summary: 

536 release some images attached to this process 

537 

538 Description: 

539 

540 

541 Try to unlock images if the need arise 

542 

543 Input Parameters: 

544 imagefieldid which image or outlier to unlock 

545 

546 -------------------------------------------------------------------------------- 

547 

548 """ 

549 return _synthesisimager.synthesisimager_unlockimages(self, *args, **kwargs) 

550 

551 

552 def estimatememory(self): 

553 """ 

554 estimatememory(self) -> variant * 

555 

556 

557 

558 Summary: 

559 Get an estimate in kilobytes of memory that will be needed 

560 

561 Description: 

562 

563 

564 This function returns an estimate of the memory (RAM) to be used by sythesisimager tool. Need to be run after functions setdata and defineimage are done 

565 

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

567 

568 """ 

569 return _synthesisimager.synthesisimager_estimatememory(self) 

570 

571 

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

573 """ 

574 getimstore(self, _id) -> casac::synthesisimstore * 

575 

576 

577 

578 Summary: 

579 Get Image Store 

580 

581 Input Parameters: 

582 id Image field id 

583 

584 -------------------------------------------------------------------------------- 

585 

586 """ 

587 return _synthesisimager.synthesisimager_getimstore(self, *args, **kwargs) 

588 

589 

590 def getImageName(self, *args, **kwargs): 

591 """ 

592 getImageName(self, _facetId, _imageId, _taylorTerm) -> string 

593 

594 

595 

596 Summary: 

597 Get Image Name 

598 

599 Description: 

600 

601 

602 Get the image name for the given type of image (eg 'PB'), the facet index, and the taylor term. 

603 

604 

605 Input Parameters: 

606 facetId Facet index 

607 imageId Image identifer (eg 'PSF') 

608 taylorTerm Taylor term. Only needed for mfs deconvolvers. 

609 

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

611 

612 """ 

613 return _synthesisimager.synthesisimager_getImageName(self, *args, **kwargs) 

614 

615 

616 def getcsys(self): 

617 """ 

618 getcsys(self) -> record * 

619 

620 

621 

622 Summary: 

623 get internally stored coordsys record 

624 

625 -------------------------------------------------------------------------------- 

626 

627 """ 

628 return _synthesisimager.synthesisimager_getcsys(self) 

629 

630 

631 def updatenchan(self): 

632 """ 

633 updatenchan(self) -> long 

634 

635 

636 

637 Summary: 

638 get internally stored updated nchan 

639 

640 -------------------------------------------------------------------------------- 

641 

642 """ 

643 return _synthesisimager.synthesisimager_updatenchan(self) 

644 

645 

646 def getweightdensity(self): 

647 """ 

648 getweightdensity(self) -> string 

649 

650 

651 

652 Summary: 

653 Save natural gridded wt to disk. 

654 

655 -------------------------------------------------------------------------------- 

656 

657 """ 

658 return _synthesisimager.synthesisimager_getweightdensity(self) 

659 

660 

661 def setweightdensity(self, *args, **kwargs): 

662 """ 

663 setweightdensity(self, _type) -> bool 

664 

665 

666 

667 Summary: 

668 Load the gridded weight density into image weighting generation 

669 

670 Description: 

671 

672 

673 Load the gridded weight density into image weighting; useful in parallel when weight density is combined into one image and loaded in each process. if no imagename is passed the imagename.weight is loaded 

674 

675 

676 Input Parameters: 

677 type name of image holding combined weight density 

678 

679 -------------------------------------------------------------------------------- 

680 

681 """ 

682 return _synthesisimager.synthesisimager_setweightdensity(self, *args, **kwargs) 

683 

684 

685 def initmpi(self): 

686 """ 

687 initmpi(self) -> bool 

688 

689 

690 

691 Summary: 

692 init c++ based mpi 

693 

694 -------------------------------------------------------------------------------- 

695 

696 """ 

697 return _synthesisimager.synthesisimager_initmpi(self) 

698 

699 

700 def releasempi(self): 

701 """ 

702 releasempi(self) -> bool 

703 

704 

705 

706 Summary: 

707 release c++ based mpi back to python 

708 

709 -------------------------------------------------------------------------------- 

710 

711 """ 

712 return _synthesisimager.synthesisimager_releasempi(self) 

713 

714 

715 def done(self): 

716 """ 

717 done(self) -> bool 

718 

719 

720 

721 Summary: 

722 Close the tool 

723 

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

725 

726 """ 

727 return _synthesisimager.synthesisimager_done(self) 

728 

729 __swig_destroy__ = _synthesisimager.delete_synthesisimager 

730 __del__ = lambda self: None 

731synthesisimager_swigregister = _synthesisimager.synthesisimager_swigregister 

732synthesisimager_swigregister(synthesisimager) 

733 

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

735 

736