Changeset 2346 for trunk


Ignore:
Timestamp:
11/08/11 19:17:23 (13 years ago)
Author:
WataruKawasaki
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): SD

Description: bugfix


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r2344 r2346  
    9191  initFactories();
    9292  setupMainTable();
    93   freqTable_ = new STFrequencies(*this);
    94   table_.rwKeywordSet().defineTable("FREQUENCIES", freqTable_->table());
     93  freqTable_ = STFrequencies(*this);
     94  table_.rwKeywordSet().defineTable("FREQUENCIES", freqTable_.table());
    9595  weatherTable_ = STWeather(*this);
    9696  table_.rwKeywordSet().defineTable("WEATHER", weatherTable_.table());
     
    195195void Scantable::copySubtables(const Scantable& other) {
    196196  Table t = table_.rwKeywordSet().asTable("FREQUENCIES");
    197   TableCopy::copyRows(t, other.freqTable_->table());
     197  TableCopy::copyRows(t, other.freqTable_.table());
    198198  t = table_.rwKeywordSet().asTable("FOCUS");
    199199  TableCopy::copyRows(t, other.focusTable_.table());
     
    212212void Scantable::attachSubtables()
    213213{
    214   freqTable_ = new STFrequencies(table_);
     214  freqTable_ = STFrequencies(table_);
    215215  focusTable_ = STFocus(table_);
    216216  weatherTable_ = STWeather(table_);
     
    223223Scantable::~Scantable()
    224224{
    225   delete freqTable_;
    226225}
    227226
     
    15101509  //Double rf = moleculeTable_.getRestFrequency(mmolidCol_(whichrow));
    15111510  Vector<Double> rf = moleculeTable_.getRestFrequency(mmolidCol_(whichrow));
    1512   return freqTable_->getSpectralCoordinate(md, mp, me, rf,
     1511  return freqTable_.getSpectralCoordinate(md, mp, me, rf,
    15131512                                          mfreqidCol_(whichrow));
    15141513}
     
    15191518  std::vector<double> stlout;
    15201519  int nchan = specCol_(whichrow).nelements();
    1521   String us = freqTable_->getUnitString();
     1520  String us = freqTable_.getUnitString();
    15221521  if ( us == "" || us == "pixel" || us == "channel" ) {
    15231522    for (int i=0; i<nchan; ++i) {
     
    15861585  const Vector<Double> rf = moleculeTable_.getRestFrequency(mmolidCol_(whichrow));
    15871586  SpectralCoordinate spc =
    1588     freqTable_->getSpectralCoordinate(md, mp, me, rf, mfreqidCol_(whichrow));
     1587    freqTable_.getSpectralCoordinate(md, mp, me, rf, mfreqidCol_(whichrow));
    15891588
    15901589  String s = "Channel";
    1591   Unit u = Unit(freqTable_->getUnitString());
     1590  Unit u = Unit(freqTable_.getUnitString());
    15921591  if (u == Unit("km/s")) {
    15931592    s = CoordinateUtil::axisLabel(spc, 0, True,True,  True);
     
    18501849  Double refval ;
    18511850  Double increment ;
    1852   int freqnrow = freqTable_->table().nrow() ;
     1851  int freqnrow = freqTable_.table().nrow() ;
    18531852  Vector<uInt> oldId( freqnrow ) ;
    18541853  Vector<uInt> newId( freqnrow ) ;
    18551854  for ( int irow = 0 ; irow < freqnrow ; irow++ ) {
    1856     freqTable_->getEntry( refpix, refval, increment, irow ) ;
     1855    freqTable_.getEntry( refpix, refval, increment, irow ) ;
    18571856    /***
    18581857     * need to shift refpix to nmin
     
    18611860    refval = refval - ( refpix - nmin ) * increment ;
    18621861    refpix = 0 ;
    1863     freqTable_->setEntry( refpix, refval, increment, irow ) ;
     1862    freqTable_.setEntry( refpix, refval, increment, irow ) ;
    18641863  }
    18651864
Note: See TracChangeset for help on using the changeset viewer.