[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, |
---|
| 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, |
---|
| 54 | casa::Float rms); |
---|
| 55 | void appenddata(casa::uInt scanno, casa::uInt cycleno, |
---|
| 56 | casa::uInt beamno, casa::uInt ifno, casa::uInt polno, |
---|
| 57 | casa::uInt freqid, casa::Double time, |
---|
| 58 | 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 | |
---|
| 66 | casa::uInt nchan(casa::uInt ifno); |
---|
| 67 | casa::Vector<casa::uInt> getFunction() {return funcCol_.getColumn();} |
---|
| 68 | 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> getMaskList() {return maskCol_.getColumn();} |
---|
| 75 | casa::Vector<casa::Float> getRms() {return rmsCol_.getColumn();} |
---|
| 76 | |
---|
| 77 | private: |
---|
| 78 | static const casa::String name_ ; |
---|
| 79 | casa::ScalarColumn<casa::uInt> nchanCol_; |
---|
| 80 | casa::ScalarColumn<casa::uInt> funcCol_; |
---|
| 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_; |
---|
| 87 | casa::ScalarColumn<casa::Float> rmsCol_; |
---|
| 88 | }; |
---|
| 89 | |
---|
| 90 | } |
---|
| 91 | |
---|
| 92 | #endif |
---|