Changeset 2908


Ignore:
Timestamp:
03/24/14 13:47:07 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-5871, CAS-5873

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: test_tsdsave

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Fixed a bug in Scantable::reshapeSpectrum.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r2890 r2908  
    18641864
    18651865  // update FREQUENCIES subtable
     1866  Vector<uInt> freqIdArray = mfreqidCol_.getColumn();
     1867  uInt numFreqId = GenSort<uInt>::sort(freqIdArray, Sort::Ascending,
     1868                                       Sort::HeapSort | Sort::NoDuplicates);
    18661869  Double refpix ;
    18671870  Double refval ;
    18681871  Double increment ;
    1869   int freqnrow = freqTable_.table().nrow() ;
    1870   Vector<uInt> oldId( freqnrow ) ;
    1871   Vector<uInt> newId( freqnrow ) ;
    1872   for ( int irow = 0 ; irow < freqnrow ; irow++ ) {
    1873     freqTable_.getEntry( refpix, refval, increment, irow ) ;
     1872  for (uInt irow  = 0; irow < numFreqId; irow++) {
     1873    freqTable_.getEntry( refpix, refval, increment, freqIdArray[irow] ) ;
    18741874    /***
    18751875     * need to shift refpix to nmin
     
    18781878    refval = refval - ( refpix - nmin ) * increment ;
    18791879    refpix = 0 ;
    1880     freqTable_.setEntry( refpix, refval, increment, irow ) ;
     1880    freqTable_.setEntry( refpix, refval, increment, freqIdArray[irow] ) ;
    18811881  }
    18821882
Note: See TracChangeset for help on using the changeset viewer.