source: trunk/src/MSFiller.h@ 1983

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

New Development: Yes

JIRA Issue: Yes CAS-2718

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: New class msfiller and mswriter added

Test Programs: List test programs

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

New filler/writer specific for Scantable-MS conversion defined.
This is not called from scantable constructor right now.
However, you can call it by explicitly importing msfiller/mswriter.


File size: 3.0 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// AIPS++
19#include <casa/aips.h>
20#include <casa/Utilities/CountedPtr.h>
21#include <casa/Arrays/Vector.h>
22#include <casa/Logging/LogIO.h>
23
24#include <casa/Containers/Record.h>
25#include <tables/Tables/RefRows.h>
26
27#include <ms/MeasurementSets/MeasurementSet.h>
28#include <ms/MeasurementSets/MSColumns.h>
29
30#include "Scantable.h"
31
32namespace asap
33{
34
35class MSFiller
36{
37public:
38 explicit MSFiller(casa::CountedPtr<Scantable> stable) ;
39 virtual ~MSFiller() ;
40
41 virtual bool open(const std::string& filename, const casa::Record& rec) ;
42 virtual void fill() ;
43 virtual void close() ;
44
45protected:
46
47
48private:
49
50 MSFiller();
51 MSFiller(const MSFiller&);
52 MSFiller& operator=(const MSFiller&);
53
54 // fill subtables
55 //void fillFrequencies() ;
56 //void fillMolecules() ;
57 void fillWeather() ;
58 void fillFocus() ;
59 //void fillHistory() ;
60 //void fillFit() ;
61 void fillTcal() ;
62
63 // fill ID columns
64 void fillId( casa::uInt idx, const char *colname, casa::RefRows &rows ) ;
65 void fillId( casa::Int idx, const char *colname, casa::RefRows &rows ) ;
66
67 // get SRCTYPE from STATE_ID
68 casa::Int getSrcType( casa::Int stateId ) ;
69
70 // get POLNO from CORR_TYPE
71 casa::Vector<casa::uInt> getPolNo( casa::Int corrType ) ;
72
73 // get poltype from CORR_TYPE
74 casa::String getPolType( casa::Int corrType ) ;
75
76 // get WEATHER_ID
77 casa::uInt getWeatherId( casa::uInt idx, casa::Double wtime ) ;
78
79 // get time stamp in SYSCAL table
80 // assume that tab is selected by ANTENNA_ID, FEED_ID, SPECTRAL_WINDOW_ID
81 // and sorted by TIME
82 casa::Vector<casa::Double> getSysCalTime( casa::MSSysCal &tab, casa::MEpoch::ROScalarColumn &tcol ) ;
83
84 // get tsys by time stamp
85 // assume that tab is selected by ANTENNA_ID, FEED_ID, SPECTRAL_WINDOW_ID
86 // and sorted by TIME
87 casa::uInt getTsys( casa::uInt idx, casa::Array<casa::Float> &tsys, casa::MSSysCal &tab, casa::Double t ) ;
88
89 // get TCAL_ID
90 casa::Vector<casa::uInt> getTcalId( casa::Int feedId, casa::Int spwId, casa::Double t ) ;
91
92 // get direction for DIRECTION, AZIMUTH, and ELEVATION columns
93 casa::uInt getDirection( casa::uInt idx, casa::Vector<casa::Double> &dir, casa::Vector<casa::Double> &srate, casa::String &ref, casa::ROMSPointingColumns &cols, casa::Double t ) ;
94
95 casa::CountedPtr<Scantable> table_ ;
96 casa::MeasurementSet mstable_ ;
97 casa::MeasurementSet tablesel_ ;
98 casa::Int antenna_ ;
99 casa::Bool getPt_ ;
100
101 casa::Bool isFloatData_ ;
102 casa::Bool isData_ ;
103
104 casa::Bool isDoppler_ ;
105 casa::Bool isFlagCmd_ ;
106 casa::Bool isFreqOffset_ ;
107 casa::Bool isHistory_ ;
108 casa::Bool isProcessor_ ;
109 casa::Bool isSysCal_ ;
110 casa::Bool isWeather_ ;
111
112 casa::LogIO os_ ;
113
114 casa::Vector<casa::Double> mwTime_ ;
115 casa::Vector<casa::Double> mwInterval_ ;
116
117 casa::Record tcalrec_ ;
118};
119
120
121};
122#endif
Note: See TracBrowser for help on using the repository browser.