Changeset 999 for trunk/src/STWriter.cpp


Ignore:
Timestamp:
04/06/06 16:12:55 (18 years ago)
Author:
mar637
Message:

added "redundant" fields from reader. The aren't used in asap but should be passed on for consistency.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STWriter.cpp

    r996 r999  
    149149  }
    150150
    151   Double          srcVel = 0.0;
     151  Double          srcVel;
    152152
    153153  String          fieldName, srcName, tcalTime;
    154154  Vector<Float>   calFctr, sigma, tcal, tsys;
    155   Vector<Double>  direction(2), scanRate(2), srcDir(2), srcPM(2,0.0);
     155  Vector<Double>  direction(2), scanRate(2), srcDir(2), srcPM(2);
    156156  Matrix<Float>   spectra;
    157157  Matrix<uChar>   flagtra;
     
    171171      Vector<Double> direction = dirCol(0).getAngle("rad").getValue();
    172172      TableIterator cycit(btable, "CYCLENO");
     173      ROArrayColumn<Double> srateCol(btable, "SCANRATE");
     174      srateCol.get(0, scanRate);
     175      ROArrayColumn<Double> spmCol(btable, "SRCPROPERMOTION");
     176      spmCol.get(0, srcPM);
     177      ROArrayColumn <Double> sdirCol(btable, "SRCDIRECTION");
     178      sdirCol.get(0, srcDir);
     179      ROScalarColumn<Double> svelCol(btable, "SRCVELOCITY");
     180      svelCol.get(0, srcVel);
    173181      Int cycno = 1;
    174182      while (!cycit.pastEnd() ) {
     
    219227                                      rec.asString("FIELDNAME"),
    220228                                      rec.asString("SRCNAME"),
    221                                       direction,
    222                                       srcPM, srcVel, // not in scantable yet
     229                                      srcDir, srcPM, srcVel,
    223230                                      ifno,
    224231                                      refFreqNew, nchan*abs(cdelt), cdelt,
     
    234241                                      rec.asInt("REFBEAMNO")+1, beamno,
    235242                                      direction,
    236                                       scanRate,// not in scantable
     243                                      scanRate,
    237244                                      tsys,
    238245                                      sigma, calFctr,// not in scantable
     
    245252            throw(AipsError("STWriter: Failed to export Scantable."));
    246253          }
    247 
     254          ++count;
    248255          ++ifno;
    249256          ++ifit;
     
    259266  }
    260267  ostringstream oss;
    261   oss << "STWriter: wrote " << count << " rows to " << filename << endl;
     268  oss << "STWriter: wrote " << count << " rows to " << filename;
    262269  pushLog(String(oss));
    263270  writer_->close();
Note: See TracChangeset for help on using the changeset viewer.