source: trunk/src/STGrid.h@ 2359

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

New Development: Yes

JIRA Issue: Yes CAS-2816

Ready for Test: No

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...

Defined new class STGrid and its python interface.
The STGrid class performs single dish gridding.
At the moment, only single polarization data is supported.


File size: 2.5 KB
RevLine 
[2356]1//
2// C++ Interface: STGrid
3//
4// Description:
5//
6//
7// Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2011
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef ASAPSTGRID_H
13#define ASAPSTGRID_H
14
15#include <iostream>
16#include <fstream>
17#include <string>
18
19#include <casa/BasicSL/String.h>
20#include <casa/Arrays/Vector.h>
21// #include <casa/Arrays/Matrix.h>
22// #include <casa/Arrays/Cube.h>
23// #include <casa/Arrays/ArrayMath.h>
24// #include <casa/Inputs/Input.h>
25// #include <casa/Quanta/Quantum.h>
26// #include <casa/Quanta/QuantumHolder.h>
27// #include <casa/Utilities/CountedPtr.h>
28
29#include <tables/Tables/Table.h>
30// #include <tables/Tables/ScalarColumn.h>
31// #include <tables/Tables/ArrayColumn.h>
32
33// #include <measures/Measures/MDirection.h>
34
35// #include "Scantable.h"
36
37using namespace std ;
38using namespace casa ;
39
40namespace asap {
41class STGrid
42{
43public:
44 STGrid() ;
45 STGrid( const string infile ) ;
46 virtual ~STGrid() {} ;
47
48 void setFileIn( const string infile ) ;
49// void setFileOut( const string outfile ) ;
50
51 void defineImage( int nx=-1,
52 int ny=-1,
53 string scellx="",
54 string scelly="",
55 string scenter="" ) ;
56 void setOption( string convtype="box",
57 int convsupport=-1 ) ;
58 void grid() ;
59
60 string saveData( string outfile="" ) ;
61
62private:
63 void init() ;
64
65 void setupGrid( Int &nx,
66 Int &ny,
67 String &cellx,
68 String &celly,
69 Double &xmin,
70 Double &xmax,
71 Double &ymin,
72 Double &ymax,
73 String &center ) ;
74
75 void getData( String &infile,
76 Matrix<Float> &spectra,
77 Matrix<Double> &direction,
78 Matrix<uChar> &flagtra,
79 Vector<uInt> &rflag ) ;
80
81 void toInt( Matrix<uChar> &u, Matrix<Int> &v ) ;
82 void toInt( Vector<uInt> &u, Vector<Int> &v ) ;
83
84 void toPixel( Matrix<Double> &world, Matrix<Double> &pixel ) ;
85
86 void boxFunc( Vector<Float> &convFunc, Int &convSize ) ;
87 void spheroidalFunc( Vector<Float> &convFunc ) ;
88 void gaussFunc( Vector<Float> &convFunc ) ;
89 void pbFunc( Vector<Float> &convFunc ) ;
90 void setConvFunc( Vector<Float> &convFunc ) ;
91
92 String infile_ ;
93 Int nx_ ;
94 Int ny_ ;
95 Double cellx_ ;
96 Double celly_ ;
97 Vector<Double> center_ ;
98 String convType_ ;
99 Int convSupport_ ;
100 Int userSupport_ ;
101 Int convSampling_ ;
102 Array<Float> data_ ;
103
104 Table tab_ ;
105};
106}
107#endif
Note: See TracBrowser for help on using the repository browser.