source: trunk/external-alma/asdm2ASAP/ASDMFiller.h@ 2205

Last change on this file since 2205 was 2197, checked in by Takeshi Nakazato, 13 years ago

New Development: Yes

JIRA Issue: Yes CAS-1913

Ready for Test: 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...

Prototype program asdm2ASAP that converts ASDM into Scantable directory.
Since top-level CMakeLists.txt is not yet updated, those codes will not
be built at the moment.

File size: 2.1 KB
RevLine 
[2197]1#ifndef ASAP_ASDM_FILLER_H
2#define ASAP_ASDM_FILLER_H
3
4#include <string>
5
6#include <FillerBase.h>
7#include "ASDMReader.h"
8
9class ASDMFiller : public asap::FillerBase
10{
11public:
12 // constructor and destructor
13 ASDMFiller( casa::CountedPtr<asap::Scantable> stable ) ;
14 ~ASDMFiller() ;
15
16 // open data
17 bool open( const std::string &filename, const casa::Record &rec ) ;
18
19 // fill data
20 void fill() ;
21
22 // close data
23 void close() ;
24
25 // get reader object
26 casa::CountedPtr<ASDMReader> getReader() { return reader_ ; } ;
27
28private:
29 // fill header
30 void fillHeader() ;
31
32 // get IF key
33 casa::String getIFKey( casa::uInt ifno ) ;
34
35 // get FREQUENCIES attributes from ifrec_
36 void getFrequencyRec( casa::String key,
37 double &refpix,
38 double &refval,
39 double &incr ) ;
40
41 // set FREQUENCIES attributes to ifrec_
42 void setFrequencyRec( casa::String key,
43 double refpix,
44 double refval,
45 double incr ) ;
46
47 // reshape float array spectra to Matrix<Float>
48 casa::Matrix<casa::Float> toMatrix( float *sp,
49 unsigned int npol,
50 unsigned int nchan ) ;
51
52 // reshape 2d vector Tsys to Matrix<Float>
53 casa::Matrix<casa::Float> toMatrix( std::vector< std::vector<float> > &tsys,
54 unsigned int npol,
55 unsigned int nchan ) ;
56
57 // reshape vector<float> to Vector<Float> with appropriate length
58 casa::Vector<casa::Float> toVector( std::vector<float> &tau,
59 unsigned int npol ) ;
60
61 // create TCAL time string from MJD
62 casa::String toTcalTime( casa::Double mjd ) ;
63
64 // AZEL to J2000
65 void toJ2000( casa::Vector<casa::Double> &dir,
66 double az,
67 double el,
68 casa::Double mjd,
69 casa::Vector<casa::Double> antpos ) ;
70
71 casa::CountedPtr<ASDMReader> reader_ ;
72 casa::Int antennaId_ ;
73 casa::String antennaName_ ;
74
75 casa::Record ifrec_ ;
76
77} ;
78#endif // ASAP_ASDM_FILLER_H
Note: See TracBrowser for help on using the repository browser.