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

102 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-10-31 19:53 +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, '_mstransformer')).lstrip('.') 

13 try: 

14 return importlib.import_module(mname) 

15 except ImportError: 

16 return importlib.import_module('_mstransformer') 

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

26 except ImportError: 

27 import _mstransformer 

28 return _mstransformer 

29 try: 

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

31 finally: 

32 if fp is not None: 

33 fp.close() 

34 return _mod 

35 _mstransformer = swig_import_helper() 

36 del swig_import_helper 

37else: 

38 import _mstransformer 

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

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

100 

101 __swig_setmethods__ = {} 

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

103 __swig_getmethods__ = {} 

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

105 __repr__ = _swig_repr 

106 

107 def __init__(self): 

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

109 this = _mstransformer.new_mstransformer() 

110 try: 

111 self.this.append(this) 

112 except __builtin__.Exception: 

113 self.this = this 

114 

115 def done(self): 

116 """ 

117 done(self) -> bool 

118 

119 

120 

121 Summary: 

122 Destroy the mstransformer tool 

123 

124 Example: 

125 

126 mt.done() 

127 

128 -------------------------------------------------------------------------------- 

129 

130 """ 

131 return _mstransformer.mstransformer_done(self) 

132 

133 

134 def config(self, *args, **kwargs): 

135 """ 

136 config(self, _pars) -> bool 

137 

138 

139 

140 Summary: 

141 Configure the mstransformer tool. 

142 

143 Input Parameters: 

144 pars The record (dictionary) pars must contain at least the input MS name and output MS name. Other parameters that can go in the dictionary are the MS data selection parameters such as: spw, scan, antenna, field, state, correlation, array, uvrange, timerange, observation and any of the transformation parameters. This function can be run again to change the current parameters or add new ones. For the full list of parameters, please see help mstransform. Example: myparams = {'inputms':'myfile.ms', 'outputms':'myout.ms', 'datacolumn':'DATA', 'spw':'0,1,2', 'combinespws':True}  

145 

146 Example: 

147 

148 mt.config(pars) 

149 

150 -------------------------------------------------------------------------------- 

151 

152 """ 

153 return _mstransformer.mstransformer_config(self, *args, **kwargs) 

154 

155 

156 def open(self): 

157 """ 

158 open(self) -> bool 

159 

160 

161 

162 Summary: 

163 Open the MS and select the data 

164 

165 Description: 

166 

167 It assumes that mt.config() was run before. 

168 

169 Example: 

170 

171 mt.open() 

172 

173 -------------------------------------------------------------------------------- 

174 

175 """ 

176 return _mstransformer.mstransformer_open(self) 

177 

178 

179 def run(self): 

180 """ 

181 run(self) -> record * 

182 

183 

184 

185 Summary: 

186 Execute the mstransformer tool and apply the transformations 

187 

188 Description: 

189 

190 

191 Execute the tool and apply the transformations. 

192 

193 Example: 

194 

195 mt.run() 

196 

197 -------------------------------------------------------------------------------- 

198 

199 """ 

200 return _mstransformer.mstransformer_run(self) 

201 

202 

203 def mergespwtables(self, *args, **kwargs): 

204 """ 

205 mergespwtables(self, _filenames) -> bool 

206 

207 

208 

209 Summary: 

210 Merge the spw sub-tables of a list of subMSs. 

211 

212 Description: 

213 

214 

215 Merge the spw sub-tables of a list of subMSs. 

216 

217 

218 Input Parameters: 

219 filenames List of tables/MS names. 

220 

221 Example: 

222 

223 mt.mergespwtables([]) 

224 

225 -------------------------------------------------------------------------------- 

226 

227 """ 

228 return _mstransformer.mstransformer_mergespwtables(self, *args, **kwargs) 

229 

230 __swig_destroy__ = _mstransformer.delete_mstransformer 

231 __del__ = lambda self: None 

232mstransformer_swigregister = _mstransformer.mstransformer_swigregister 

233mstransformer_swigregister(mstransformer) 

234 

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

236 

237