source: trunk/src/MSFiller.h@ 1989

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

More speed up filler.


File size: 3.3 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 casa::CountedPtr<Scantable> table_ ;
100 casa::MeasurementSet mstable_ ;
101 casa::String tablename_ ;
102 casa::Int antenna_ ;
103 casa::Bool getPt_ ;
104
105 casa::Bool isFloatData_ ;
106 casa::Bool isData_ ;
107
108 casa::Bool isDoppler_ ;
109 casa::Bool isFlagCmd_ ;
110 casa::Bool isFreqOffset_ ;
111 casa::Bool isHistory_ ;
112 casa::Bool isProcessor_ ;
113 casa::Bool isSysCal_ ;
114 casa::Bool isWeather_ ;
115
116 casa::LogIO os_ ;
117
118 casa::Vector<casa::Double> mwTime_ ;
119 casa::Vector<casa::Double> mwInterval_ ;
120
121 // Record for TCAL_ID
122 // "FIELD0": "SPW0": Vector<uInt>
123 // "SPW1": Vector<uInt>
124 // ...
125 casa::Record tcalrec_ ;
126
127 //casa::ROTableColumn *scCol_ ;
128};
129
130
131};
132#endif
Note: See TracBrowser for help on using the repository browser.