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, |
---|
48 | casa::uInt nchan, |
---|
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, |
---|
56 | casa::Float rms); |
---|
57 | void appenddata(casa::uInt scanno, casa::uInt cycleno, |
---|
58 | casa::uInt beamno, casa::uInt ifno, casa::uInt polno, |
---|
59 | casa::uInt freqid, casa::Double time, |
---|
60 | casa::uInt nchan, |
---|
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); |
---|
69 | casa::uInt nchan(casa::uInt ifno); |
---|
70 | casa::Vector<casa::uInt> getFunction() {return ftypeCol_.getColumn();} |
---|
71 | casa::Vector<STBaselineFunc::FuncName> getFunctionAsString(); |
---|
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();} |
---|
78 | casa::Vector<casa::Float> getRms() {return rmsCol_.getColumn();} |
---|
79 | |
---|
80 | private: |
---|
81 | static const casa::String name_ ; |
---|
82 | casa::ScalarColumn<casa::uInt> nchanCol_; |
---|
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_; |
---|
90 | casa::ScalarColumn<casa::Float> rmsCol_; |
---|
91 | }; |
---|
92 | |
---|
93 | } |
---|
94 | |
---|
95 | #endif |
---|