Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/msuvbinner.py: 59%

22 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-10-31 17:39 +0000

1##################### generated by xml-casa (v2) from msuvbinner.xml ################ 

2##################### 88ce2d28449807b36b27090e0b1d1699 ############################## 

3from __future__ import absolute_import 

4from .__casac__.msuvbinner import msuvbinner as _msuvbinner 

5 

6from .errors import create_error_string 

7from .typecheck import CasaValidator as _validator 

8_pc = _validator( ) 

9from .coercetype import coerce as _coerce 

10 

11 

12class msuvbinner: 

13 _info_group_ = """msuvbinner""" 

14 _info_desc_ = """Create a gridded/and or bin onto a measurementset from a set of measurementsets """ 

15 ### self, phasecenter='', nx=int(256), ny=int(256), ncorr=int(1), nchan=int(1), cellx='1arcsec', celly='1arcsec', fstart='1GHz', fstep='1MHz', memfrac=float(0.5), wproject=False, doflag=False 

16 def __init__(self, phasecenter='', nx=int(256), ny=int(256), ncorr=int(1), nchan=int(1), cellx='1arcsec', celly='1arcsec', fstart='1GHz', fstep='1MHz', memfrac=float(0.5), wproject=False, doflag=False, *args, **kwargs): 

17 """ 

18 """ 

19 schema = {'phasecenter': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cDict'}]}, 'nx': {'type': 'cInt'}, 'ny': {'type': 'cInt'}, 'ncorr': {'type': 'cInt'}, 'nchan': {'type': 'cInt'}, 'cellx': {'type': 'cStr', 'coerce': _coerce.to_str}, 'celly': {'type': 'cStr', 'coerce': _coerce.to_str}, 'fstart': {'type': 'cStr', 'coerce': _coerce.to_str}, 'fstep': {'type': 'cStr', 'coerce': _coerce.to_str}, 'memfrac': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'wproject': {'type': 'cBool'}, 'doflag': {'type': 'cBool'}} 

20 doc = {'phasecenter': phasecenter, 'nx': nx, 'ny': ny, 'ncorr': ncorr, 'nchan': nchan, 'cellx': cellx, 'celly': celly, 'fstart': fstart, 'fstep': fstep, 'memfrac': memfrac, 'wproject': wproject, 'doflag': doflag} 

21 assert _pc.validate(doc,schema), create_error_string(_pc.errors) 

22 self._swigobj = kwargs.get('swig_object',None) 

23 if self._swigobj is None: 

24 self._swigobj = _msuvbinner(_pc.document['phasecenter'], _pc.document['nx'], _pc.document['ny'], _pc.document['ncorr'], _pc.document['nchan'], _pc.document['cellx'], _pc.document['celly'], _pc.document['fstart'], _pc.document['fstep'], _pc.document['memfrac'], _pc.document['wproject'], _pc.document['doflag']) 

25 

26 def selectdata(self, msname='', spw='', field='0', baseline='', scan='', uvrange='', taql=''): 

27 """ 

28 """ 

29 return self._swigobj.selectdata(msname, spw, field, baseline, scan, uvrange, taql) 

30 

31 def setoutputms(self, outms=''): 

32 """Where gridded visibilities will be stored; either an already existant ms or a new one will be made. If a file of the name exist and the input parameters match then new gridded data will be added to the existing one; this is the way to add data of multiple epochs on the same grid. 

33  

34 """ 

35 return self._swigobj.setoutputms(outms) 

36 

37 def filloutputms(self): 

38 """launch gridding process from selected input to set output 

39  

40 """ 

41 return self._swigobj.filloutputms() 

42