Ignore:
Timestamp:
07/30/07 11:59:36 (17 years ago)
Author:
Malte Marquarding
Message:

merge from alma branch to get alma/GBT support. Commented out fluxUnit changes as they are using a chnaged interface to PKSreader/writer. Also commented out progress meter related code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STWriter.cpp

    r1390 r1391  
    116116
    117117  // 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
    118120  STHeader hdr = in->getHeader();
    119121  //const Int nPol  = hdr.npol;
     
    123125  Vector<uInt> nPol(nIF),nChan(nIF);
    124126  Vector<Bool> havexpol(nIF);
     127  String fluxUnit = hdr.fluxunit;
     128
    125129  nPol = 0;nChan = 0; havexpol = False;
    126130  for (uint i=0;i<ifs.size();++i) {
     
    264268  pushLog(String(oss));
    265269  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  }
    267274  return 0;
    268275}
     
    314321}
    315322
    316 
    317 }
     323// For writing MS data, if there is the reference to
     324// original pointing table it replace it by it.
     325void 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.