source: trunk/src/PlotHelper.h@ 2718

Last change on this file since 2718 was 2717, checked in by Kana Sugimoto, 12 years ago

New Development: Yes

JIRA Issue: No

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: added a new method, set_grid(), in plothelper class.

Test Programs: test_sdplot[sdplot_gridTest]

Put in Release Notes: Yes

Module(s): asapplotter, sdplot(plottype='grid')

Description:

The method, asapplotter.plotgrid(), considers tangential projection
effects when getting grid center and extents from a scantable.
This affects behavior of plottype='grid' in sdplot task of CASA.

File size: 1.7 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
15// STL
16#include <iostream>
17#include <string>
18#include <vector>
19// casacore
20#include <casa/aips.h>
21#include <casa/Utilities/CountedPtr.h>
22#include <coordinates/Coordinates/DirectionCoordinate.h>
23
24#include "ScantableWrapper.h"
[2717]25#include "Scantable.h"
[2689]26
27namespace asap {
28
29class PlotHelper
30{
31public:
32 /**
33 * constructors and a destructor
34 **/
35 PlotHelper();
36 explicit PlotHelper( const ScantableWrapper &s);
37
38 virtual ~PlotHelper();
39 /**
40 * Set scantable for automatic resolution of grid parameter
41 **/
42 void setScantable( const ScantableWrapper &s ) ;
43
44 /**
45 * Set grid parameters for plot panel (by values in radian)
46 **/
47 void setGridParamVal(const int nx, const int ny,
48 const double cellx, const double celly,
49 const double centx, const double centy,
50 string epoch="J2000", const string projname="SIN") ;
51 /// TODO
52 /**
53 * Set grid parameters for plot panel (by quantity)
54 **/
[2717]55 void setGridParam(const int nx, const int ny,
56 const string cellx="", const string celly="",
57 string center="", const string projname="SIN") ;
[2689]58
59 /**
60 * Get Pixel position of a row
61 **/
62 vector<double> getGridPixel(const int whichrow=0);
63
[2717]64private:
65 casa::DirectionCoordinate getSTCoord(const int nx, const int ny,
66 const casa::Projection::Type ptype);
67
[2689]68 casa::DirectionCoordinate *dircoord_;
[2717]69 casa::CountedPtr<Scantable> data_p;
[2689]70
71};
72
73} // namespace
74
75#endif
Note: See TracBrowser for help on using the repository browser.