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

98 statements  

« 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. 

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

13 try: 

14 return importlib.import_module(mname) 

15 except ImportError: 

16 return importlib.import_module('_sdm') 

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

26 except ImportError: 

27 import _sdm 

28 return _sdm 

29 try: 

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

31 finally: 

32 if fp is not None: 

33 fp.close() 

34 return _mod 

35 _sdm = swig_import_helper() 

36 del swig_import_helper 

37else: 

38 import _sdm 

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

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

100 

101 __swig_setmethods__ = {} 

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

103 __swig_getmethods__ = {} 

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

105 __repr__ = _swig_repr 

106 

107 def __init__(self, *args, **kwargs): 

108 """__init__(self, _path) -> sdm""" 

109 this = _sdm.new_sdm(*args, **kwargs) 

110 try: 

111 self.this.append(this) 

112 except __builtin__.Exception: 

113 self.this = this 

114 

115 def summarystr(self): 

116 """ 

117 summarystr(self) -> string 

118 

119 

120 

121 Summary: 

122 Returns a summary of the SDM as a string 

123 

124 -------------------------------------------------------------------------------- 

125 

126 """ 

127 return _sdm.sdm_summarystr(self) 

128 

129 

130 def fromms(self, *args, **kwargs): 

131 """ 

132 fromms(self, _mspath, _datacolumn, _archiveid, _rangeid, _subscanduration, _sbduration, _apcorrected, _verbose) -> bool 

133 

134 

135 

136 Summary: 

137 convert measurement set into an SDM (stored path) 

138 

139 Description: 

140 

141 

142 Create an sdm object with a non-existant path, and then use this function to populate 

143 the directory (which will be created) with the specified measurement set. 

144 

145 

146 Input Parameters: 

147 mspath Path to the MS to import 

148 datacolumn specifies which of the MS data columns (DATA, CORRECTED_DATA, or MODEL_DATA) should be used as the visibilities in the ASDM  

149 archiveid the X0 in uid://X0/X1/X<running>  

150 rangeid the X1 in uid://X0/X1/X<running>  

151 subscanduration maximum duration of a subscan in the output ASDM  

152 sbduration maximum duration of a scheduling block in the output ASDM  

153 apcorrected If true, the data in column datacolumn should be regarded as having atmospheric phase correction  

154 verbose produce log output 

155 

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

157 

158 """ 

159 return _sdm.sdm_fromms(self, *args, **kwargs) 

160 

161 

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

163 """ 

164 toms(self, _vis, _createmms, _separationaxis, _numsubms, _corr_mode, _srt, _time_sampling, _ocorr_mode, _compression, _lazy, _asis, _wvr_corrected_data, _scans, _ignore_time, _process_syspower, _process_caldevice, _process_pointing, _process_flags, _tbuff, _applyflags, _savecmds, _outfile, _flagbackup, _verbose, _overwrite, _bdfflags, _with_pointing_correction, _convert_ephem2geo, _polyephem_tabtimestep) -> bool 

165 

166 

167 

168 Summary: 

169 Convert a Science Data Model observation into a CASA visibility file (MS) 

170 

171 Input Parameters: 

172 vis Root name of the ms to be created. Note the .ms is NOT added 

173 createmms Create a Multi-MS output 

174 separationaxis Axis to do parallelization across(scan, spw, baseline, auto) 

175 numsubms The number of SubMSs to create (auto or any number) 

176 corr_mode specifies the correlation mode to be considered on input. A quoted string containing a sequence of ao, co, ac,or all separated by whitespaces is expected 

177 srt specifies the spectral resolution type to be considered on input. A quoted string containing a sequence of fr, ca, bw, or all separated by whitespaces is expected 

178 time_sampling specifies the time sampling (INTEGRATION and/or SUBINTEGRATION) to be considered on input. A quoted string containing a sequence of i, si, or all separated by whitespaces is expected 

179 ocorr_mode output data for correlation mode AUTO_ONLY (ao) or CROSS_ONLY (co) or CROSS_AND_AUTO (ca) 

180 compression Flag for turning on data compression 

181 lazy Make the MS DATA column read the ASDM Binary data directly (faster import, smaller MS) 

182 asis Creates verbatim copies of the ASDMtables in the ouput measurement set. Value given must be a string of table names separated by spaces; A * wildcard is allowed. 

183 wvr_corrected_data Specifies which values are considerd in the SDM binary data to fill the DATA column in the MAIN table of the MS. Expected values for this option are: no, for uncorrected data (default), yes, for the corrected data, and both, for for corrected and uncorrected data. Note if both is selected two measurement sets are created, one with uncorrected data and the other with corrected data. 

184 scans processes only the specified scans. This value is a semicolon separated list of scan specifications. A scan specification consists in an exec bock index followed by the : character; followed by a comma separated list of scan indexes or scan index ranges. A scan index is relative to the exec block it belongs to. Scan indexes are 1-based while exec blocks are 0-based. '0:1' or '2:2~6' or '0:1,1:2~6,8;2:,3:24~30' '1,2' are valid values for the option. '3:' alone will be interpreted as, all the scans of the exec block#3. An scan index or a scan index range not preceded by an exec block index will be interpreted as, all the scans with such indexes in all the exec blocks. By default all the scans are considered. 

185 ignore_time All the rows of the tables Feed, History, Pointing, Source, SysCal, CalDevice, SysPower, and Weather are processed independently of the time range of the selected exec block / scan. 

186 process_syspower The SysPower table is processed if and only if this parameter is set to true. 

187 process_caldevice The CalDevice table is processed if and only if this parameter is set to true. 

188 process_pointing The Pointing table is processed if and only if this parameter is set to true. If set to false, the POINTING table is empty in the resulting MS 

189 process_flags Create online flags in the FLAG_CMD sub-table. 

190 tbuff Time padding buffer (seconds) 

191 applyflags Apply the flags to the MS. 

192 savecmds Save flag commands to an ASCII file 

193 outfile Name of ASCII file to save flag commands 

194 flagbackup Back up flag column before applying flags. 

195 verbose Output lots of information while the filler is working 

196 overwrite Over write an existing MS(s) 

197 bdfflags Set the MS FLAG column according to the ASDM _binary_ flags 

198 with_pointing_correction add (ASDM::Pointing::encoder - ASDM::Pointing::pointingDirection) to the value to be written in MS::Pointing::direction 

199 convert_ephem2geo if true, convert any attached ephemerides to the GEO reference frame (time-spacing not changed) 

200 polyephem_tabtimestep Timestep (days) for the tabulation of polynomial ephemerides. A value <= 0 uses a timestep of 0.001 days. 

201 

202 -------------------------------------------------------------------------------- 

203 

204 """ 

205 return _sdm.sdm_toms(self, *args, **kwargs) 

206 

207 __swig_destroy__ = _sdm.delete_sdm 

208 __del__ = lambda self: None 

209sdm_swigregister = _sdm.sdm_swigregister 

210sdm_swigregister(sdm) 

211 

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

213 

214