Changeset 2749


Ignore:
Timestamp:
01/28/13 16:46:26 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-4770

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Bug fix for the case when only one row is selected in a certain iteration
loop.


Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STCalSkyPSAlma.cpp

    r2742 r2749  
    7575      continue;
    7676    }
     77    else if (len == 1) {
     78      STCalSkyTable *p = dynamic_cast<STCalSkyTable *>(&(*applytable_));
     79      uInt irow = rows[0];
     80      p->appenddata(0, 0, current[2], current[0], current[1],
     81                    freqidCol(irow), timeSec[irow], elevation[irow], specCol(irow));
     82      iter.next();
     83      continue;
     84    }
    7785   
    7886    uInt nchan = scantable_->nchan(scantable_->getIF(rows[0]));
  • trunk/src/STCalTsys.cpp

    r2742 r2749  
    7272    Vector<uInt> rows = iter.getRows(SHARE);
    7373    Vector<uInt> current = iter.current();
     74    //os_ << "current=" << current << LogIO::POST;
    7475    uInt len = rows.nelements();
    7576    if (len == 0) {
     77      iter.next();
     78      continue;
     79    }
     80    else if (len == 1) {
     81      STCalTsysTable *p = dynamic_cast<STCalTsysTable *>(&(*applytable_));
     82      uInt irow = rows[0];
     83      p->appenddata(0, 0, current[2], current[0], current[1],
     84                    freqidCol(irow), timeSec[irow], elevation[irow], specCol(irow));
    7685      iter.next();
    7786      continue;
     
    93102    uInt jrow ;
    94103    for (uInt i = 0; i < len; i++) {
     104      //os_ << "start row " << rows[i] << LogIO::POST;
    95105      irow = rows[i];
    96106      jrow = (i < len-1) ? rows[i+1] : rows[i];
     
    131141
    132142    iter.next() ;
     143    //os_ << "end " << current << LogIO::POST;
    133144  }
    134145}
  • trunk/src/STCalibration.h

    r2747 r2749  
    1919#include <casa/BasicSL/String.h>
    2020#include <casa/Utilities/CountedPtr.h>
     21#include <casa/Logging/LogIO.h>
    2122
    2223#include <scimath/Mathematics/InterpolateArray1D.h>
     
    5051  casa::CountedPtr<Scantable> scantable_;
    5152  casa::CountedPtr<STApplyTable> applytable_;
     53  casa::LogIO os_;
    5254};
    5355
Note: See TracChangeset for help on using the changeset viewer.