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

Last change on this file since 3147 was 3106, checked in by Takeshi Nakazato, 8 years ago

New Development: No

JIRA Issue: No

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


Check-in asap modifications from Jim regarding casacore namespace conversion.

File size: 3.3 KB
RevLine 
[2197]1#ifndef ASAP_ASDM_FILLER_H
2#define ASAP_ASDM_FILLER_H
3
4#include <string>
5
[2208]6#include <casa/Logging/LogSinkInterface.h>
7
[2197]8#include <FillerBase.h>
9#include "ASDMReader.h"
10
11class ASDMFiller : public asap::FillerBase
12{
13public:
14 // constructor and destructor
[3106]15 ASDMFiller( casacore::CountedPtr<asap::Scantable> stable ) ;
[2197]16 ~ASDMFiller() ;
17
18 // open data
[3106]19 bool open( const std::string &filename, const casacore::Record &rec ) ;
[2197]20
21 // fill data
22 void fill() ;
23
24 // close data
25 void close() ;
26
27 // get reader object
[3106]28 casacore::CountedPtr<ASDMReader> getReader() { return reader_ ; } ;
[2197]29
[2208]30 // set logger
[3106]31 void setLogger( casacore::CountedPtr<casacore::LogSinkInterface> &logsink ) ;
[2208]32
[2197]33private:
34 // fill header
35 void fillHeader() ;
36
37 // get IF key
[3106]38 casacore::String getIFKey( casacore::uInt ifno ) ;
[2197]39
40 // get FREQUENCIES attributes from ifrec_
[3106]41 void getFrequencyRec( casacore::String key,
[2197]42 double &refpix,
43 double &refval,
44 double &incr ) ;
45
46 // set FREQUENCIES attributes to ifrec_
[3106]47 void setFrequencyRec( casacore::String key,
[2197]48 double refpix,
49 double refval,
50 double incr ) ;
51
52 // reshape float array spectra to Matrix<Float>
[3106]53 casacore::Matrix<casacore::Float> toMatrix( float *sp,
[2197]54 unsigned int npol,
55 unsigned int nchan ) ;
56
57 // reshape 2d vector Tsys to Matrix<Float>
[3106]58 casacore::Matrix<casacore::Float> toMatrix( std::vector< std::vector<float> > &tsys,
[2197]59 unsigned int npol,
60 unsigned int nchan ) ;
61
62 // reshape vector<float> to Vector<Float> with appropriate length
[3106]63 casacore::Vector<casacore::Float> toVector( std::vector<float> &tau,
[2197]64 unsigned int npol ) ;
65
66 // create TCAL time string from MJD
[3106]67 casacore::String toTcalTime( casacore::Double mjd ) ;
[2197]68
69 // AZEL to J2000
[3106]70 void toJ2000( casacore::Vector<casacore::Double> &dir,
[2197]71 double az,
72 double el,
[3106]73 casacore::Double mjd,
74 casacore::Vector<casacore::Double> antpos ) ;
[2197]75
[2225]76 // to J2000
[3106]77 casacore::Vector<casacore::Double> toJ2000( casacore::Vector<casacore::Double> dir,
78 casacore::String dirref,
79 casacore::Double mjd,
80 casacore::Vector<casacore::Double> antpos ) ;
[2225]81
[2218]82 // get frequency frame enum value from string
[3106]83 casacore::MFrequency::Types toFrameType( std::string &s ) ;
[2218]84
[2225]85 // to LSRK
86 // utc must be UTC time in "d" (day)
87 // antpos must be ITRF value in "m"
[3106]88 casacore::Double toLSRK( casacore::Double freq,
89 casacore::String freqref,
90 casacore::Double utc,
91 casacore::Vector<casacore::Double> antpos,
92 casacore::Vector<casacore::Double> dir,
93 casacore::String dirref ) ;
[2225]94
[3106]95 casacore::CountedPtr<ASDMReader> reader_ ;
96 casacore::Int antennaId_ ;
97 casacore::String antennaName_ ;
[2197]98
[3106]99 casacore::Record ifrec_ ;
[2197]100
[3106]101 casacore::CountedPtr<casacore::LogSinkInterface> logsink_ ;
[2208]102
[3106]103 casacore::String className_ ;
104 casacore::Bool freqToLsr_ ;
[2208]105
[2197]106} ;
107#endif // ASAP_ASDM_FILLER_H
Note: See TracBrowser for help on using the repository browser.