Changeset 1391 for trunk/src/STWriter.cpp
- Timestamp:
- 07/30/07 11:59:36 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STWriter.cpp
r1390 r1391 116 116 117 117 // Extract the header from the table. 118 // this is a little different from what I have done 119 // before. Need to check with the Offline User Test data 118 120 STHeader hdr = in->getHeader(); 119 121 //const Int nPol = hdr.npol; … … 123 125 Vector<uInt> nPol(nIF),nChan(nIF); 124 126 Vector<Bool> havexpol(nIF); 127 String fluxUnit = hdr.fluxunit; 128 125 129 nPol = 0;nChan = 0; havexpol = False; 126 130 for (uint i=0;i<ifs.size();++i) { … … 264 268 pushLog(String(oss)); 265 269 writer_->close(); 266 270 //if MS2 delete POINTING table exists and copy the one in the keyword 271 if ( format_ == "MS2" ) { 272 replacePtTab(table, filename); 273 } 267 274 return 0; 268 275 } … … 314 321 } 315 322 316 317 } 323 // For writing MS data, if there is the reference to 324 // original pointing table it replace it by it. 325 void STWriter::replacePtTab (const Table& tab, const std::string& fname) 326 { 327 String oldPtTabName = fname; 328 oldPtTabName.append("/POINTING"); 329 if ( tab.keywordSet().isDefined("POINTING") ) { 330 String PointingTab = tab.keywordSet().asString("POINTING"); 331 if ( Table::isReadable(PointingTab) ) { 332 Table newPtTab(PointingTab, Table::Old); 333 newPtTab.copy(oldPtTabName, Table::New); 334 ostringstream oss; 335 oss << "STWriter: copied " <<PointingTab << " to " << fname; 336 pushLog(String(oss)); 337 } 338 } 339 } 340 341 }
Note: See TracChangeset
for help on using the changeset viewer.