[2738] | 1 | // |
---|
| 2 | // C++ Interface: STBaselineTable |
---|
| 3 | // |
---|
| 4 | // Description: |
---|
| 5 | // |
---|
| 6 | // ApplyTable for baseline subtraction. |
---|
| 7 | // |
---|
| 8 | // Author: Wataru Kawasaki <wataru.kawasaki@nao.ac.jp> (C) 2013 |
---|
| 9 | // |
---|
| 10 | // Copyright: See COPYING file that comes with this distribution |
---|
| 11 | // |
---|
| 12 | // |
---|
| 13 | #ifndef ASAP_BASELINEPARAM_TABLE_H |
---|
| 14 | #define ASAP_BASELINEPARAM_TABLE_H |
---|
| 15 | |
---|
| 16 | #include <tables/Tables/ArrayColumn.h> |
---|
| 17 | #include <tables/Tables/ScalarColumn.h> |
---|
| 18 | |
---|
| 19 | #include "Scantable.h" |
---|
| 20 | #include "STApplyTable.h" |
---|
| 21 | #include "STBaselineEnum.h" |
---|
| 22 | |
---|
| 23 | namespace asap { |
---|
| 24 | |
---|
| 25 | /** |
---|
| 26 | ApplyTable for baseline subtraction |
---|
| 27 | |
---|
| 28 | @author Wataru Kawasaki |
---|
| 29 | @date $Date:$ |
---|
| 30 | @version $Revision:$ |
---|
| 31 | */ |
---|
| 32 | class STBaselineTable : public STApplyTable { |
---|
| 33 | public: |
---|
| 34 | STBaselineTable() {;} |
---|
| 35 | STBaselineTable(const Scantable& parent); |
---|
| 36 | STBaselineTable(const casa::String &name); |
---|
| 37 | |
---|
| 38 | virtual ~STBaselineTable(); |
---|
| 39 | |
---|
| 40 | void setup(); |
---|
| 41 | const casa::String& name() const {return name_;}; |
---|
| 42 | |
---|
| 43 | void attachOptionalColumns(); |
---|
| 44 | void save(const std::string &filename); |
---|
| 45 | void setdata(casa::uInt irow, casa::uInt scanno, casa::uInt cycleno, |
---|
| 46 | casa::uInt beamno, casa::uInt ifno, casa::uInt polno, |
---|
| 47 | casa::uInt freqid, casa::Double time, |
---|
[2767] | 48 | casa::Bool apply, |
---|
[2740] | 49 | STBaselineFunc::FuncName ftype, |
---|
[2767] | 50 | casa::Vector<casa::Int> fpar, |
---|
[2740] | 51 | casa::Vector<casa::Float> ffpar, |
---|
| 52 | casa::Vector<casa::uInt> mask, |
---|
| 53 | casa::Vector<casa::Float> res, |
---|
[2767] | 54 | casa::Float rms, |
---|
| 55 | casa::uInt nchan, |
---|
| 56 | casa::Float cthres, |
---|
| 57 | casa::uInt citer, |
---|
| 58 | casa::Float lfthres, |
---|
| 59 | casa::uInt lfavg, |
---|
| 60 | casa::Vector<casa::uInt> lfedge); |
---|
[2738] | 61 | void appenddata(casa::uInt scanno, casa::uInt cycleno, |
---|
| 62 | casa::uInt beamno, casa::uInt ifno, casa::uInt polno, |
---|
| 63 | casa::uInt freqid, casa::Double time, |
---|
[2767] | 64 | casa::Bool apply, |
---|
[2740] | 65 | STBaselineFunc::FuncName ftype, |
---|
[2767] | 66 | casa::Vector<casa::Int> fpar, |
---|
[2740] | 67 | casa::Vector<casa::Float> ffpar, |
---|
| 68 | casa::Vector<casa::uInt> mask, |
---|
| 69 | casa::Vector<casa::Float> res, |
---|
[2767] | 70 | casa::Float rms, |
---|
| 71 | casa::uInt nchan, |
---|
| 72 | casa::Float cthres, |
---|
| 73 | casa::uInt citer, |
---|
| 74 | casa::Float lfthres, |
---|
| 75 | casa::uInt lfavg, |
---|
| 76 | casa::Vector<casa::uInt> lfedge); |
---|
| 77 | void appendbasedata(int scanno, int cycleno, |
---|
| 78 | int beamno, int ifno, int polno, |
---|
| 79 | int freqid, casa::Double time); |
---|
| 80 | void setresult(casa::uInt irow, |
---|
| 81 | casa::Vector<casa::Float> res, |
---|
| 82 | casa::Float rms); |
---|
[2738] | 83 | casa::uInt nchan(casa::uInt ifno); |
---|
[2767] | 84 | casa::Vector<casa::Bool> getApply() {return applyCol_.getColumn();} |
---|
| 85 | bool getApply(int irow); |
---|
[2740] | 86 | casa::Vector<casa::uInt> getFunction() {return ftypeCol_.getColumn();} |
---|
[2767] | 87 | casa::Vector<STBaselineFunc::FuncName> getFunctionNames(); |
---|
| 88 | STBaselineFunc::FuncName getFunctionName(int irow); |
---|
| 89 | casa::Matrix<casa::Int> getFuncParam() {return fparCol_.getColumn();} |
---|
| 90 | std::vector<int> getFuncParam(int irow); |
---|
[2740] | 91 | casa::Matrix<casa::Float> getFuncFParam() {return ffparCol_.getColumn();} |
---|
| 92 | casa::Matrix<casa::uInt> getMaskList() {return maskCol_.getColumn();} |
---|
[2767] | 93 | std::vector<bool> getMask(int irow); |
---|
[2740] | 94 | casa::Matrix<casa::Float> getResult() {return resCol_.getColumn();} |
---|
[2738] | 95 | casa::Vector<casa::Float> getRms() {return rmsCol_.getColumn();} |
---|
[2767] | 96 | casa::Vector<casa::uInt> getNChan() {return nchanCol_.getColumn();} |
---|
| 97 | casa::uInt getNChan(int irow); |
---|
| 98 | casa::Vector<casa::Float> getClipThreshold() {return cthresCol_.getColumn();} |
---|
| 99 | casa::Vector<casa::uInt> getClipIteration() {return citerCol_.getColumn();} |
---|
| 100 | casa::Vector<casa::Float> getLineFinderThreshold() {return lfthresCol_.getColumn();} |
---|
| 101 | casa::Vector<casa::uInt> getLineFinderChanAvg() {return lfavgCol_.getColumn();} |
---|
| 102 | casa::Matrix<casa::uInt> getLineFinderEdge() {return lfedgeCol_.getColumn();} |
---|
| 103 | void setApply(int irow, bool apply); |
---|
[2738] | 104 | |
---|
| 105 | private: |
---|
| 106 | static const casa::String name_ ; |
---|
[2767] | 107 | casa::ScalarColumn<casa::Bool> applyCol_; |
---|
[2740] | 108 | casa::ScalarColumn<casa::uInt> ftypeCol_; |
---|
[2767] | 109 | casa::ArrayColumn<casa::Int> fparCol_; |
---|
[2740] | 110 | casa::ArrayColumn<casa::Float> ffparCol_; |
---|
| 111 | casa::ArrayColumn<casa::uInt> maskCol_; |
---|
| 112 | casa::ArrayColumn<casa::Float> resCol_; |
---|
[2738] | 113 | casa::ScalarColumn<casa::Float> rmsCol_; |
---|
[2767] | 114 | casa::ScalarColumn<casa::uInt> nchanCol_; |
---|
| 115 | casa::ScalarColumn<casa::Float> cthresCol_; |
---|
| 116 | casa::ScalarColumn<casa::uInt> citerCol_; |
---|
| 117 | casa::ScalarColumn<casa::Float> lfthresCol_; |
---|
| 118 | casa::ScalarColumn<casa::uInt> lfavgCol_; |
---|
| 119 | casa::ArrayColumn<casa::uInt> lfedgeCol_; |
---|
[2738] | 120 | }; |
---|
| 121 | |
---|
| 122 | } |
---|
| 123 | |
---|
| 124 | #endif |
---|