Changeset 2463


Ignore:
Timestamp:
04/12/12 15:41:33 (13 years ago)
Author:
Kana Sugimoto
Message:

New Development: No (a bug fix)

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): scantable._regrid_specchan

Description: a bug fix in Scantable::regridSpecChannel.

Fixed the calculation of regridded reference channel.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r2462 r2463  
    19161916      firstTime[currId] = false ;
    19171917      freqTable_.getEntry( refpix, refval, increment, currId ) ;
    1918       /***
    1919        * need to shift refpix to 0
    1920        ***/
     1918
    19211919      //refval = refval - ( refpix + 0.5 * (1 - factor) ) * increment ;
    1922       if (factor >= 0 ) {
     1920      if (factor > 0 ) {
    19231921        refpix = (refpix + 0.5)/factor - 0.5;
    19241922      } else {
    1925         refpix = (abcissa.size() + 0.5 - refpix)/abs(factor) - 0.5;
     1923        refpix = (abcissa.size() - 0.5 - refpix)/abs(factor) - 0.5;
    19261924      }
    19271925      freqTable_.setEntry( refpix, refval, increment*factor, currId ) ;
    1928       os << "ID" << currId << ": channel width (Orig) = " << oldincr << " [" << freqTable_.getUnitString() << "], scale factor = " << factor << LogIO::POST ;
    1929       os << "     frequency increment (Orig) = " << increment << "-> (New) " << increment*factor << LogIO::POST ;
     1926      //os << "ID" << currId << ": channel width (Orig) = " << oldincr << " [" << freqTable_.getUnitString() << "], scale factor = " << factor << LogIO::POST ;
     1927      //os << "     frequency increment (Orig) = " << increment << "-> (New) " << increment*factor << LogIO::POST ;
    19301928    }
    19311929  }
Note: See TracChangeset for help on using the changeset viewer.