Ignore:
Timestamp:
07/29/10 19:13:46 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: Yes

JIRA Issue: No (test merging alma branch)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s):

Description:


Location:
branches/mergetest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/mergetest

  • branches/mergetest/src/STFrequencies.cpp

    r1694 r1779  
    128128}
    129129
     130void STFrequencies::setEntry( Double refpix, Double refval, Double inc, uInt id )
     131{
     132  Table t = table_(table_.col("ID") == Int(id) );
     133  if (t.nrow() == 0 ) {
     134    throw(AipsError("STFrequencies::getEntry - freqID out of range"));
     135  }
     136  for ( uInt i = 0 ; i < table_.nrow() ; i++ ) {
     137    uInt fid ;
     138    idCol_.get( i, fid ) ;
     139    if ( fid == id ) {
     140      refpixCol_.put( i, refpix ) ;
     141      refvalCol_.put( i, refval ) ;
     142      incrCol_.put( i, inc ) ;
     143    }
     144  }
     145}
     146
    130147SpectralCoordinate STFrequencies::getSpectralCoordinate( uInt id ) const
    131148{
     
    145162}
    146163
     164/**
    147165SpectralCoordinate
    148166  STFrequencies::getSpectralCoordinate( const MDirection& md,
     
    150168                                        const MEpoch& me,
    151169                                        Double restfreq, uInt id ) const
     170**/
     171SpectralCoordinate
     172  STFrequencies::getSpectralCoordinate( const MDirection& md,
     173                                              const MPosition& mp,
     174                                              const MEpoch& me,
     175                                              Vector<Double> restfreq, uInt id ) const
    152176{
    153177  SpectralCoordinate spc = getSpectralCoordinate(id);
    154   spc.setRestFrequency(restfreq, True);
     178  //spc.setRestFrequency(restfreq, True);
     179  // for now just use the first rest frequency
     180  if (restfreq.nelements()==0 ) {
     181    restfreq.resize(1);
     182    restfreq[0] = 0;
     183  }
     184  spc.setRestFrequency(restfreq[0], True);
    155185  if ( !spc.setReferenceConversion(getFrame(), me, mp, md) ) {
    156186    throw(AipsError("Couldn't convert frequency frame."));
Note: See TracChangeset for help on using the changeset viewer.