Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/__casac__/msuvbinner.py: 37%
98 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-01 07:19 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-01 07:19 +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.
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, '_msuvbinner')).lstrip('.')
13 try:
14 return importlib.import_module(mname)
15 except ImportError:
16 return importlib.import_module('_msuvbinner')
17 _msuvbinner = 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('_msuvbinner', [dirname(__file__)])
26 except ImportError:
27 import _msuvbinner
28 return _msuvbinner
29 try:
30 _mod = imp.load_module('_msuvbinner', fp, pathname, description)
31 finally:
32 if fp is not None:
33 fp.close()
34 return _mod
35 _msuvbinner = swig_import_helper()
36 del swig_import_helper
37else:
38 import _msuvbinner
39del _swig_python_version_info
41try:
42 _swig_property = property
43except NameError:
44 pass # Python < 2.2 doesn't have 'property'.
46try:
47 import builtins as __builtin__
48except ImportError:
49 import __builtin__
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)
70def _swig_setattr(self, class_type, name, value):
71 return _swig_setattr_nondynamic(self, class_type, name, value, 0)
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))
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,)
90try:
91 _object = object
92 _newclass = 1
93except __builtin__.Exception:
94 class _object:
95 pass
96 _newclass = 0
98class msuvbinner(_object):
99 """Proxy of C++ casac::msuvbinner class."""
101 __swig_setmethods__ = {}
102 __setattr__ = lambda self, name, value: _swig_setattr(self, msuvbinner, name, value)
103 __swig_getmethods__ = {}
104 __getattr__ = lambda self, name: _swig_getattr(self, msuvbinner, name)
105 __repr__ = _swig_repr
107 def __init__(self, *args, **kwargs):
108 """__init__(self, _phasecenter, _nx, _ny, _ncorr, _nchan, _cellx, _celly, _fstart, _fstep, _memfrac, _wproject, _doflag) -> msuvbinner"""
109 this = _msuvbinner.new_msuvbinner(*args, **kwargs)
110 try:
111 self.this.append(this)
112 except __builtin__.Exception:
113 self.this = this
115 def selectdata(self, *args, **kwargs):
116 """
117 selectdata(self, _msname, _spw, _field, _baseline, _scan, _uvrange, _taql) -> bool
121 Summary:
122 select the data from input ms that will go on the gridded vis
124 Description:
129 Input Parameters:
130 msname Path to the MS to import
131 spw Spectral window selection (using MSSelection syntax)
132 field field selection
133 baseline baselines selection (using MSSelection syntax)
134 scan Scan selection
135 uvrange uvrange
136 taql Generic TaQL selection
138 --------------------------------------------------------------------------------
140 """
141 return _msuvbinner.msuvbinner_selectdata(self, *args, **kwargs)
144 def setoutputms(self, *args, **kwargs):
145 """
146 setoutputms(self, _outms) -> bool
150 Summary:
151 define gridded visibilities output; either existing grid or a new one will be made
153 Description:
156 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.
159 Input Parameters:
160 outms Output ms name
162 --------------------------------------------------------------------------------
164 """
165 return _msuvbinner.msuvbinner_setoutputms(self, *args, **kwargs)
168 def filloutputms(self):
169 """
170 filloutputms(self) -> bool
174 Summary:
175 launch gridding process from selected input to set output
177 Description:
180 launch gridding process from selected input to set output
183 Example:
185 from casatools import msuvbinner
186 ##define the output grid parameters, like phasecenter and number of channels
187 msbinner=msuvbinner(phasecenter='J2000 19h30m20.9 -19d50m22.7', nx=2000, ny=2000, ncorr=1, nchan=16, cellx='10arcsec', celly='10arcsec', fstart='975MHz', fstep='50kHz', memfrac=0.9, wproject=False, doflag=False)
188 #select the data; note taql usage to avoid a baseline band where -10m > V < 10m
189 msbinner.selectdata(msname='myinput1.ms', spw='0', field='0', taql='UVW[1] > 10 or UVW[1] < -10')
190 #define the name of the output grid
191 msbinner.setoutputms('myuvgrid.ms')
192 ## grid the input data to the output grid
193 msbinner.filloutputms()
194 ##select a second input visibilities
195 msbinner.selectdata(msname='myinput2.ms', spw='0', field='0', taql='')
196 ##add it to the previously defined output grid
197 msbinner.filloutputms()
198 del msbinner
200 --------------------------------------------------------------------------------
202 """
203 return _msuvbinner.msuvbinner_filloutputms(self)
205 __swig_destroy__ = _msuvbinner.delete_msuvbinner
206 __del__ = lambda self: None
207msuvbinner_swigregister = _msuvbinner.msuvbinner_swigregister
208msuvbinner_swigregister(msuvbinner)
210# This file is compatible with both classic and new-style classes.