Changeset 1707 for branches/alma/src
- Timestamp:
- 02/19/10 20:30:37 (15 years ago)
- Location:
- branches/alma/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/src/Scantable.cpp
r1706 r1707 706 706 { 707 707 for (uInt i=0; i<table_.nrow(); ++i) { 708 Vector<Float> spcs = specCol_(i);709 708 Vector<uChar> flgs = flagsCol_(i); 709 srchChannelsToClip(i, uthres, dthres, clipoutside, unflag, flgs); 710 flagsCol_.put(i, flgs); 711 } 712 } 713 714 std::vector<bool> Scantable::getClipMask(int whichrow, const Float uthres, const Float dthres, bool clipoutside, bool unflag) 715 { 716 Vector<uChar> flags; 717 flagsCol_.get(uInt(whichrow), flags); 718 srchChannelsToClip(uInt(whichrow), uthres, dthres, clipoutside, unflag, flags); 719 Vector<Bool> bflag(flags.shape()); 720 convertArray(bflag, flags); 721 //bflag = !bflag; 722 723 std::vector<bool> mask; 724 bflag.tovector(mask); 725 return mask; 726 } 727 728 void Scantable::srchChannelsToClip(uInt whichrow, const Float uthres, const Float dthres, bool clipoutside, bool unflag, 729 Vector<uChar> flgs) 730 { 731 Vector<Float> spcs = specCol_(whichrow); 710 732 uInt nchannel = nchan(); 711 733 if (spcs.nelements() != nchannel) { … … 731 753 } 732 754 } 733 flagsCol_.put(i, flgs);734 }735 755 } 736 756 -
branches/alma/src/Scantable.h
r1703 r1707 250 250 251 251 /** 252 * Return a list of booleans with the size of nchan for a specified row, to get info 253 * about which channel is clipped. 254 */ 255 std::vector<bool> getClipMask(int whichrow, const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag); 256 void srchChannelsToClip(casa::uInt whichrow, const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag, 257 casa::Vector<casa::uChar> flgs); 258 259 /** 252 260 * Return a list of row numbers with respect to the original table. 253 261 * @return a list of unsigned ints -
branches/alma/src/ScantableWrapper.h
r1703 r1707 117 117 { table_->clip(uthres, dthres, clipoutside, unflag); } 118 118 119 std::vector<bool> getClipMask(int whichrow, const casa::Float uthres, const casa::Float dthres, bool clipoutside, bool unflag) const 120 { return table_->getClipMask(whichrow, uthres, dthres, clipoutside, unflag); } 121 119 122 std::string getSourceName(int whichrow=0) const 120 123 { return table_->getSourceName(whichrow); } -
branches/alma/src/python_Scantable.cpp
r1700 r1707 88 88 .def("_getmask", &ScantableWrapper::getMask, 89 89 (boost::python::arg("whichrow")=0) ) 90 .def("_getclipmask", &ScantableWrapper::getClipMask, 91 (boost::python::arg("whichrow")=0) ) 90 92 .def("_gettsys", &ScantableWrapper::getTsys) 91 93 .def("_getsourcename", &ScantableWrapper::getSourceName,
Note:
See TracChangeset
for help on using the changeset viewer.