- Timestamp:
- 08/29/06 11:03:45 (18 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STMath.cpp
r1192 r1200 1381 1381 CountedPtr< Scantable > 1382 1382 asap::STMath::lagFlag( const CountedPtr< Scantable > & in, 1383 double frequency, intwidth )1383 double frequency, double width ) 1384 1384 { 1385 1385 CountedPtr< Scantable > out = getScantable(in, false); … … 1399 1399 Vector<Float> spec = specCol(i); 1400 1400 Vector<uChar> flag = flagCol(i); 1401 Int lag = Int(spec.nelements()*abs(inc)/frequency); 1401 Int lag0 = Int(spec.nelements()*abs(inc)/(frequency+width)+0.5); 1402 Int lag1 = Int(spec.nelements()*abs(inc)/(frequency-width)+0.5); 1402 1403 for (int k=0; k < flag.nelements(); ++k ) { 1403 1404 if (flag[k] > 0) { … … 1407 1408 Vector<Complex> lags; 1408 1409 ffts.fft(lags, spec); 1409 Int start = max(0, lag -width);1410 Int end = min(Int(lags.nelements()-1), lag +width);1410 Int start = max(0, lag0); 1411 Int end = min(Int(lags.nelements()-1), lag1); 1411 1412 if (start == end) { 1412 1413 lags[start] = Complex(0.0); -
trunk/src/STMath.h
r1192 r1200 191 191 casa::CountedPtr<Scantable> 192 192 lagFlag( const casa::CountedPtr<Scantable>& in, double frequency, 193 intwidth);193 double width); 194 194 195 195 private: -
trunk/src/STMathWrapper.h
r1192 r1200 157 157 158 158 ScantableWrapper lagFlag( const ScantableWrapper& in, 159 double frequency, intwidth )159 double frequency, double width ) 160 160 { return ScantableWrapper(STMath::lagFlag(in.getCP(), frequency, width)); } 161 161
Note:
See TracChangeset
for help on using the changeset viewer.