source: trunk/src/STApplyCal.h @ 3106

Last change on this file since 3106 was 3106, checked in by Takeshi Nakazato, 8 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes/No?

Interface Changes: Yes/No?

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...


Check-in asap modifications from Jim regarding casacore namespace conversion.

File size: 3.5 KB
Line 
1//
2// C++ Interface: STApplyCal
3//
4// Description:
5//
6// Apply any apply tables to target data.
7//
8// Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp> (C) 2012
9//
10// Copyright: See COPYING file that comes with this distribution
11//
12//
13#ifndef ASAP_APPLY_CAL_H
14#define ASAP_APPLY_CAL_H
15
16#include <map>
17#include <vector>
18
19#include <casa/Utilities/CountedPtr.h>
20#include <casa/Arrays/Vector.h>
21#include <casa/Logging/LogIO.h>
22#include <tables/Tables/Table.h>
23#include <tables/Tables/ScalarColumn.h>
24#include <measures/TableMeasures/ScalarMeasColumn.h>
25
26#include "Scantable.h"
27#include "STSelector.h"
28#include "STApplyTable.h"
29#include "STCalEnum.h"
30//#include "Calibrator.h"
31//#include "Interpolator1D.h"
32#include "STCalSkyTable.h"
33#include "STCalTsysTable.h"
34
35namespace asap {
36
37template<class T, class U> class Interpolator1D;
38class Calibrator;
39
40/**
41Apply any apply tables to target data
42
43@author Takeshi Nakazato
44@date $Date:$
45@version $Revision:$
46*/
47class STApplyCal  {
48public:
49  STApplyCal();
50  STApplyCal(casacore::CountedPtr<Scantable> target);
51
52  ~STApplyCal();
53
54  // set data
55  void setTarget(casacore::CountedPtr<Scantable> target);
56  void setTarget(const casacore::String &name);
57
58  // push new caltable
59  void push(STCalSkyTable *table);
60  void push(STCalTsysTable *table);
61
62  // set interpolation method
63  //void setInterpolation(STCalEnum::InterpolationAxis axis, STCalEnum::InterpolationType itype, casacore::Int order=-1);
64  void setTimeInterpolation(STCalEnum::InterpolationType itype, casacore::Int order=-1);
65  void setFrequencyInterpolation(STCalEnum::InterpolationType itype, casacore::Int order=-1);
66
67  // set IF (spw) mapping for Tsys transfer
68  void setTsysTransfer(casacore::uInt from, casacore::Vector<casacore::uInt> to);
69
70  // apply tables
71  void apply(casacore::Bool insitu=false, casacore::Bool filltsys=true);
72
73  // split target data and store it to disk
74  void save(const casacore::String &name);
75
76  // reset all settings except target scantable
77  void reset();
78
79  // reset all settings
80  void completeReset();
81 
82private:
83  // initialization
84  void init();
85
86  // setup interpolator
87  void initInterpolator();
88
89  // single loop element in apply()
90  void doapply(casacore::uInt beamno, casacore::uInt ifno, casacore::uInt polno,
91               casacore::Vector<casacore::uInt> &rows,
92               casacore::Vector<casacore::uInt> &skylist,
93               casacore::Bool filltsys=true);
94
95  // get frequency information from FREQUENCIES subtable
96  casacore::Vector<casacore::Double> getBaseFrequency(casacore::uInt whichrow);
97
98  // search spwmap_ to get IFNO for Tsys
99  casacore::uInt getIFForTsys(casacore::uInt to);
100
101  // target data
102  casacore::CountedPtr<Scantable> target_;
103
104  // working data
105  casacore::CountedPtr<Scantable> work_;
106
107  // calibrator
108  casacore::CountedPtr<Calibrator> calibrator_;
109
110  // interpolation method
111  STCalEnum::InterpolationType iTime_;
112  STCalEnum::InterpolationType iFreq_;
113  casacore::Int order_;
114  casacore::CountedPtr<Interpolator1D<casacore::Double, casacore::Float> > interpolatorT_;
115  casacore::CountedPtr<Interpolator1D<casacore::Double, casacore::Float> > interpolatorF_;
116  casacore::CountedPtr<Interpolator1D<casacore::Double, casacore::Float> > interpolatorS_;
117
118  // IF (spw) mapping for Tsys transfer
119  map<casacore::uInt, casacore::Vector<casacore::uInt> > spwmap_;
120
121  // list of apply tables
122  std::vector<STCalSkyTable*> skytable_;
123  std::vector<STCalTsysTable*> tsystable_;
124
125  // calibration type
126  STCalEnum::CalType caltype_;
127  casacore::Bool doTsys_;
128
129  // selector
130  STSelector sel_;
131
132  // logger
133  casacore::LogIO os_;
134};
135
136}
137
138#endif
Note: See TracBrowser for help on using the repository browser.