source: trunk/src/STGrid.h@ 2363

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

New Development: No

JIRA Issue: Yes CAS-2816

Ready for Test: No

Interface Changes: Yes

What Interface Changed: Added method to specify IFNO to be processed

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Added method to specify IFNO to be processed.


File size: 2.9 KB
Line 
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#include <vector>
19
20#include <casa/BasicSL/String.h>
21#include <casa/Arrays/Vector.h>
22#include <casa/Arrays/Matrix.h>
23#include <casa/Arrays/Cube.h>
24// #include <casa/Arrays/ArrayMath.h>
25// #include <casa/Inputs/Input.h>
26// #include <casa/Quanta/Quantum.h>
27// #include <casa/Quanta/QuantumHolder.h>
28// #include <casa/Utilities/CountedPtr.h>
29
30#include <tables/Tables/Table.h>
31// #include <tables/Tables/ScalarColumn.h>
32// #include <tables/Tables/ArrayColumn.h>
33
34// #include <measures/Measures/MDirection.h>
35
36// #include "Scantable.h"
37
38using namespace std ;
39using namespace casa ;
40
41namespace asap {
42class STGrid
43{
44public:
45 STGrid() ;
46 STGrid( const string infile ) ;
47 virtual ~STGrid() {} ;
48
49 void setFileIn( const string infile ) ;
50
51 void setIF( unsigned int ifno ) { ifno_ = ifno ; } ;
52
53 void setPolList( vector<unsigned int> pols ) ;
54
55 void defineImage( int nx=-1,
56 int ny=-1,
57 string scellx="",
58 string scelly="",
59 string scenter="" ) ;
60 void setOption( string convtype="box",
61 int convsupport=-1 ) ;
62
63 void setWeight( const string wType="uniform" ) ;
64
65 void grid() ;
66
67 string saveData( string outfile="" ) ;
68
69private:
70 void init() ;
71
72 void setupGrid( Int &nx,
73 Int &ny,
74 String &cellx,
75 String &celly,
76 Double &xmin,
77 Double &xmax,
78 Double &ymin,
79 Double &ymax,
80 String &center ) ;
81
82 void getData( Cube<Float> &spectra,
83 Matrix<Double> &direction,
84 Cube<uChar> &flagtra,
85 Matrix<uInt> &rflag,
86 Matrix<Float> &weight ) ;
87
88 void getWeight( Matrix<Float> &w,
89 Cube<Float> &tsys,
90 Matrix<Double> &tint ) ;
91
92 void toInt( Array<uChar> *u, Array<Int> *v ) ;
93 void toInt( Array<uInt> *u, Array<Int> *v ) ;
94
95 void toPixel( Matrix<Double> &world, Matrix<Double> &pixel ) ;
96
97 void boxFunc( Vector<Float> &convFunc, Int &convSize ) ;
98 void spheroidalFunc( Vector<Float> &convFunc ) ;
99 void gaussFunc( Vector<Float> &convFunc ) ;
100 void pbFunc( Vector<Float> &convFunc ) ;
101 void setConvFunc( Vector<Float> &convFunc ) ;
102 void selectData( Table &tab ) ;
103
104 String infile_ ;
105 Int ifno_ ;
106 Int nx_ ;
107 Int ny_ ;
108 Int npol_ ;
109 Int nchan_ ;
110 Int nrow_ ;
111 Double cellx_ ;
112 Double celly_ ;
113 Vector<Double> center_ ;
114 String convType_ ;
115 Int convSupport_ ;
116 Int userSupport_ ;
117 Int convSampling_ ;
118 Array<Float> data_ ;
119 Vector<uInt> pollist_ ;
120 String wtype_ ;
121
122 Table tab_ ;
123};
124}
125#endif
Note: See TracBrowser for help on using the repository browser.