Changeset 999


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

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

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFiller.cpp

    r972 r999  
    227227    TableRow row(table_->table());
    228228    TableRecord& rec = row.record();
     229    // fields that don't get used and are just passed through asap
     230    RecordFieldPtr<Array<Double> > srateCol(rec, "SCANRATE");
     231    *srateCol = scanRate;
     232    RecordFieldPtr<Array<Double> > spmCol(rec, "SRCPROPERMOTION");
     233    *spmCol = srcPM;
     234    RecordFieldPtr<Array<Double> > sdirCol(rec, "SRCDIRECTION");
     235    *sdirCol = srcDir;
     236    RecordFieldPtr<Double> svelCol(rec, "SRCVELOCITY");
     237    *svelCol = srcVel;
     238    // the real stuff
    229239    RecordFieldPtr<Int> fitCol(rec, "FIT_ID");
    230240    *fitCol = -1;
  • 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();
  • trunk/src/Scantable.cpp

    r996 r999  
    234234  td.addColumn(ScalarColumnDesc<uInt>("FOCUS_ID"));
    235235  td.addColumn(ScalarColumnDesc<uInt>("WEATHER_ID"));
     236
     237  // columns which just get dragged along, as they aren't used in asap
     238  td.addColumn(ScalarColumnDesc<Double>("SRCVELOCITY"));
     239  td.addColumn(ArrayColumnDesc<Double>("SRCPROPERMOTION"));
     240  td.addColumn(ArrayColumnDesc<Double>("SRCDIRECTION"));
     241  td.addColumn(ArrayColumnDesc<Double>("SCANRATE"));
    236242
    237243  td.rwKeywordSet().define("OBSMODE", String(""));
Note: See TracChangeset for help on using the changeset viewer.