source: trunk/src/MSFiller.h@ 2001

Last change on this file since 2001 was 1993, checked in by Takeshi Nakazato, 14 years ago

New Development: No

JIRA Issue: Yes CAS-2718

Ready for Test: Yes

Interface Changes: 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...

Small improvement on TCAL(_SPECTRUM) and TSYS(_SPECTRUM) handling.


File size: 3.6 KB
Line 
1//
2// C++ Interface: MSFiller
3//
4// Description:
5//
6// This class is specific filler for MS format
7//
8// Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2010
9//
10// Copyright: See COPYING file that comes with this distribution
11//
12//
13#ifndef ASAPMSFILLER_H
14#define ASAPMSFILLER_H
15
16// STL
17#include <string>
18
19// Boost
20#include <boost/pool/object_pool.hpp>
21
22// AIPS++
23#include <casa/aips.h>
24#include <casa/Utilities/CountedPtr.h>
25#include <casa/Arrays/Vector.h>
26#include <casa/Arrays/Matrix.h>
27#include <casa/Arrays/Cube.h>
28#include <casa/Logging/LogIO.h>
29
30#include <casa/Containers/Record.h>
31
32//#include <tables/Tables/TableColumn.h>
33
34#include <ms/MeasurementSets/MeasurementSet.h>
35#include <ms/MeasurementSets/MSPointing.h>
36
37#include "Scantable.h"
38
39namespace asap
40{
41
42class MSFiller
43{
44public:
45 explicit MSFiller(casa::CountedPtr<Scantable> stable) ;
46 virtual ~MSFiller() ;
47
48 virtual bool open(const std::string& filename, const casa::Record& rec) ;
49 virtual void fill() ;
50 virtual void close() ;
51
52protected:
53
54
55private:
56
57 MSFiller();
58 MSFiller(const MSFiller&);
59 MSFiller& operator=(const MSFiller&);
60
61 // fill subtables
62 //void fillFrequencies() ;
63 //void fillMolecules() ;
64 void fillWeather() ;
65 void fillFocus() ;
66 //void fillHistory() ;
67 //void fillFit() ;
68 void fillTcal( boost::object_pool<casa::ROTableColumn> *poolr,
69 boost::object_pool<casa::TableColumn> *poolw ) ;
70
71 // get SRCTYPE from STATE_ID
72 casa::Int getSrcType( casa::Int stateId, boost::object_pool<casa::ROTableColumn> *pool ) ;
73 //casa::Int getSrcType( casa::Int stateId ) ;
74
75 // get POLNO from CORR_TYPE
76 casa::Vector<casa::uInt> getPolNo( casa::Int corrType ) ;
77
78 // get poltype from CORR_TYPE
79 casa::String getPolType( casa::Int corrType ) ;
80
81 // get WEATHER_ID
82 casa::uInt getWeatherId( casa::uInt idx, casa::Double wtime ) ;
83
84 // get time stamp in SYSCAL table
85 // assume that tab is selected by ANTENNA_ID, FEED_ID, SPECTRAL_WINDOW_ID
86 // and sorted by TIME
87 //casa::Vector<casa::Double> getSysCalTime( casa::MSSysCal &tab, casa::MEpoch::ROScalarColumn &tcol ) ;
88 void getSysCalTime( casa::MSSysCal &tab, casa::MEpoch::ROScalarColumn &tcal, casa::Vector<casa::Double> &scTime ) ;
89
90 // get tsys by time stamp
91 // assume that tab is selected by ANTENNA_ID, FEED_ID, SPECTRAL_WINDOW_ID
92 // and sorted by TIME
93 casa::uInt getTsys( casa::uInt idx, casa::Matrix<casa::Float> &tsys, casa::MSSysCal &tab, casa::Double t ) ;
94
95 // get TCAL_ID
96 casa::Vector<casa::uInt> getTcalId( casa::Int feedId, casa::Int spwId, casa::Double t ) ;
97
98 // get direction for DIRECTION, AZIMUTH, and ELEVATION columns
99 casa::uInt getDirection( casa::uInt idx, casa::Vector<casa::Double> &dir, casa::Vector<casa::Double> &srate, casa::String &ref, casa::MSPointing &tab, casa::Double t ) ;
100
101 // create key for TCAL table
102 casa::String keyTcal( casa::Int feedid, casa::Int spwid, casa::String stime ) ;
103
104 casa::CountedPtr<Scantable> table_ ;
105 casa::MeasurementSet mstable_ ;
106 casa::String tablename_ ;
107 casa::Int antenna_ ;
108 casa::Bool getPt_ ;
109
110 casa::Bool isFloatData_ ;
111 casa::Bool isData_ ;
112
113 casa::Bool isDoppler_ ;
114 casa::Bool isFlagCmd_ ;
115 casa::Bool isFreqOffset_ ;
116 casa::Bool isHistory_ ;
117 casa::Bool isProcessor_ ;
118 casa::Bool isSysCal_ ;
119 casa::Bool isWeather_ ;
120
121 casa::String colTsys_ ;
122 casa::String colTcal_ ;
123
124 casa::LogIO os_ ;
125
126 casa::Vector<casa::Double> mwTime_ ;
127 casa::Vector<casa::Double> mwInterval_ ;
128
129 // Record for TCAL_ID
130 // "FIELD0": "SPW0": Vector<uInt>
131 // "SPW1": Vector<uInt>
132 // ...
133 casa::Record tcalrec_ ;
134
135 //casa::ROTableColumn *scCol_ ;
136};
137
138
139};
140#endif
Note: See TracBrowser for help on using the repository browser.