source: trunk/src/PlotHelper.h@ 3086

Last change on this file since 3086 was 3085, checked in by Takeshi Nakazato, 9 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes

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


Reorder include files to suppress compiler warning related with _XOPEN_SOURCE redefinition.

File size: 2.3 KB
RevLine 
[2689]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
[3085]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
[2689]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 /**
[2719]43 * Set scantable
[2689]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 **/
[2717]58 void setGridParam(const int nx, const int ny,
59 const string cellx="", const string celly="",
60 string center="", const string projname="SIN") ;
[2689]61
62 /**
[2719]63 * Get Pixel position of a row in the scantable
[2689]64 **/
65 vector<double> getGridPixel(const int whichrow=0);
66
[2719]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
[2717]78private:
[2719]79 /** Generate temporal coordinate from the DIRECTION column of a scantable**/
[2717]80 casa::DirectionCoordinate getSTCoord(const int nx, const int ny,
81 const casa::Projection::Type ptype);
82
[2719]83 /** Generation of direction coordinate **/
84 void setupCoord(const casa::MDirection::Types mdt,
85 const casa::Projection::Type pjt,
86 const casa::Double centx, const casa::Double centy,
87 const casa::Double incx, const casa::Double incy,
88 const casa::Double refx, const casa::Double refy);
89
90 casa::DirectionCoordinate *dircoord_p;
[2717]91 casa::CountedPtr<Scantable> data_p;
[2689]92
93};
94
95} // namespace
96
97#endif
Note: See TracBrowser for help on using the repository browser.