source: trunk/src/STBaselineTable.h @ 2767

Last change on this file since 2767 was 2767, checked in by WataruKawasaki, 11 years ago

New Development: Yes

JIRA Issue: Yes CAS-4794

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes: No

Module(s): sd

Description: functions to apply/write STBaselineTable in which baseline parameters stored.


File size: 4.2 KB
Line 
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
23namespace asap {
24
25/**
26ApplyTable for baseline subtraction
27
28@author Wataru Kawasaki
29@date $Date:$
30@version $Revision:$
31*/
32class STBaselineTable : public STApplyTable {
33public:
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::Bool apply,
49               STBaselineFunc::FuncName ftype,
50               casa::Vector<casa::Int> fpar,
51               casa::Vector<casa::Float> ffpar,
52               casa::Vector<casa::uInt> mask,
53               casa::Vector<casa::Float> res,
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);
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,
64                  casa::Bool apply,
65                  STBaselineFunc::FuncName ftype,
66                  casa::Vector<casa::Int> fpar,
67                  casa::Vector<casa::Float> ffpar,
68                  casa::Vector<casa::uInt> mask,
69                  casa::Vector<casa::Float> res,
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);
83  casa::uInt nchan(casa::uInt ifno);
84  casa::Vector<casa::Bool> getApply() {return applyCol_.getColumn();}
85  bool getApply(int irow);
86  casa::Vector<casa::uInt> getFunction() {return ftypeCol_.getColumn();}
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);
91  casa::Matrix<casa::Float> getFuncFParam() {return ffparCol_.getColumn();}
92  casa::Matrix<casa::uInt> getMaskList() {return maskCol_.getColumn();}
93  std::vector<bool> getMask(int irow);
94  casa::Matrix<casa::Float> getResult() {return resCol_.getColumn();}
95  casa::Vector<casa::Float> getRms() {return rmsCol_.getColumn();}
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);
104
105private:
106  static const casa::String name_ ;
107  casa::ScalarColumn<casa::Bool> applyCol_;
108  casa::ScalarColumn<casa::uInt> ftypeCol_;
109  casa::ArrayColumn<casa::Int> fparCol_;
110  casa::ArrayColumn<casa::Float> ffparCol_;
111  casa::ArrayColumn<casa::uInt> maskCol_;
112  casa::ArrayColumn<casa::Float> resCol_;
113  casa::ScalarColumn<casa::Float> rmsCol_;
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_;
120};
121
122}
123
124#endif
Note: See TracBrowser for help on using the repository browser.