Changeset 2711 for trunk/python
- Timestamp:
- 12/27/12 17:37:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/sbseparator.py
r2707 r2711 49 49 self.solveother = False 50 50 self.dirtol = [1.e-5, 1.e-5] # direction tolerance in rad (2 arcsec) 51 self.lo1 = 0.51 #self.lo1 = 0. 52 52 53 53 self.tables = [] … … 57 57 self.set_data(infiles) 58 58 59 #self.separator = sidebandsep()59 self.separator = SBSeparator() 60 60 61 61 @asaplog_post_dec … … 221 221 lo1 : LO1 frequency in float 222 222 """ 223 lo1val = -1. 223 224 if isinstance(lo1, dict) and lo1["unit"] == "Hz": 224 self.lo1= lo1["value"]225 else: 226 self.lo1= float(lo1)227 if self.lo1<= 0.:225 lo1val = lo1["value"] 226 else: 227 lo1val = float(lo1) 228 if lo1val <= 0.: 228 229 asaplog.push("Got negative LO1 frequency. It will be ignored.") 229 230 asaplog.post("WARN") 231 else: 232 self.separator.set_lo1(lo1val) 233 234 235 def set_lo1root(self, name): 236 """ 237 Set MS name which stores LO1 frequency of signal side band. 238 It is used to calculate frequency of image sideband. 239 240 name : MS name which contains 'ASDM_SPECTRALWINDOW' and 241 'ASDM_RECEIVER' tables. 242 """ 243 self.separator.set_lo1root(name) 230 244 231 245 … … 289 303 asaplog.post() 290 304 asaplog.push("Saving IMAGE sideband.") 291 asaplog.push("Note, frequency information of IMAGE sideband cannot be properly filled so far. (future development)")292 asaplog.push("Storing frequency setting of SIGNAL sideband in FREQUENCIES table for now.")293 asaplog.post("WARN")305 #asaplog.push("Note, frequency information of IMAGE sideband cannot be properly filled so far. (future development)") 306 #asaplog.push("Storing frequency setting of SIGNAL sideband in FREQUENCIES table for now.") 307 #asaplog.post("WARN") 294 308 295 309 imagename = outname + ".imageband" … … 300 314 shutil.rmtree(imagename) 301 315 # Update frequency information 302 sbsep = SBSeparator() 303 sbsep.set_imgtable(imagetab) 304 if self.lo1 > 0.: 305 sbsep.set_lo1(self.lo1) 306 sbsep.solve_imgfreq() 316 self.separator.set_imgtable(imagetab) 317 self.separator.solve_imgfreq() 307 318 imagetab.save(imagename) 308 del sbsep309 319 310 320
Note:
See TracChangeset
for help on using the changeset viewer.