source: trunk/src/MSFiller.h@ 1990

Last change on this file since 1990 was 1990, 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...

Test version of MSFiller that contains benchmark codes.


File size: 3.4 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/Logging/LogIO.h>
28
29#include <casa/Containers/Record.h>
30
31//#include <tables/Tables/TableColumn.h>
32
33#include <ms/MeasurementSets/MeasurementSet.h>
34#include <ms/MeasurementSets/MSPointing.h>
35
36#include "Scantable.h"
37
38namespace asap
39{
40
41class MSFiller
42{
43public:
44 explicit MSFiller(casa::CountedPtr<Scantable> stable) ;
45 virtual ~MSFiller() ;
46
47 virtual bool open(const std::string& filename, const casa::Record& rec) ;
48 virtual void fill() ;
49 virtual void close() ;
50
51protected:
52
53
54private:
55
56 MSFiller();
57 MSFiller(const MSFiller&);
58 MSFiller& operator=(const MSFiller&);
59
60 // fill subtables
61 //void fillFrequencies() ;
62 //void fillMolecules() ;
63 void fillWeather() ;
64 void fillFocus() ;
65 //void fillHistory() ;
66 //void fillFit() ;
67 void fillTcal( boost::object_pool<casa::ROTableColumn> *poolr,
68 boost::object_pool<casa::TableColumn> *poolw ) ;
69
70 // get SRCTYPE from STATE_ID
71 casa::Int getSrcType( casa::Int stateId, boost::object_pool<casa::ROTableColumn> *pool ) ;
72 //casa::Int getSrcType( casa::Int stateId ) ;
73
74 // get POLNO from CORR_TYPE
75 casa::Vector<casa::uInt> getPolNo( casa::Int corrType ) ;
76
77 // get poltype from CORR_TYPE
78 casa::String getPolType( casa::Int corrType ) ;
79
80 // get WEATHER_ID
81 casa::uInt getWeatherId( casa::uInt idx, casa::Double wtime ) ;
82
83 // get time stamp in SYSCAL table
84 // assume that tab is selected by ANTENNA_ID, FEED_ID, SPECTRAL_WINDOW_ID
85 // and sorted by TIME
86 casa::Vector<casa::Double> getSysCalTime( casa::MSSysCal &tab, casa::MEpoch::ROScalarColumn &tcol ) ;
87
88 // get tsys by time stamp
89 // assume that tab is selected by ANTENNA_ID, FEED_ID, SPECTRAL_WINDOW_ID
90 // and sorted by TIME
91 casa::uInt getTsys( casa::uInt idx, casa::Matrix<casa::Float> &tsys, casa::MSSysCal &tab, casa::Double t ) ;
92
93 // get TCAL_ID
94 casa::Vector<casa::uInt> getTcalId( casa::Int feedId, casa::Int spwId, casa::Double t ) ;
95
96 // get direction for DIRECTION, AZIMUTH, and ELEVATION columns
97 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 ) ;
98
99 // create key for TCAL table
100 casa::String keyTcal( casa::Int feedid, casa::Int spwid, casa::String stime ) ;
101
102 casa::CountedPtr<Scantable> table_ ;
103 casa::MeasurementSet mstable_ ;
104 casa::String tablename_ ;
105 casa::Int antenna_ ;
106 casa::Bool getPt_ ;
107
108 casa::Bool isFloatData_ ;
109 casa::Bool isData_ ;
110
111 casa::Bool isDoppler_ ;
112 casa::Bool isFlagCmd_ ;
113 casa::Bool isFreqOffset_ ;
114 casa::Bool isHistory_ ;
115 casa::Bool isProcessor_ ;
116 casa::Bool isSysCal_ ;
117 casa::Bool isWeather_ ;
118
119 casa::LogIO os_ ;
120
121 casa::Vector<casa::Double> mwTime_ ;
122 casa::Vector<casa::Double> mwInterval_ ;
123
124 // Record for TCAL_ID
125 // "FIELD0": "SPW0": Vector<uInt>
126 // "SPW1": Vector<uInt>
127 // ...
128 casa::Record tcalrec_ ;
129
130 //casa::ROTableColumn *scCol_ ;
131};
132
133
134};
135#endif
Note: See TracBrowser for help on using the repository browser.