- Timestamp:
- 12/28/12 13:35:27 (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/sbseparator.py
r2711 r2712 57 57 self.set_data(infiles) 58 58 59 self. separator = SBSeparator()59 self._separator = SBSeparator() 60 60 61 61 @asaplog_post_dec … … 75 75 raise TypeError, "Input data is not a list of scantables." 76 76 77 #self. separator._setdata(infiles)77 #self._separator._setdata(infiles) 78 78 self._reset_data() 79 79 self.intables = infiles … … 85 85 raise ValueError, "Could not find input file '%s'" % name 86 86 87 #self. separator._setdataname(infiles)87 #self._separator._setdataname(infiles) 88 88 self._reset_data() 89 89 self.intables = infiles … … 200 200 Set rejection limit of solution. 201 201 """ 202 #self. separator._setlimit(abs(threshold))202 #self._separator._setlimit(abs(threshold)) 203 203 self.rejlimit = threshold 204 204 asaplog.push("The threshold of rejection is set to %f" % self.rejlimit) … … 230 230 asaplog.post("WARN") 231 231 else: 232 self. separator.set_lo1(lo1val)232 self._separator.set_lo1(lo1val) 233 233 234 234 … … 241 241 'ASDM_RECEIVER' tables. 242 242 """ 243 self. separator.set_lo1root(name)243 self._separator.set_lo1root(name) 244 244 245 245 … … 253 253 """ 254 254 # List up valid scantables and IFNOs to convolve. 255 #self. separator._separate()255 #self._separator._separate() 256 256 self._setup_shift() 257 257 #self._preprocess_tables() 258 259 ### TEMPORAL ### 260 self._separator._get_asistb_from_scantb(self.tables[0]) 261 ################ 258 262 259 263 nshift = len(self.tables) … … 314 318 shutil.rmtree(imagename) 315 319 # Update frequency information 316 self. separator.set_imgtable(imagetab)317 self. separator.solve_imgfreq()320 self._separator.set_imgtable(imagetab) 321 self._separator.solve_imgfreq() 318 322 imagetab.save(imagename) 319 323 … … 613 617 # raise RuntimeError, "Output file '%s' already exists" % outfile 614 618 # 615 # #self. separator._save(outfile, outform)619 # #self._separator._save(outfile, outform) 616 620 617 621 # def done(self): … … 620 624 # def close(self): 621 625 # pass 622 # #del self. separator626 # #del self._separator 623 627 624 628 -
trunk/src/STSideBandSep.cpp
r2711 r2712 130 130 #endif 131 131 }; 132 133 ///// TEMPORAL FUNCTION!!! ///// 134 void STSideBandSep::setScanTb0(const ScantableWrapper &s){ 135 st0_ = s.getCP(); 136 }; 137 //////////////////////////////// 132 138 133 139 void STSideBandSep::solveImageFreqency() … … 229 235 // Try getting ASDM name from scantable header 230 236 os << "Try getting information from scantable header" << LogIO::POST; 231 if (!getLo1FromScanTab( imgTab_p, sigrefval, refpix, increment, nChan)) {237 if (!getLo1FromScanTab(st0_, sigrefval, refpix, increment, nChan)) { 232 238 //throw AipsError("Failed to get LO1 frequency from asis table"); 233 239 os << LogIO::WARN << "Failed to get LO1 frequency using information in scantable." << LogIO::POST; … … 333 339 { 334 340 LogIO os(LogOrigin("STSideBandSep","getLo1FromScanTab()", WHERE)); 335 Table& tab = scantab->table();336 341 // Check for relevant tables. 342 const TableRecord &rec = scantab->table().keywordSet() ; 337 343 String spwname, recname; 338 try { 339 spwname = tab.keywordSet().asString("ASDM_SPECTRALWINDOW"); 340 recname = tab.keywordSet().asString("ASDM_RECEIVER"); 341 } catch (...) { 344 if (rec.isDefined("ASDM_SPECTRALWINDOW") && rec.isDefined("ASDM_RECEIVER")){ 345 spwname = rec.asString("ASDM_SPECTRALWINDOW"); 346 recname = rec.asString("ASDM_RECEIVER"); 347 } 348 else { 342 349 // keywords are not there 343 350 os << LogIO::WARN … … 353 360 const String recsuff = "/ASDM_RECEIVER"; 354 361 String::size_type pos; 355 pos = recname.size()-recsuff.size() -1;362 pos = recname.size()-recsuff.size(); 356 363 if (recname.substr(pos) == recsuff) 357 msname = recname.substr(0, pos -1);364 msname = recname.substr(0, pos); 358 365 else 359 366 throw(AipsError("Internal error in parsing table name from a scantable keyword.")); -
trunk/src/STSideBandSep.h
r2711 r2712 47 47 48 48 /** 49 * Set s eparated scantable to fill frequencies of image sideband (temporal)49 * Set scantable to fill frequencies of image sideband (temporal) 50 50 **/ 51 51 void setImageTable(const ScantableWrapper &s); 52 void setScanTb0(const ScantableWrapper &s); 52 53 /** 53 54 * Set additional information to fill frequencies of image sideband … … 80 81 string asdmName_, asisName_; 81 82 82 CountedPtr< Scantable > imgTab_p, sigTab_p; 83 CountedPtr<Scantable> imgTab_p, sigTab_p; 84 // TEMPORAL member 85 CountedPtr<Scantable> st0_; 83 86 84 87 }; // class -
trunk/src/python_STSideBandSep.cpp
r2711 r2712 31 31 .def( "set_imgtable", &STSideBandSep::setImageTable ) 32 32 .def( "solve_imgfreq", &STSideBandSep::solveImageFreqency ) 33 .def( "_get_asistb_from_scantb", &STSideBandSep::setScanTb0 ) 33 34 ; 34 35 };
Note:
See TracChangeset
for help on using the changeset viewer.