Changeset 1430 for trunk


Ignore:
Timestamp:
07/11/08 11:55:28 (16 years ago)
Author:
Malte Marquarding
Message:

merged in unflag option from alma branch

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r1411 r1430  
    617617}
    618618
    619 void Scantable::flag(const std::vector<bool>& msk)
     619void Scantable::flag(const std::vector<bool>& msk, bool unflag)
    620620{
    621621  std::vector<bool>::const_iterator it;
     
    630630  if ( msk.size() == 0 ) {
    631631    uChar userflag = 1 << 7;
     632    if ( unflag ) {
     633      userflag = 0 << 7;
     634    }
    632635    for ( uInt i=0; i<table_.nrow(); ++i) {
    633636      Vector<uChar> flgs = flagsCol_(i);
     
    649652    uInt j = 0;
    650653    uChar userflag = 1 << 7;
     654    if ( unflag ) {
     655      userflag = 0 << 7;
     656    }
    651657    for (it = msk.begin(); it != msk.end(); ++it) {
    652658      if ( *it ) {
  • trunk/src/Scantable.h

    r1411 r1430  
    226226   * to be flagged
    227227   */
    228   void flag( const std::vector<bool>& msk = std::vector<bool>());
     228  //void flag( const std::vector<bool>& msk = std::vector<bool>());
     229  void flag( const std::vector<bool>& msk = std::vector<bool>(), bool unflag=false);
    229230
    230231  /**
  • trunk/src/ScantableWrapper.h

    r1391 r1430  
    101101    { return table_->getMask(whichrow); }
    102102
     103  /**
    103104  void flag(const std::vector<bool>& msk=std::vector<bool>())
    104105    { table_->flag(msk); }
     106  **/
     107  void flag(const std::vector<bool>& msk=std::vector<bool>(), bool unflag=false)
     108    { table_->flag(msk, unflag); }
    105109
    106110  std::string getSourceName(int whichrow=0) const
Note: See TracChangeset for help on using the changeset viewer.