Changeset 2838 for trunk


Ignore:
Timestamp:
08/07/13 18:48:20 (11 years ago)
Author:
Kana Sugimoto
Message:

New Development: No (bug fixes)

JIRA Issue: Yes (CAS-5139)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sbseparator

Description:

a couple of bug fixes.

  • flags are properly updated in case rows in the first gridded table is flagged.
  • fixed a bug in channel shift resolution when data is flagged in some tables (nspec != ntable in some spectral groups).


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STSideBandSep.cpp

    r2836 r2838  
    286286    sigSpec = solve(specMat, tabIdvec, true);
    287287    sigTab_p->setSpectrum(sigSpec, irow);
     288    if (sigTab_p->isAllChannelsFlagged(irow)){
     289      // unflag the spectrum since there should be some valid data
     290      sigTab_p->flagRow(vector<uInt>(irow), true);
     291      sigTab_p->flag(irow, vector<bool>(), true);
     292    }
    288293
    289294    // Solve image sideband
     
    291296      imgSpec = solve(specMat, tabIdvec, false);
    292297      imgTab_p->setSpectrum(imgSpec, irow);
     298      if (imgTab_p->isAllChannelsFlagged(irow)){
     299        // unflag the spectrum since there should be some valid data
     300        imgTab_p->flagRow(vector<uInt>(irow), true);
     301        imgTab_p->flag(irow, vector<bool>(), true);
     302      }
    293303    }
    294304  } // end of row loop
     
    722732    // (solve signal && solveother = F) OR (solve image && solveother = T)
    723733    thisShift =  &sigShift_;
    724     otherShift = &imgShift_; 
     734    otherShift = &imgShift_;
    725735#ifdef KS_DEBUG
    726736    cout << "Signal sideband will be deconvolved." << endl;
     
    732742  double tempshift;
    733743  Vector<float> shiftspvec;
     744  uInt shiftId;
    734745  for (uInt i = 0 ; i < nspec; i++) {
    735     spshift[i] = otherShift->at(i) - thisShift->at(i);
    736     tempshift = - thisShift->at(i);
     746    shiftId = tabIdvec[i];
     747    spshift[i] = otherShift->at(shiftId) - thisShift->at(shiftId);
     748    tempshift = - thisShift->at(shiftId);
    737749    shiftspvec.reference(shiftSpecmat.column(i));
    738750    shiftSpectrum(specmat.column(i), tempshift, shiftspvec);
Note: See TracChangeset for help on using the changeset viewer.