Changeset 2947


Ignore:
Timestamp:
06/19/14 11:21:28 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-6588

Ready for Test: Yes

Interface Changes: Yes/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...

flag and clip is updated so that channel flagging operation is not
applied if target row is flagged.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r2946 r2947  
    763763void Scantable::clip(const Float uthres, const Float dthres, bool clipoutside, bool unflag)
    764764{
     765  Vector<uInt> flagrow = flagrowCol_.getColumn();
    765766  for (uInt i=0; i<table_.nrow(); ++i) {
    766     Vector<uChar> flgs = flagsCol_(i);
    767     srchChannelsToClip(i, uthres, dthres, clipoutside, unflag, flgs);
    768     flagsCol_.put(i, flgs);
     767    // apply flag only when specified row is vaild
     768    if (flagrow[i] == 0) {
     769      Vector<uChar> flgs = flagsCol_(i);
     770      srchChannelsToClip(i, uthres, dthres, clipoutside, unflag, flgs);
     771      flagsCol_.put(i, flgs);
     772    }
    769773  }
    770774}
     
    833837  }
    834838  if (whichrow > -1 ) {
    835     applyChanFlag(uInt(whichrow), msk, userflag);
     839    // apply flag only when specified row is vaild
     840    if (flagrowCol_(whichrow) == 0) {
     841      applyChanFlag(uInt(whichrow), msk, userflag);
     842    }
    836843  } else {
    837844    for ( uInt i=0; i<table_.nrow(); ++i) {
    838       applyChanFlag(i, msk, userflag);
     845      // apply flag only when specified row is vaild
     846      if (flagrowCol_(i) == 0) {
     847        applyChanFlag(i, msk, userflag);
     848      }
    839849    }
    840850  }
Note: See TracChangeset for help on using the changeset viewer.