- Timestamp:
- 03/08/12 16:57:56 (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/interactivemask.py
r2117 r2427 55 55 raise TypeError(msg) 56 56 57 self.mask = _n_bools(self.scan.nchan( ),True)57 self.mask = _n_bools(self.scan.nchan(self.scan.getif(0)),True) 58 58 self.callback = None 59 59 self.event = None … … 92 92 self.mask = self.scan.create_mask(masklist,invert=invert) 93 93 elif invert == True: 94 self.mask = _n_bools(self.scan.nchan( ),False)95 else: 96 self.mask = _n_bools(self.scan.nchan( ),True)94 self.mask = _n_bools(self.scan.nchan(self.scan.getif(0)),False) 95 else: 96 self.mask = _n_bools(self.scan.nchan(self.scan.getif(0)),True) 97 97 98 98 -
trunk/python/scantable.py
r2411 r2427 1426 1426 if not (isinstance(mask,list) or isinstance(mask, tuple)): 1427 1427 raise TypeError("The mask should be list or tuple.") 1428 if len(mask) < 2:1429 raise TypeError("The mask elements should be > 1")1428 if len(mask) <= 0: 1429 raise TypeError("The mask elements should be > 0") 1430 1430 data = self._getabcissa(row) 1431 1431 if len(data) != len(mask): … … 1467 1467 if not (isinstance(mask,list) or isinstance(mask, tuple)): 1468 1468 raise TypeError("The mask should be list or tuple.") 1469 if len(mask) < 2:1470 raise TypeError("The mask elements should be > 1")1469 if len(mask) <= 0: 1470 raise TypeError("The mask elements should be > 0") 1471 1471 istart = [] 1472 1472 iend = [] -
trunk/src/Scantable.cpp
r2411 r2427 3550 3550 std::string Scantable::getMaskRangeList(const std::vector<bool>& mask, int whichrow, const casa::String& coordInfo, bool hasSameNchan, bool verbose) 3551 3551 { 3552 if (mask.size() < 2) {3553 throw(AipsError("The mask elements should be > 1"));3552 if (mask.size() <= 0) { 3553 throw(AipsError("The mask elements should be > 0")); 3554 3554 } 3555 3555 int IF = getIF(whichrow); … … 3584 3584 std::vector<int> Scantable::getMaskEdgeIndices(const std::vector<bool>& mask) 3585 3585 { 3586 if (mask.size() < 2) {3587 throw(AipsError("The mask elements should be > 1"));3586 if (mask.size() <= 0) { 3587 throw(AipsError("The mask elements should be > 0")); 3588 3588 } 3589 3589
Note:
See TracChangeset
for help on using the changeset viewer.