- Timestamp:
- 11/08/11 19:17:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r2344 r2346 91 91 initFactories(); 92 92 setupMainTable(); 93 freqTable_ = newSTFrequencies(*this);94 table_.rwKeywordSet().defineTable("FREQUENCIES", freqTable_ ->table());93 freqTable_ = STFrequencies(*this); 94 table_.rwKeywordSet().defineTable("FREQUENCIES", freqTable_.table()); 95 95 weatherTable_ = STWeather(*this); 96 96 table_.rwKeywordSet().defineTable("WEATHER", weatherTable_.table()); … … 195 195 void Scantable::copySubtables(const Scantable& other) { 196 196 Table t = table_.rwKeywordSet().asTable("FREQUENCIES"); 197 TableCopy::copyRows(t, other.freqTable_ ->table());197 TableCopy::copyRows(t, other.freqTable_.table()); 198 198 t = table_.rwKeywordSet().asTable("FOCUS"); 199 199 TableCopy::copyRows(t, other.focusTable_.table()); … … 212 212 void Scantable::attachSubtables() 213 213 { 214 freqTable_ = newSTFrequencies(table_);214 freqTable_ = STFrequencies(table_); 215 215 focusTable_ = STFocus(table_); 216 216 weatherTable_ = STWeather(table_); … … 223 223 Scantable::~Scantable() 224 224 { 225 delete freqTable_;226 225 } 227 226 … … 1510 1509 //Double rf = moleculeTable_.getRestFrequency(mmolidCol_(whichrow)); 1511 1510 Vector<Double> rf = moleculeTable_.getRestFrequency(mmolidCol_(whichrow)); 1512 return freqTable_ ->getSpectralCoordinate(md, mp, me, rf,1511 return freqTable_.getSpectralCoordinate(md, mp, me, rf, 1513 1512 mfreqidCol_(whichrow)); 1514 1513 } … … 1519 1518 std::vector<double> stlout; 1520 1519 int nchan = specCol_(whichrow).nelements(); 1521 String us = freqTable_ ->getUnitString();1520 String us = freqTable_.getUnitString(); 1522 1521 if ( us == "" || us == "pixel" || us == "channel" ) { 1523 1522 for (int i=0; i<nchan; ++i) { … … 1586 1585 const Vector<Double> rf = moleculeTable_.getRestFrequency(mmolidCol_(whichrow)); 1587 1586 SpectralCoordinate spc = 1588 freqTable_ ->getSpectralCoordinate(md, mp, me, rf, mfreqidCol_(whichrow));1587 freqTable_.getSpectralCoordinate(md, mp, me, rf, mfreqidCol_(whichrow)); 1589 1588 1590 1589 String s = "Channel"; 1591 Unit u = Unit(freqTable_ ->getUnitString());1590 Unit u = Unit(freqTable_.getUnitString()); 1592 1591 if (u == Unit("km/s")) { 1593 1592 s = CoordinateUtil::axisLabel(spc, 0, True,True, True); … … 1850 1849 Double refval ; 1851 1850 Double increment ; 1852 int freqnrow = freqTable_ ->table().nrow() ;1851 int freqnrow = freqTable_.table().nrow() ; 1853 1852 Vector<uInt> oldId( freqnrow ) ; 1854 1853 Vector<uInt> newId( freqnrow ) ; 1855 1854 for ( int irow = 0 ; irow < freqnrow ; irow++ ) { 1856 freqTable_ ->getEntry( refpix, refval, increment, irow ) ;1855 freqTable_.getEntry( refpix, refval, increment, irow ) ; 1857 1856 /*** 1858 1857 * need to shift refpix to nmin … … 1861 1860 refval = refval - ( refpix - nmin ) * increment ; 1862 1861 refpix = 0 ; 1863 freqTable_ ->setEntry( refpix, refval, increment, irow ) ;1862 freqTable_.setEntry( refpix, refval, increment, irow ) ; 1864 1863 } 1865 1864
Note:
See TracChangeset
for help on using the changeset viewer.