Changeset 1387 for branches/alma/src/STWriter.cpp
- Timestamp:
- 07/27/07 02:00:22 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/src/STWriter.cpp
r1305 r1387 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) { … … 137 141 hdr.antennaname, hdr.antennaposition, 138 142 hdr.obstype, hdr.equinox, hdr.freqref, 139 nChan, nPol, havexpol, False );143 nChan, nPol, havexpol, False, fluxUnit); 140 144 if ( status ) { 141 145 throw(AipsError("Failed to create output file")); … … 265 269 pushLog(String(oss)); 266 270 writer_->close(); 267 271 //if MS2 delete POINTING table exists and copy the one in the keyword 272 if ( format_ == "MS2" ) { 273 replacePtTab(table, filename); 274 } 268 275 return 0; 269 276 } … … 315 322 } 316 323 317 318 } 324 // For writing MS data, if there is the reference to 325 // original pointing table it replace it by it. 326 void STWriter::replacePtTab (const Table& tab, const std::string& fname) 327 { 328 String oldPtTabName = fname; 329 oldPtTabName.append("/POINTING"); 330 if ( tab.keywordSet().isDefined("POINTING") ) { 331 String PointingTab = tab.keywordSet().asString("POINTING"); 332 if ( Table::isReadable(PointingTab) ) { 333 Table newPtTab(PointingTab, Table::Old); 334 newPtTab.copy(oldPtTabName, Table::New); 335 ostringstream oss; 336 oss << "STWriter: copied " <<PointingTab << " to " << fname; 337 pushLog(String(oss)); 338 } 339 } 340 } 341 342 }
Note: See TracChangeset
for help on using the changeset viewer.