Changeset 1400 for branches/alma


Ignore:
Timestamp:
12/15/07 10:45:37 (17 years ago)
Author:
TakTsutsumi
Message:

added unflag parameter to flag function

Location:
branches/alma/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/alma/src/MathUtils.cpp

    r1382 r1400  
    3535#include <casa/Arrays/MaskedArray.h>
    3636#include <casa/Arrays/MaskArrMath.h>
    37 #include <casa/Arrays/VectorSTLIterator.h>
    3837#include <casa/BasicSL/String.h>
    3938#include <scimath/Mathematics/MedianSlider.h>
     
    8584{
    8685  std::vector<std::string> out;
    87   VectorSTLIterator<String> it(in);
     86  Vector<String>::const_iterator it = in.begin();
    8887  for (uInt i=0; it != in.end(); ++it,++i) {
    8988    out.push_back(*it);
  • branches/alma/src/Scantable.cpp

    r1387 r1400  
    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 ) {
  • branches/alma/src/Scantable.h

    r1388 r1400  
    223223   * to be flagged
    224224   */
    225   void flag( const std::vector<bool>& msk = std::vector<bool>());
     225  //void flag( const std::vector<bool>& msk = std::vector<bool>());
     226  void flag( const std::vector<bool>& msk = std::vector<bool>(), bool unflag=false);
    226227
    227228  /**
  • branches/alma/src/ScantableWrapper.h

    r1388 r1400  
    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.