Changeset 1779 for branches/mergetest/src/STFrequencies.cpp
- Timestamp:
- 07/29/10 19:13:46 (14 years ago)
- Location:
- branches/mergetest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mergetest
- Property svn:mergeinfo changed
-
branches/mergetest/src/STFrequencies.cpp
r1694 r1779 128 128 } 129 129 130 void 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 130 147 SpectralCoordinate STFrequencies::getSpectralCoordinate( uInt id ) const 131 148 { … … 145 162 } 146 163 164 /** 147 165 SpectralCoordinate 148 166 STFrequencies::getSpectralCoordinate( const MDirection& md, … … 150 168 const MEpoch& me, 151 169 Double restfreq, uInt id ) const 170 **/ 171 SpectralCoordinate 172 STFrequencies::getSpectralCoordinate( const MDirection& md, 173 const MPosition& mp, 174 const MEpoch& me, 175 Vector<Double> restfreq, uInt id ) const 152 176 { 153 177 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); 155 185 if ( !spc.setReferenceConversion(getFrame(), me, mp, md) ) { 156 186 throw(AipsError("Couldn't convert frequency frame."));
Note:
See TracChangeset
for help on using the changeset viewer.