1 | // |
---|
2 | // C++ Interface: STCalibration |
---|
3 | // |
---|
4 | // Description: |
---|
5 | // |
---|
6 | // |
---|
7 | // Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2012 |
---|
8 | // |
---|
9 | // Copyright: See COPYING file that comes with this distribution |
---|
10 | // |
---|
11 | // |
---|
12 | #ifndef ASAPSTCALIBRATION_H |
---|
13 | #define ASAPSTCALIBRATION_H |
---|
14 | |
---|
15 | #include <casa/aips.h> |
---|
16 | #include <casa/Arrays/Vector.h> |
---|
17 | #include <casa/BasicSL/String.h> |
---|
18 | #include <casa/Utilities/CountedPtr.h> |
---|
19 | #include <casa/Logging/LogIO.h> |
---|
20 | #include <casa/Containers/Record.h> |
---|
21 | |
---|
22 | #include <scimath/Mathematics/InterpolateArray1D.h> |
---|
23 | |
---|
24 | #include "Scantable.h" |
---|
25 | #include "STDefs.h" |
---|
26 | #include "STApplyTable.h" |
---|
27 | #include "STSelector.h" |
---|
28 | |
---|
29 | namespace asap { |
---|
30 | |
---|
31 | /** |
---|
32 | * Calibration operations on Scantable objects |
---|
33 | * @author TakeshiNakazato |
---|
34 | */ |
---|
35 | class STCalibration { |
---|
36 | public: |
---|
37 | STCalibration(casa::CountedPtr<Scantable> &s, const casa::String target_column); |
---|
38 | |
---|
39 | void calibrate(); |
---|
40 | |
---|
41 | virtual ~STCalibration() {;} |
---|
42 | |
---|
43 | void save(casa::String name) {applytable_->save(name);} |
---|
44 | //const STApplyTable &applytable() {return *applytable_;} |
---|
45 | const casa::CountedPtr<STApplyTable> applytable() {return applytable_;} |
---|
46 | |
---|
47 | void setOption(casa::Record &rec) {options_ = rec;} |
---|
48 | |
---|
49 | protected: |
---|
50 | virtual void setupSelector(const STSelector &sel) = 0; |
---|
51 | virtual void fillCalTable(); |
---|
52 | virtual void appenddata(casa::uInt scanno, casa::uInt cycleno, |
---|
53 | casa::uInt beamno, casa::uInt ifno, casa::uInt polno, |
---|
54 | casa::uInt freqid, casa::Double time, casa::Float elevation, |
---|
55 | const casa::Vector<casa::Float> &any_data, |
---|
56 | const casa::Vector<casa::uChar> &channel_flag) = 0; |
---|
57 | |
---|
58 | STSelector sel_; |
---|
59 | casa::CountedPtr<Scantable> scantable_; |
---|
60 | casa::CountedPtr<STApplyTable> applytable_; |
---|
61 | casa::LogIO os_; |
---|
62 | casa::Record options_; |
---|
63 | const casa::String target_column_; |
---|
64 | }; |
---|
65 | |
---|
66 | } |
---|
67 | #endif |
---|