Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

# This file was automatically generated by SWIG (http://www.swig.org). 

# Version 2.0.4 

# 

# Do not make changes to this file unless you know what you are doing--modify 

# the SWIG interface file instead. 

 

 

 

from sys import version_info 

if version_info >= (2,6,0): 

    def swig_import_helper(): 

        from os.path import dirname 

        import imp 

        fp = None 

        try: 

            fp, pathname, description = imp.find_module('_synthesisimager', [dirname(__file__)]) 

        except ImportError: 

            import _synthesisimager 

            return _synthesisimager 

        if fp is not None: 

            try: 

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

            finally: 

                fp.close() 

            return _mod 

    _synthesisimager = swig_import_helper() 

    del swig_import_helper 

else: 

    import _synthesisimager 

del version_info 

try: 

    _swig_property = property 

except NameError: 

    pass # Python < 2.2 doesn't have 'property'. 

def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 

    if (name == "thisown"): return self.this.own(value) 

    if (name == "this"): 

        if type(value).__name__ == 'SwigPyObject': 

            self.__dict__[name] = value 

            return 

    method = class_type.__swig_setmethods__.get(name,None) 

    if method: return method(self,value) 

    if (not static): 

        self.__dict__[name] = value 

    else: 

        raise AttributeError("You cannot add attributes to %s" % self) 

 

def _swig_setattr(self,class_type,name,value): 

    return _swig_setattr_nondynamic(self,class_type,name,value,0) 

 

def _swig_getattr(self,class_type,name): 

    if (name == "thisown"): return self.this.own() 

    method = class_type.__swig_getmethods__.get(name,None) 

    if method: return method(self) 

    raise AttributeError(name) 

 

def _swig_repr(self): 

    try: strthis = "proxy of " + self.this.__repr__() 

    except: strthis = "" 

    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 

 

try: 

    _object = object 

    _newclass = 1 

except AttributeError: 

    class _object : pass 

    _newclass = 0 

 

 

