source: trunk/src/PlotHelper.h@ 3123

Last change on this file since 3123 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: 2.4 KB
Line 
1//
2// C++ Interface: PlotHelper
3//
4// Description:
5// A small helper class to handle direction coordinate in asapplotter
6//
7// Author: Kana Sugimoto <kana.sugi@nao.ac.jp>, (C) 2012
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#ifndef ASAPPLOTHELPER_H
13#define ASAPPLOTHELPER_H
14
15// ASAP
16// ScantableWrapper.h must be included first to avoid compiler warnings
17// related with _XOPEN_SOURCE
18#include "ScantableWrapper.h"
19#include "Scantable.h"
20
21// STL
22#include <iostream>
23#include <string>
24#include <vector>
25// casacore
26#include <casa/aips.h>
27#include <casa/Utilities/CountedPtr.h>
28#include <coordinates/Coordinates/DirectionCoordinate.h>
29
30namespace asap {
31
32class PlotHelper
33{
34public:
35 /**
36 * constructors and a destructor
37 **/
38 PlotHelper();
39 explicit PlotHelper( const ScantableWrapper &s);
40
41 virtual ~PlotHelper();
42 /**
43 * Set scantable
44 **/
45 void setScantable( const ScantableWrapper &s ) ;
46
47 /**
48 * Set grid parameters for plot panel (by values in radian)
49 **/
50 void setGridParamVal(const int nx, const int ny,
51 const double cellx, const double celly,
52 const double centx, const double centy,
53 string epoch="J2000", const string projname="SIN") ;
54 /// TODO
55 /**
56 * Set grid parameters for plot panel (by quantity)
57 **/
58 void setGridParam(const int nx, const int ny,
59 const string cellx="", const string celly="",
60 string center="", const string projname="SIN") ;
61
62 /**
63 * Get Pixel position of a row in the scantable
64 **/
65 vector<double> getGridPixel(const int whichrow=0);
66
67 /**
68 * Get the reference direction of grid coordinate (grid center)
69 **/
70 string getGridRef();
71
72 /**
73 * Get the cell size (>0) of the grid coordinate (in radian)
74 **/
75 vector<double> getGridCellVal();
76
77
78private:
79 /** Generate temporal coordinate from the DIRECTION column of a scantable**/
80 casacore::DirectionCoordinate getSTCoord(const int nx, const int ny,
81 const casacore::Projection::Type ptype);
82
83 /** Generation of direction coordinate **/
84 void setupCoord(const casacore::MDirection::Types mdt,
85 const casacore::Projection::Type pjt,
86 const casacore::Double centx, const casacore::Double centy,
87 const casacore::Double incx, const casacore::Double incy,
88 const casacore::Double refx, const casacore::Double refy);
89
90 casacore::DirectionCoordinate *dircoord_p;
91 casacore::CountedPtr<Scantable> data_p;
92
93};
94
95} // namespace
96
97#endif
Note: See TracBrowser for help on using the repository browser.