Changeset 2410 for trunk/src


Ignore:
Timestamp:
02/17/12 13:58:12 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-3606/CAS-3757

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: sdbaseline unit test

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Fixed a bug that baseline functions doesn't work when multi-IF with different
nchan are processed at once.


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STLineFinder.cpp

    r2345 r2410  
    943943void STLineFinder::setData(const std::vector<float> &in_spectrum)
    944944{
    945   spectrum = Vector<Float>(in_spectrum);
     945  //spectrum = Vector<Float>(in_spectrum);
     946  spectrum.assign( Vector<Float>(in_spectrum) );
    946947  useScantable = false;
    947948}
     
    966967  // no mask given...
    967968  if (in_mask.size() == 0) {
    968     mask = Vector<Bool>(nchan,True);
     969    //mask = Vector<Bool>(nchan,True);
     970    mask.assign( Vector<Bool>(nchan,True) );
    969971  } else {
    970972    // use provided mask
    971     mask=Vector<Bool>(in_mask);
     973    //mask=Vector<Bool>(in_mask);
     974    mask.assign( Vector<Bool>(in_mask) );
    972975  }
    973976  if (mask.nelements()!=nchan)
  • trunk/src/Scantable.cpp

    r2348 r2410  
    31893189  std::vector<bool> mask = getMask(whichrow);
    31903190  uInt maskSize = mask.size();
    3191   if (maskSize != inMask.size()) {
    3192     throw(AipsError("mask sizes are not the same."));
    3193   }
    3194   for (uInt i = 0; i < maskSize; ++i) {
    3195     mask[i] = mask[i] && inMask[i];
     3191  if (inMask.size() != 0) {
     3192    if (maskSize != inMask.size()) {
     3193      throw(AipsError("mask sizes are not the same."));
     3194    }
     3195    for (uInt i = 0; i < maskSize; ++i) {
     3196      mask[i] = mask[i] && inMask[i];
     3197    }
    31963198  }
    31973199
Note: See TracChangeset for help on using the changeset viewer.