[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 |
|
---|
| 27 | namespace asap {
|
---|
| 28 |
|
---|
| 29 | class PlotHelper
|
---|
| 30 | {
|
---|
| 31 | public:
|
---|
| 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] | 64 | private:
|
---|
| 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
|
---|