Changeset 2410
- Timestamp:
- 02/17/12 13:58:12 (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r2406 r2410 2415 2415 workscan = self.copy() 2416 2416 2417 if mask is None: mask = [True for i in xrange(workscan.nchan())] 2417 #if mask is None: mask = [True for i in xrange(workscan.nchan())] 2418 if mask is None: mask = [] 2418 2419 if applyfft is None: applyfft = True 2419 2420 if fftmethod is None: fftmethod = 'fft' … … 2555 2556 workscan = self.copy() 2556 2557 2557 if mask is None: mask = [True for i in xrange(workscan.nchan())] 2558 #if mask is None: mask = [True for i in xrange(workscan.nchan())] 2559 if mask is None: mask = [] 2558 2560 if applyfft is None: applyfft = True 2559 2561 if fftmethod is None: fftmethod = 'fft' … … 2650 2652 workscan = self.copy() 2651 2653 2652 if mask is None: mask = [True for i in xrange(workscan.nchan())] 2654 #if mask is None: mask = [True for i in xrange(workscan.nchan())] 2655 if mask is None: mask = [] 2653 2656 if npiece is None: npiece = 2 2654 2657 if clipthresh is None: clipthresh = 3.0 … … 2752 2755 workscan = self.copy() 2753 2756 2754 if mask is None: mask = [True for i in xrange(workscan.nchan())] 2757 #if mask is None: mask = [True for i in xrange(workscan.nchan())] 2758 if mask is None: mask = [] 2755 2759 if npiece is None: npiece = 2 2756 2760 if clipthresh is None: clipthresh = 3.0 … … 2828 2832 workscan = self.copy() 2829 2833 2830 if mask is None: mask = [True for i in \ 2831 xrange(workscan.nchan())] 2834 #if mask is None: mask = [True for i in \ 2835 # xrange(workscan.nchan())] 2836 if mask is None: mask = [] 2832 2837 if order is None: order = 0 2833 2838 if plot is None: plot = False … … 2967 2972 workscan = self.copy() 2968 2973 2969 if mask is None: mask = [True for i in xrange(workscan.nchan())] 2974 #if mask is None: mask = [True for i in xrange(workscan.nchan())] 2975 if mask is None: mask = [] 2970 2976 if order is None: order = 0 2971 2977 if edge is None: edge = (0, 0) -
trunk/src/STLineFinder.cpp
r2345 r2410 943 943 void STLineFinder::setData(const std::vector<float> &in_spectrum) 944 944 { 945 spectrum = Vector<Float>(in_spectrum); 945 //spectrum = Vector<Float>(in_spectrum); 946 spectrum.assign( Vector<Float>(in_spectrum) ); 946 947 useScantable = false; 947 948 } … … 966 967 // no mask given... 967 968 if (in_mask.size() == 0) { 968 mask = Vector<Bool>(nchan,True); 969 //mask = Vector<Bool>(nchan,True); 970 mask.assign( Vector<Bool>(nchan,True) ); 969 971 } else { 970 972 // use provided mask 971 mask=Vector<Bool>(in_mask); 973 //mask=Vector<Bool>(in_mask); 974 mask.assign( Vector<Bool>(in_mask) ); 972 975 } 973 976 if (mask.nelements()!=nchan) -
trunk/src/Scantable.cpp
r2348 r2410 3189 3189 std::vector<bool> mask = getMask(whichrow); 3190 3190 uInt maskSize = mask.size(); 3191 if (maskSize != inMask.size()) { 3192 throw(AipsError("mask sizes are not the same.")); 3193 } 3194 for (uInt i = 0; i < maskSize; ++i) { 3195 mask[i] = mask[i] && inMask[i]; 3191 if (inMask.size() != 0) { 3192 if (maskSize != inMask.size()) { 3193 throw(AipsError("mask sizes are not the same.")); 3194 } 3195 for (uInt i = 0; i < maskSize; ++i) { 3196 mask[i] = mask[i] && inMask[i]; 3197 } 3196 3198 } 3197 3199
Note:
See TracChangeset
for help on using the changeset viewer.