31 #include "TPolyLine.h" 34 #include "TObjString.h" 35 #include "TObjArray.h" 40 #include "TPaveText.h" 42 #include "TRotation.h" 43 #include "TPolyLine.h" 44 #include "Math/Rotation3D.h" 45 #include "Math/Vector3Dfwd.h" 63 #define WorlMapCoastLine "WorlMapCoastLine.txt" 64 #define WM_ENTRIES 426345 65 #define DUMMY_PALETTE_ID 1000000000 67 #define GSKYMAP_INIT canvas(NULL), h2(NULL), changed(false), isGridx(true), colorGridx(kBlack), \ 68 isGridy(true), colorGridy(kBlack), isLogz(false), title(""), \ 69 drawWorldMap(false), goff(0), wm_size(0), paletteId(1), gpsGalacticDisk(-1.), \ 70 colorGalacticDisk(kBlack), zAxisTitle("") 81 gskymap(
double sms,
double t1=0.,
double t2=180.,
double p1=0.,
double p2=360.) :
116 h2 =
new TH2D(*sm.
h2);
131 double resolution = 1,
bool goff =
false);
133 char sname[64];
sprintf(sname,
"%s-%d",name,
int(gRandom->Rndm(13)*1.e9));
134 this->name=sname;this->wtopx=wtopx;this->wtopy=wtopy;this->ww=
ww;this->wh=wh;
140 void SetGridx(
bool isGridx=
true) {this->isGridx=isGridx;}
142 void SetGridxColor(Color_t colorGridx = kBlack) {this->colorGridx=colorGridx;}
144 void SetGridy(
bool isGridy=
true) {this->isGridy=isGridy;}
146 void SetGridyColor(Color_t colorGridy = kBlack) {this->colorGridy=colorGridy;}
148 void SetLogz(
bool isLogz=
true) {this->isLogz=isLogz;}
154 void SetWorldMap(
bool drawWorldMap=
true) {this->drawWorldMap=drawWorldMap;}
159 void SetPalette(
int paletteId=kBird) {this->paletteId=paletteId;}
163 void SetGalacticDisk(
double gpsGalacticDisk=0.0) {this->gpsGalacticDisk=gpsGalacticDisk;}
168 void FillData(
int size,
double*
phi,
double*
theta,
double* binc);
169 void FillData(
char*
fname);
172 void Draw(
int dpaletteId = 1, Option_t* option =
"colfz");
175 void ProjectHammer(Double_t
l,Double_t b,Double_t &Al,Double_t &Ab);
176 void ProjectSinusoidal(Double_t l, Double_t b, Double_t &Al, Double_t &Ab);
177 void ProjectParabolic(Double_t l, Double_t b, Double_t &Al, Double_t &Ab);
179 void DrawMarker(
double phi,
double theta,
int marker, Size_t msize = 1, Color_t tcolor = 1);
180 void DrawText(
double phi,
double theta,
TString text,
double tsize = 0.04, Color_t tcolor = 1);
182 void DrawMarker(
double ra,
double dec,
double gps,
int marker, Size_t msize = 1, Color_t tcolor = 1);
183 void DrawText(
double ra,
double dec,
double gps,
TString text,
double tsize = 0.04, Color_t tcolor = 1);
187 void ClearAxisLabel();
188 void ClearGalacticDisk();
189 void ClearWorldMap();
194 void DumpSkyMap(
char* fname);
197 void DumpObject(
const char* file,
const char*
name=
"gskymap");
205 void SetPlotStyle(
int paletteId = 1);
206 int ReadWorlMapCoastLine(
double*& wm_lon,
double*& wm_lat);
207 void HeapSort(
double* data,
double lenght);
208 void ReverseXAxis(TH2D *h2);
237 Int_t wtopx, wtopy,
ww, wh;
241 std::vector<TPolyLine*>
gdL;
242 std::vector<TMarker*>
wmM;
TGraphErrors * Plot(int mtype, TString ptitle, TString xtitle, TString ytitle, bool save=true)
virtual void Browse(TBrowser *b)
TString GetWorldMapPath()
std::vector< TPolyLine * > gdL
std::vector< TPolyLine * > gridxL
wavearray< double > a(hp.size())
skymap & operator-=(const skymap &)
bool GetGalacticDiskColor()
void SetGridx(bool isGridx=true)
skymap & operator*=(const skymap &)
void SetOptions(const char *name, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
void SetGridxColor(Color_t colorGridx=kBlack)
watplot p2(const_cast< char *>("TFMap2"))
void SetGridy(bool isGridy=true)
skymap & operator+=(const skymap &)
gSM SetOptions(cwb_antpat_projection, COORDINATES, RESOLUTION/2)
iNET LoadObject(const_cast< char *>(ROOT_FILE))
void SetGalacticDiskColor(Color_t colorGalacticDisk=kBlack)
watplot p1(const_cast< char *>("TFMap1"))
std::vector< TText * > axisT
void SetWorldMapPath(TString worldMapPath)
void SetGalacticDisk(double gpsGalacticDisk=0.0)
void SetGridyColor(Color_t colorGridy=kBlack)
void SetTitle(TString title)
void SetWorldMap(bool drawWorldMap=true)
skymap & operator=(const skymap &)
void SetLogz(bool isLogz=true)
void HeapSort(double *data, double length)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
void set(size_t i, double a)
param: sky index param: value to set
Color_t colorGalacticDisk
std::vector< TPolyLine * > gridyL
std::vector< TMarker * > wmM
void SetPalette(int paletteId=kBird)
skymap & operator/=(const skymap &)
void SetZaxisTitle(TString zAxisTitle)