// // C++ Interface: STGrid // // Description: // // // Author: Takeshi Nakazato , (C) 2011 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ASAPSTGRID_H #define ASAPSTGRID_H #include #include #include #include #include #include #include #include // #include // #include // #include // #include // #include #include // #include // #include // #include // #include "Scantable.h" using namespace std ; using namespace casa ; namespace asap { class STGrid { public: STGrid() ; STGrid( const string infile ) ; virtual ~STGrid() {} ; void setFileIn( const string infile ) ; void setIF( unsigned int ifno ) { ifno_ = ifno ; } ; void setPolList( vector pols ) ; void setScanList( vector scans ) ; void defineImage( int nx=-1, int ny=-1, string scellx="", string scelly="", string scenter="" ) ; void setFunc( string convtype="box", int convsupport=-1 ) ; void setWeight( const string wType="uniform" ) ; void grid() ; string saveData( string outfile="" ) ; private: void init() ; void setupGrid( Int &nx, Int &ny, String &cellx, String &celly, Double &xmin, Double &xmax, Double &ymin, Double &ymax, String ¢er ) ; void getData( Cube &spectra, Matrix &direction, Cube &flagtra, Matrix &rflag, Matrix &weight ) ; void getWeight( Matrix &w, Cube &tsys, Matrix &tint ) ; void toInt( Array *u, Array *v ) ; void toInt( Array *u, Array *v ) ; void toPixel( Matrix &world, Matrix &pixel ) ; void boxFunc( Vector &convFunc, Int &convSize ) ; void spheroidalFunc( Vector &convFunc ) ; void gaussFunc( Vector &convFunc ) ; void pbFunc( Vector &convFunc ) ; void setConvFunc( Vector &convFunc ) ; void selectData( Table &tab ) ; String infile_ ; Int ifno_ ; Int nx_ ; Int ny_ ; Int npol_ ; Int nchan_ ; Int nrow_ ; Double cellx_ ; Double celly_ ; Vector center_ ; String convType_ ; Int convSupport_ ; Int userSupport_ ; Int convSampling_ ; Array data_ ; Vector pollist_ ; Vector scanlist_ ; String wtype_ ; Table tab_ ; }; } #endif