Changeset 2740
- Timestamp:
- 01/18/13 20:42:21 (12 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STBaselineTable.cpp
r2738 r2740 52 52 { 53 53 table_.addColumn(ScalarColumnDesc<uInt>("NCHAN")); 54 table_.addColumn(ScalarColumnDesc<uInt>("FUNCTION")); 55 table_.addColumn(ScalarColumnDesc<uInt>("ORDER")); 54 table_.addColumn(ScalarColumnDesc<uInt>("FUNC_TYPE")); 55 table_.addColumn(ArrayColumnDesc<uInt>("FUNC_PARAM")); 56 table_.addColumn(ArrayColumnDesc<Float>("FUNC_FPARAM")); 56 57 table_.addColumn(ScalarColumnDesc<uInt>("CLIP_ITERATION")); 57 58 table_.addColumn(ScalarColumnDesc<Float>("CLIP_THRESHOLD")); 58 table_.addColumn(ArrayColumnDesc<Float>("SECTION")); 59 table_.addColumn(ArrayColumnDesc<Float>("PARAMETER")); 60 table_.addColumn(ArrayColumnDesc<Float>("MASKLIST")); 59 table_.addColumn(ArrayColumnDesc<uInt>("MASKLIST")); 60 table_.addColumn(ArrayColumnDesc<Float>("RESULT")); 61 61 table_.addColumn(ScalarColumnDesc<Float>("RMS")); 62 62 … … 69 69 { 70 70 nchanCol_.attach(table_, "NCHAN"); 71 funcCol_.attach(table_, "FUNCTION"); 72 orderCol_.attach(table_, "ORDER"); 73 clipiterCol_.attach(table_, "CLIP_ITERATION"); 74 clipthresCol_.attach(table_, "CLIP_THRESHOLD"); 75 sectCol_.attach(table_, "SECTION"); 76 paramCol_.attach(table_, "PARAMETER"); 71 ftypeCol_.attach(table_, "FUNC_TYPE"); 72 fparCol_.attach(table_, "FUNC_PARAM"); 73 ffparCol_.attach(table_, "FUNC_FPARAM"); 74 citerCol_.attach(table_, "CLIP_ITERATION"); 75 cthresCol_.attach(table_, "CLIP_THRESHOLD"); 77 76 maskCol_.attach(table_, "MASKLIST"); 77 resCol_.attach(table_, "RESULT"); 78 78 rmsCol_.attach(table_, "RMS"); 79 79 } … … 88 88 89 89 void STBaselineTable::setdata(uInt irow, uInt scanno, uInt cycleno, 90 uInt beamno, uInt ifno, uInt polno, uInt freqid, 91 Double time, uInt nchan, STBaselineFunc::FuncName func, uInt order, 92 uInt clipiter, Float clipthres, 93 Vector<Float> sect, Vector<Float> param, 94 Vector<Float> mask, Float rms) 90 uInt beamno, uInt ifno, uInt polno, 91 uInt freqid, Double time, 92 uInt nchan, 93 STBaselineFunc::FuncName ftype, 94 Vector<uInt> fpar, 95 Vector<Float> ffpar, 96 uInt citer, 97 Float cthres, 98 Vector<uInt> mask, 99 Vector<Float> res, 100 Float rms) 95 101 { 96 102 if (irow >= (uInt)nrow()) { … … 105 111 setbasedata(irow, scanno, cycleno, beamno, ifno, polno, freqid, time); 106 112 nchanCol_.put(irow, nchan); 107 funcCol_.put(irow, uInt(func)); 108 orderCol_.put(irow, order); 109 clipiterCol_.put(irow, clipiter); 110 clipthresCol_.put(irow, clipthres); 111 sectCol_.put(irow, sect); 112 paramCol_.put(irow, param); 113 ftypeCol_.put(irow, uInt(ftype)); 114 fparCol_.put(irow, fpar); 115 ffparCol_.put(irow, ffpar); 116 citerCol_.put(irow, citer); 117 cthresCol_.put(irow, cthres); 113 118 maskCol_.put(irow, mask); 119 resCol_.put(irow, res); 114 120 rmsCol_.put(irow, rms); 115 121 } 116 122 117 123 void STBaselineTable::appenddata(uInt scanno, uInt cycleno, 118 uInt beamno, uInt ifno, uInt polno, uInt freqid, 119 Double time, uInt nchan, STBaselineFunc::FuncName func, uInt order, 120 uInt clipiter, Float clipthres, 121 Vector<Float> sect, Vector<Float> param, 122 Vector<Float> mask, Float rms) 124 uInt beamno, uInt ifno, uInt polno, 125 uInt freqid, Double time, 126 uInt nchan, 127 STBaselineFunc::FuncName ftype, 128 Vector<uInt> fpar, 129 Vector<Float> ffpar, 130 uInt citer, 131 Float cthres, 132 Vector<uInt> mask, 133 Vector<Float> res, 134 Float rms) 123 135 { 124 136 uInt irow = nrow(); 125 137 table_.addRow(1, True); 126 138 setdata(irow, scanno, cycleno, beamno, ifno, polno, freqid, time, 127 nchan, f unc, order, clipiter, clipthres, sect, param, mask, rms);139 nchan, ftype, fpar, ffpar, citer, cthres, mask, res, rms); 128 140 } 129 141 130 142 Vector<STBaselineFunc::FuncName> STBaselineTable::getFunctionAsString() 131 143 { 132 Vector<uInt> rawBlfuncColumn = f uncCol_.getColumn();144 Vector<uInt> rawBlfuncColumn = ftypeCol_.getColumn(); 133 145 uInt n = rawBlfuncColumn.nelements(); 134 146 Vector<STBaselineFunc::FuncName> blfuncColumn(n); -
trunk/src/STBaselineTable.h
r2738 r2740 47 47 casa::uInt freqid, casa::Double time, 48 48 casa::uInt nchan, 49 STBaselineFunc::FuncName func, casa::uInt order, 50 casa::uInt clipiter, casa::Float clipthres, 51 casa::Vector<casa::Float> sect, 52 casa::Vector<casa::Float> param, 53 casa::Vector<casa::Float> mask, 49 STBaselineFunc::FuncName ftype, 50 casa::Vector<casa::uInt> fpar, 51 casa::Vector<casa::Float> ffpar, 52 casa::uInt citer, 53 casa::Float cthres, 54 casa::Vector<casa::uInt> mask, 55 casa::Vector<casa::Float> res, 54 56 casa::Float rms); 55 57 void appenddata(casa::uInt scanno, casa::uInt cycleno, … … 57 59 casa::uInt freqid, casa::Double time, 58 60 casa::uInt nchan, 59 STBaselineFunc::FuncName func, casa::uInt order, 60 casa::uInt clipiter, casa::Float clipthres, 61 casa::Vector<casa::Float> sect, 62 casa::Vector<casa::Float> param, 63 casa::Vector<casa::Float> mask, 64 casa::Float rms); 65 61 STBaselineFunc::FuncName ftype, 62 casa::Vector<casa::uInt> fpar, 63 casa::Vector<casa::Float> ffpar, 64 casa::uInt citer, 65 casa::Float cthres, 66 casa::Vector<casa::uInt> mask, 67 casa::Vector<casa::Float> res, 68 casa::Float rms); 66 69 casa::uInt nchan(casa::uInt ifno); 67 casa::Vector<casa::uInt> getFunction() {return f uncCol_.getColumn();}70 casa::Vector<casa::uInt> getFunction() {return ftypeCol_.getColumn();} 68 71 casa::Vector<STBaselineFunc::FuncName> getFunctionAsString(); 69 casa:: Vector<casa::uInt> getOrder() {return orderCol_.getColumn();}70 casa:: Vector<casa::uInt> getClipIteration() {return clipiterCol_.getColumn();}71 casa::Vector<casa:: Float> getClipThreshold() {return clipthresCol_.getColumn();}72 casa:: Matrix<casa::Float> getSection() {return sectCol_.getColumn();}73 casa::Matrix<casa:: Float> getParameter() {return paramCol_.getColumn();}74 casa::Matrix<casa::Float> get MaskList() {return maskCol_.getColumn();}72 casa::Matrix<casa::uInt> getFuncParam() {return fparCol_.getColumn();} 73 casa::Matrix<casa::Float> getFuncFParam() {return ffparCol_.getColumn();} 74 casa::Vector<casa::uInt> getClipIteration() {return citerCol_.getColumn();} 75 casa::Vector<casa::Float> getClipThreshold() {return cthresCol_.getColumn();} 76 casa::Matrix<casa::uInt> getMaskList() {return maskCol_.getColumn();} 77 casa::Matrix<casa::Float> getResult() {return resCol_.getColumn();} 75 78 casa::Vector<casa::Float> getRms() {return rmsCol_.getColumn();} 76 79 … … 78 81 static const casa::String name_ ; 79 82 casa::ScalarColumn<casa::uInt> nchanCol_; 80 casa::ScalarColumn<casa::uInt> f uncCol_;81 casa:: ScalarColumn<casa::uInt> orderCol_;82 casa:: ScalarColumn<casa::uInt> clipiterCol_;83 casa::ScalarColumn<casa:: Float> clipthresCol_;84 casa:: ArrayColumn<casa::Float> sectCol_;85 casa::ArrayColumn<casa:: Float> paramCol_;86 casa::ArrayColumn<casa::Float> maskCol_;83 casa::ScalarColumn<casa::uInt> ftypeCol_; 84 casa::ArrayColumn<casa::uInt> fparCol_; 85 casa::ArrayColumn<casa::Float> ffparCol_; 86 casa::ScalarColumn<casa::uInt> citerCol_; 87 casa::ScalarColumn<casa::Float> cthresCol_; 88 casa::ArrayColumn<casa::uInt> maskCol_; 89 casa::ArrayColumn<casa::Float> resCol_; 87 90 casa::ScalarColumn<casa::Float> rmsCol_; 88 91 }; -
trunk/src/Scantable.cpp
r2737 r2740 2637 2637 int nRow = nrow(); 2638 2638 std::vector<bool> chanMask; 2639 2640 std::vector<float> sect(0);2641 2639 std::vector<bool> finalChanMask; 2642 2640 float rms; 2643 2641 2644 2642 //--- 2645 bool outBaselineParamTable = true;2643 bool outBaselineParamTable = false; 2646 2644 STBaselineTable* bt = new STBaselineTable(*this); 2647 2645 //--- … … 2659 2657 uInt(0), 2660 2658 Double(0.0), // <-- Double(getTime(whichrow, false)), 2661 uInt(nchan(whichrow)), STBaselineFunc::Chebyshev, 2662 uInt(order), uInt(nIterClip), Float(thresClip), Vector<Float>(sect), Vector<Float>(params), 2663 Vector<Float>(params), // <-- Vector<Float>(finalChanMask), 2659 uInt(nchan(whichrow)), 2660 STBaselineFunc::Chebyshev, 2661 Vector<uInt>(1), // ==> MUST BE Vector<uInt> containing 'order'. 2662 Vector<Float>(), // ==> for ffpar. ** dummy ** 2663 uInt(nIterClip), 2664 Float(thresClip), 2665 Vector<uInt>(5), // <-- Vector<uInt>(finalChanMask), 2666 Vector<Float>(params), 2664 2667 Float(rms)); 2665 2668 } else {
Note:
See TracChangeset
for help on using the changeset viewer.