class synthesisimager(_object): 

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

    __swig_setmethods__ = {} 

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

    __swig_getmethods__ = {} 

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

    __repr__ = _swig_repr 

    def __init__(self): 

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

        this = _synthesisimager.new_synthesisimager() 

        try: self.this.append(this) 

        except: self.this = this 

    __swig_destroy__ = _synthesisimager.delete_synthesisimager 

    __del__ = lambda self : None; 

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

        """ 

        selectdata(self, selpars = initialize_record("")) -> bool 

 

        Summary 

                Select data from one MS 

 

        Description 

                 

 

 

        Input Parameters: 

                selpars          All parameters that control selection within one MS  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

    def tuneselectdata(self): 

        """ 

        tuneselectdata(self) -> record 

 

        Summary 

                reselect the data to match image definition 

 

        Description 

                 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _synthesisimager.synthesisimager_tuneselectdata(self) 

 

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

        """ 

        defineimage(self, impars = initialize_record(""), gridpars = initialize_record("")) -> bool 

 

        Summary 

                Define image coordinate systems FTMs 

 

        Description 

                 

 

 

        Input Parameters: 

                impars           All parameters that control image coordinate system definition  

                gridpars         All parameters that control ftmachines and gridding parameters  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        setdata(self, msname = string(""), spw = string(""), freqbeg = string(""),  

            freqend = string(""), freqframe = string("LSRK"),  

            field = string(""), antenna = string(""),  

            timestr = string(""), scan = string(""),  

            obs = string(""), state = string(""),  

            uvdist = string(""), taql = string(""), usescratch = False,  

            readonly = False, incrmodel = False) -> bool 

 

        Summary 

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

 

        Description 

                 

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

        multiple MSs.  

 

 

        Input Parameters: 

                msname           Name of one measurement set  

                spw              Spectral Window / Channel / Frequency selection  

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

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

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

                field            Field selection  

                antenna          Antenna / Baseline selection  

                timestr          Time range selection  

                scan             Scan selection  

                obs              Observation id selection  

                state            Scan Intent or State selection  

                uvdist           UV range selection  

                taql             Generic taql selection  

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

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

                incrmodel        Subtract existing model data and start with residuals false  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        setimage(self, imagename = string(""), nx = 128, ny = -1, cellx = initialize_variant("1.0"),  

            celly = initialize_variant(""),  

            stokes = string("I"), phasecenter = initialize_variant("0"),  

            nchan = -1, freqstart = initialize_variant("0"),  

            freqstep = initialize_variant("1"),  

            restfreq = initialize_variant(""),  

            facets = 1, ftmachine = string("gridft"),  

            ntaylorterms = 1, reffreq = initialize_variant(""),  

            projection = string("SIN"),  

            distance = initialize_variant("0.0"), freqframe = string("LSRK"),  

            tracksource = False, trackdir = initialize_variant(""),  

            overwrite = True,  

            padding = 1.0, useautocorr = False, usedoubleprec = True,  

            wprojplanes = 1, convfunc = string("SF"),  

            startmodel = string(""), aterm = True,  

            psterm = True, mterm = False, wbawp = True,  

            cfcache = string(""), dopointing = False,  

            dopbcorr = True, conjbeams = True, computepastep = 360.0,  

            rotatepastep = 5.0) -> bool 

 

        Summary 

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

 

        Description 

                 

        Define the image coordinate systems and shapes. 

 

 

        Input Parameters: 

                imagename        Base image name  

                nx               Total number of spatial pixels in x 128  

                ny               Total number of spatial pixels in y -1  

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

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

                stokes           Stokes parameters to image (e.g. 'IQUV') IV IQU IQUV I  

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

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

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

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

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

                facets           Number of facets on each axis 1  

                ftmachine        FT-Machine type gridft  

                ntaylorterms     Number of terms for a spectral Taylor expansion 1  

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

                projection       Image coordinate system projection SIN  

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

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

                tracksource      Track a source. false  

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

                overwrite        Overwrite the image if it exists (true) true  

                padding          FFT padding 1.0  

                useautocorr      Use auto correlations false  

                usedoubleprec    Double Precision gridding or not true  

                wprojplanes      Number of w-projection planes 1  

                convfunc         Name of convolution function SF  

                startmodel       Starting model ( image name or component list name )  

                aterm            Double Precision gridding or not true  

                psterm           Double Precision gridding or not true  

                mterm            Double Precision gridding or not false  

                wbawp            Double Precision gridding or not true  

                cfcache          Name of convolution function  

                dopointing       Double Precision gridding or not false  

                dopbcorr         Double Precision gridding or not true  

                conjbeams        Double Precision gridding or not true  

                computepastep    Double Precision gridding or not 360.0  

                rotatepastep     Double Precision gridding or not 5.0  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

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

        """ 

        setweighting(self, type = string("natural"), rmode = string("norm"), noise = initialize_variant(""),  

            robust = 0.0,  

            fieldofview = initialize_variant(""), npixels = 0,  

            multifield = False, uvtaper = std::vector< string >(1, "")) -> bool 

 

        Summary 

                Set parameters to control weighting during imaging 

 

        Description 

                 

 

 

        Input Parameters: 

                type             Data weighting scheme natural  

                rmode            rmode norm  

                noise            Noise level  

                robust           Robustness weighting factor 0.0  

                fieldofview      Field of view  

                npixels          NPixels 0  

                multifield       Multifield false  

                uvtaper          Parameters of uv-taper Gaussian  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

    def makepsf(self): 

        """ 

        makepsf(self) -> bool 

 

        Summary 

                Make the psf 

 

        Description 

                 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _synthesisimager.synthesisimager_makepsf(self) 

 

    def predictmodel(self): 

        """ 

        predictmodel(self) -> bool 

 

        Summary 

                Predict model visibilities. 

 

        Description 

                 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _synthesisimager.synthesisimager_predictmodel(self) 

 

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

        """ 

        executemajorcycle(self, controls = initialize_record("")) -> bool 

 

        Summary 

                Run a major cycle 

 

        Description 

                 

 

 

        Input Parameters: 

                controls         All parameters that control major cycle  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

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

 

    def getimstore(self, id = 0): 

        """ 

        getimstore(self, id = 0) -> casac::synthesisimstore 

 

        Summary 

                Get Image Store 

 

        Description 

                 

 

 

        Input Parameters: 

                id               Image field id 0  

                 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _synthesisimager.synthesisimager_getimstore(self, id) 

 

    def done(self): 

        """ 

        done(self) -> bool 

 

        Summary 

                Close the tool 

 

        Description 

                 

 

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _synthesisimager.synthesisimager_done(self) 

 

synthesisimager_swigregister = _synthesisimager.synthesisimager_swigregister 

synthesisimager_swigregister(synthesisimager) 

 

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