Changeset 382
- Timestamp:
- 02/08/05 12:37:22 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MathUtils.cc
r364 r382 76 76 } 77 77 } 78 79 80 void mathutil::scanBoundaries (Vector<uInt>& startInt, 81 Vector<uInt>& endInt, 82 const Vector<Int>& scanIDs) 83 // 84 // FInd integrations start and end for each Scan 85 // 86 { 87 uInt nInt = scanIDs.nelements(); 88 startInt.resize(nInt); 89 endInt.resize(nInt); 90 // 91 startInt(0) = 0; 92 uInt j = 0; 93 Int currScanID = scanIDs(0); 94 for (uInt i=0; i<nInt; i++) { 95 if (scanIDs(i) != currScanID) { 96 endInt(j) = i-1; 97 currScanID = scanIDs(i); 98 // 99 j += 1; 100 startInt(j) = i; 101 if (i==nInt-1) { 102 endInt(j) = i; 103 } 104 } else { 105 if (i==nInt-1) endInt(j) = i; 106 } 107 } 108 startInt.resize(j+1,True); 109 endInt.resize(j+1,True); 110 } -
trunk/src/MathUtils.h
r364 r382 41 41 casa::uInt addEntry (casa::Vector<T>& list, T val); 42 42 43 // FInd the scan boundaries from a list of ScanIDs 44 void scanBoundaries (casa::Vector<casa::uInt>& startInt, 45 casa::Vector<casa::uInt>& endInt, 46 const casa::Vector<casa::Int>& scanIDs); 43 47 44 48 // Hanning smoothing
Note:
See TracChangeset
for help on using the changeset viewer.