Ignore:
Timestamp:
02/17/06 15:49:59 (18 years ago)
Author:
mar637
Message:

added getEntry to support export for STWriter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFrequencies.cpp

    r806 r830  
    9292
    9393
     94
     95void STFrequencies::getEntry( Double& refpix, Double& refval, Double& inc,
     96                              uInt id )
     97{
     98  Table t = table_(table_.col("ID") == Int(id) );
     99  if (t.nrow() == 0 ) {
     100    throw(AipsError("STFrequencies::getEntry - freqID out of range"));
     101  }
     102  ROTableRow row(t);
     103  // get first row - there should only be one matching id
     104  const TableRecord& rec = row.get(0);
     105  refpix = rec.asDouble("REFPIX");
     106  refval = rec.asDouble("REFVAL");
     107  inc = rec.asDouble("INCREMENT");
     108}
     109
    94110SpectralCoordinate STFrequencies::getSpectralCoordinate( uInt freqID )
    95111{
Note: See TracChangeset for help on using the changeset viewer.