21 #include "TPaletteAxis.h" 105 coordinate.ToUpper();
107 if (resolution<=0) {cout <<
"gskymap::gskymap: Error sky resolution must be >0" << endl;
exit(1);}
109 if(gSystem->Getenv(
"CWB_GWAT")!=NULL) {
110 worldMapPath=
TString(gSystem->Getenv(
"CWB_GWAT"))+
"/data";
117 char sname[64];
sprintf(sname,
"gskymap_%d",
int(gRandom->Rndm(13)*1.e9));
119 this->projection = projection;
120 this->coordinate = coordinate;
121 this->resolution = resolution;
124 wtopx=35; wtopy=46;
ww=817; wh=472;
130 if (coordinate.CompareTo(
"CWB")==0) {phMin=0;phMax=360;thMin=0;thMax=180;}
131 if (coordinate.CompareTo(
"CELESTIAL")==0) {phMin=0;phMax=360;thMin=-90;thMax=90;}
133 if(h2!=NULL)
delete h2;
135 h2 =
new TH2D(nameh,
"gskymap",
int(360*resolution), phMin, phMax,
int(180*resolution), thMin, thMax);
136 h2->SetStats(kFALSE);
137 h2->SetTitleFont(12);
139 h2->SetFillColor(kWhite);
141 h2->GetXaxis()->SetNdivisions(-604);
142 h2->GetXaxis()->SetLabelFont(42);
143 h2->GetXaxis()->SetLabelOffset(0.014);
144 h2->GetXaxis()->SetTitleOffset(1.2);
145 h2->GetYaxis()->SetTitleOffset(0.8);
146 h2->GetYaxis()->SetNdivisions(-602);
147 h2->GetYaxis()->SetLabelFont(42);
148 h2->GetYaxis()->SetLabelOffset(0.01);
149 h2->GetZaxis()->SetLabelFont(42);
150 h2->GetZaxis()->SetNoExponent(
false);
152 h2->GetXaxis()->SetTitleFont(42);
153 if ((coordinate.CompareTo(
"CWB")==0)||(coordinate.CompareTo(
"GEOGRAPHIC")==0)) {
154 h2->GetXaxis()->SetTitle(
"#phi (deg)");
155 }
else if (coordinate.CompareTo(
"CELESTIAL")==0) {
156 h2->GetXaxis()->SetTitle(
"RA (deg)");
158 {cout <<
"gskymap::gskymap: Error : coordinate system not declared" << endl;
exit(1);}
160 h2->GetXaxis()->CenterTitle(
true);
162 h2->GetYaxis()->SetTitleFont(42);
163 if ((coordinate.CompareTo(
"CWB")==0)||(coordinate.CompareTo(
"GEOGRAPHIC")==0)) {
164 h2->GetYaxis()->SetTitle(
"#theta (deg)");
165 }
else if (coordinate.CompareTo(
"CELESTIAL")==0) {
166 h2->GetYaxis()->SetTitle(
"DEC (deg)");
168 {cout <<
"gskymap::gskymap: Error : coordinate system not declared" << endl;
exit(1);}
170 h2->GetYaxis()->CenterTitle(
true);
172 h2->GetZaxis()->SetTitleOffset(0.6);
173 h2->GetZaxis()->SetTitleFont(42);
174 h2->GetZaxis()->SetTitle(zAxisTitle);
175 h2->GetZaxis()->CenterTitle(
true);
177 if(this->
size()) FillData();
192 canvas =
new TCanvas(namec,
"gskymap", wtopx, wtopy,
ww, wh);
194 canvas->ToggleEventStatus();
195 canvas->SetGridx(
false);
196 canvas->SetGridy(
false);
197 canvas->SetLogz(isLogz);
198 canvas->SetFillColor(kWhite);
199 canvas->SetLeftMargin(0.08);
200 canvas->SetBottomMargin(0.13);
201 canvas->SetBorderMode(0);
209 gStyle->SetFrameBorderMode(0);
212 gStyle->SetTitleH(0.050);
213 gStyle->SetTitleW(0.95);
214 gStyle->SetTitleY(0.98);
215 gStyle->SetTitleFont(12,
"D");
216 gStyle->SetTitleColor(kBlue,
"D");
217 gStyle->SetTextFont(12);
218 gStyle->SetTitleFillColor(kWhite);
219 gStyle->SetLineColor(kWhite);
220 gStyle->SetNumberContours(256);
221 gStyle->SetMarkerStyle(7);
222 gStyle->SetMarkerSize(2);
223 gStyle->SetCanvasColor(kWhite);
224 gStyle->SetStatBorderSize(1);
228 gskymap::~gskymap() {
233 if(h2!=NULL)
delete h2;
236 if (wm_size)
delete [] wm_lon;
237 if (wm_size)
delete [] wm_lat;
271 if (!in.good()) {cout <<
"gskymap::FillData: Error Opening File : " << fname << endl;
exit(1);}
273 in.getline(iline,1024);
274 in.getline(iline,1024);
275 if(
TString(iline).Contains(
"skymap")==0)
276 {cout <<
"gskymap::FillData: " << fname <<
" is not a skymap file" << endl;
exit(1);}
277 in.getline(iline,1024);
279 TObjString* tsms = (TObjString*)tok->At(1);
280 if(tsms->GetString().IsAlpha()==1)
281 {cout <<
"gskymap::FillData: resolution is not well defined " << endl;
exit(1);}
282 double sms = tsms->GetString().Atof();
283 in.getline(iline,1024);
285 TObjString* ttheta_1 = (TObjString*)tok->At(1);
286 if(ttheta_1->GetString().IsAlpha()==1)
287 {cout <<
"gskymap::FillData: theta_1 is not well defined " << endl;
exit(1);}
288 double theta_1 = ttheta_1->GetString().Atof();
289 in.getline(iline,1024);
291 TObjString* ttheta_2 = (TObjString*)tok->At(1);
292 if(ttheta_2->GetString().IsAlpha()==1)
293 {cout <<
"gskymap::FillData: theta_2 is not well defined " << endl;
exit(1);}
294 double theta_2 = ttheta_2->GetString().Atof();
295 in.getline(iline,1024);
297 TObjString* tphi_1 = (TObjString*)tok->At(1);
298 if(tphi_1->GetString().IsAlpha()==1)
299 {cout <<
"gskymap::FillData: phi_1 is not well defined " << endl;
exit(1);}
300 double phi_1 = tphi_1->GetString().Atof();
301 in.getline(iline,1024);
303 TObjString* tphi_2 = (TObjString*)tok->At(1);
304 if(tphi_2->GetString().IsAlpha()==1)
305 {cout <<
"gskymap::FillData: phi_2 is not well defined " << endl;
exit(1);}
306 double phi_2 = tphi_2->GetString().Atof();
307 in.getline(iline,1024);
309 TObjString* tlenght = (TObjString*)tok->At(1);
310 if(tlenght->GetString().IsAlpha()==1)
311 {cout <<
"gskymap::FillData: lenght is not well defined " << endl;
exit(1);}
312 int lenght = tlenght->GetString().Atoi();
320 {cout <<
"gskymap::FillData: lenght is not consistent" << endl;
exit(1);}
324 in.getline(iline,1024);
325 if (!in.good())
break;
329 if (tok->GetEntries()==1)
continue;
331 TObjString* tindex = (TObjString*)tok->At(0);
332 TObjString* tvalue = (TObjString*)tok->At(1);
334 if (tindex->GetString().IsAlpha()==1)
335 {cout <<
"gskymap::FillData: index " << tindex->GetString().Data() <<
" is not well defined " << endl;
exit(1);}
339 int index = tindex->GetString().Atoi();
340 double value = tvalue->GetString().Atof();
342 if(index>=0&&index<L)
345 {cout <<
"gskymap::FillData: index " << index <<
" not allowed - max " << L-1 << endl;}
362 int size=
int(2*180*resolution*2*360*resolution);
364 double*
phi =
new double[
size];
366 double* binc =
new double[
size];
369 for(
int i=0;
i<2*180*resolution;
i++) {
370 for(
int j=0;
j<2*360*resolution;
j++) {
371 phi[
k]=(double)
j/(2*resolution);
372 theta[
k]=(double)
i/(2*resolution);
378 if (coordinate.CompareTo(
"GEOGRAPHIC")==0) {
381 if (coordinate.CompareTo(
"CELESTIAL")==0) {
385 FillData(k, phi, theta, binc);
406 if (coordinate.CompareTo(
"CWB")==0) {
407 if(phi[
i]<0) phi[
i]+=360.;
408 if(phi[
i]>360) phi[
i]-=360.;
409 if(theta[
i]<0) theta[
i]+=180.;
410 if(theta[
i]>180) theta[
i]-=180.;
412 if (coordinate.CompareTo(
"GEOGRAPHIC")==0) {
413 if(phi[
i]<-180) phi[
i]+=360.;
414 if(phi[
i]>180) phi[
i]-=360.;
415 if(theta[
i]<-90) theta[
i]+=180.;
416 if(theta[
i]>90) theta[
i]-=180.;
420 if (coordinate.CompareTo(
"CELESTIAL")==0) {
421 if(phi[
i]<0) phi[
i]+=360.;
422 if(phi[
i]>360) phi[
i]-=360.;
423 if(theta[
i]<-90) theta[
i]+=180.;
424 if(theta[
i]>90) theta[
i]-=180.;
427 if (projection.CompareTo(
"hammer")==0) {
428 ProjectHammer((phi[
i]-180), (theta[
i]-90), x, y);
432 if (projection.CompareTo(
"sinusoidal")==0) {
433 ProjectSinusoidal((phi[
i]-180), (theta[
i]-90), x, y);
437 if (projection.CompareTo(
"parabolic")==0) {
438 ProjectParabolic((phi[
i]-180), (theta[
i]-90), x, y);
445 h2->SetBinContent(
int(x*resolution)+1,
int(y*resolution)+1,binc[
i]);
447 if (coordinate.CompareTo(
"GEOGRAPHIC")==0) {
452 if (coordinate.CompareTo(
"CELESTIAL")==0) {
472 TGaxis::SetMaxDigits(3);
474 if(changed) {FillData();changed=
false;}
478 SetPlotStyle(paletteId);
480 gStyle->SetPalette(kBird,0);
484 SetPlotStyle(dpaletteId);
486 gStyle->SetPalette(kBird,0);
495 TPaletteAxis *
palette = (TPaletteAxis*)h2->GetListOfFunctions()->FindObject(
"palette");
497 palette->SetX1NDC(0.91);
498 palette->SetX2NDC(0.933);
499 palette->SetTitleOffset(0.92);
500 palette->GetAxis()->SetTickSize(0.01);
504 Double_t rlonait[360*4],rlatait[360*4];
512 for (kk=0;kk<=360;kk+=15){
515 for (k=0;k<180*4;k++){
519 if (projection.CompareTo(
"hammer")==0) {
520 ProjectHammer((phi-180), (theta-90), x, y);
522 if (projection.CompareTo(
"sinusoidal")==0) {
523 ProjectSinusoidal((phi-180), (theta-90), x, y);
525 if (projection.CompareTo(
"parabolic")==0) {
526 ProjectParabolic((phi-180), (theta-90), x, y);
531 if (coordinate.CompareTo(
"CWB")==0) {x+=180;y+=90;}
533 if (coordinate.CompareTo(
"CELESTIAL")==0) {x+=180;x=360-
x;}
536 double distance = klen>0 ? sqrt(pow(x-rlonait[klen-1],2)+pow(y-rlatait[klen-1],2)) : mdistance;
537 if(distance>=mdistance || k==(180*4-1)) klen++;
539 TPolyLine *pL =
new TPolyLine(klen,rlonait,rlatait);
540 pL->SetLineColor(colorGridx);
541 if(kk==0 || kk==360) pL->SetLineStyle(1);
else pL->SetLineStyle(3);
543 gridyL.push_back(pL);
551 for (kk=15;kk<180;kk+=15){
554 for (k=0;k<360*4;k++){
558 if (projection.CompareTo(
"hammer")==0) {
559 ProjectHammer((phi-180), (theta-90), x, y);
561 if (projection.CompareTo(
"sinusoidal")==0) {
562 ProjectSinusoidal((phi-180), (theta-90), x, y);
564 if (projection.CompareTo(
"parabolic")==0) {
565 ProjectParabolic((phi-180), (theta-90), x, y);
570 if (coordinate.CompareTo(
"CWB")==0) {x+=180;y+=90;}
572 if (coordinate.CompareTo(
"CELESTIAL")==0) {x+=180;x=360-
x;}
575 double distance = klen>0 ? sqrt(pow(x-rlonait[klen-1],2)+pow(y-rlatait[klen-1],2)) : mdistance;
576 if(distance>=mdistance || k==(360*4-1)) klen++;
578 TPolyLine *pL =
new TPolyLine(klen,rlonait,rlatait);
579 pL->SetLineColor(colorGridy);
580 if(kk==0 || kk==180) pL->SetLineStyle(1);
else pL->SetLineStyle(3);
582 gridxL.push_back(pL);
628 if (gpsGalacticDisk>=0.) {
631 double gphi = gpsGalacticDisk>0. ?
skymap::RA2phi(0., gpsGalacticDisk) : 0.;
636 for (
int l=0;
l<
L;
l++) {
647 for (
int l=0;
l<
L;
l++) {
651 if (projection.CompareTo(
"hammer")==0) {
654 }
else if (projection.CompareTo(
"sinusoidal")==0) {
657 }
else if (projection.CompareTo(
"parabolic")==0) {
662 if (coordinate.CompareTo(
"GEOGRAPHIC")==0)
664 if (coordinate.CompareTo(
"CWB")==0)
666 if (coordinate.CompareTo(
"CELESTIAL")==0)
670 TPolyLine *pL =
new TPolyLine(P,x.
data,y.
data);
671 pL->SetLineColor(colorGalacticDisk);
679 if (drawWorldMap && (coordinate.CompareTo(
"CELESTIAL")!=0)) {
683 wm_size = ReadWorlMapCoastLine(wm_lon, wm_lat);
685 for (
int n=0;
n<wm_size;
n++) {
687 double phi = wm_lon[
n];
689 if (coordinate.CompareTo(
"CWB")==0) {phi+=180;
if(phi>180) phi=phi-360;}
690 if (coordinate.CompareTo(
"CELESTIAL")==0) {phi+=180;
if(phi>180) phi=phi-360;phi=360-
phi;}
691 if (projection.CompareTo(
"hammer")==0) {
692 ProjectHammer(phi, theta, x, y);
694 if (projection.CompareTo(
"sinusoidal")==0) {
695 ProjectSinusoidal(phi, theta, x, y);
697 if (projection.CompareTo(
"parabolic")==0) {
698 ProjectParabolic(phi, theta, x, y);
704 if (coordinate.CompareTo(
"CELESTIAL")==0) {
CelestialToCwb(x+180,y,x,y);}
705 TMarker *mP =
new TMarker(x,y, 1);
706 mP->SetMarkerColor(kGray+1);
712 if (coordinate.CompareTo(
"CELESTIAL")==0) {
716 TGaxis::SetMaxDigits();
735 if(coordinate.CompareTo(
"GEOGRAPHIC")==0)
CwbToGeographic(phi,theta,phi,theta);
736 if(coordinate.CompareTo(
"CELESTIAL")==0)
CwbToCelestial(phi,theta,phi,theta);
737 DrawMarker(phi, theta, marker, msize, mcolor);
755 if (projection.CompareTo(
"hammer")==0) {
757 ProjectHammer(phi, theta, x, y);
759 if (projection.CompareTo(
"sinusoidal")==0) {
761 ProjectSinusoidal(phi, theta, x, y);
763 if (projection.CompareTo(
"parabolic")==0) {
765 ProjectParabolic(phi, theta, x, y);
771 TMarker *mP =
new TMarker(x,y, marker);
772 mP->SetMarkerSize(msize);
773 mP->SetMarkerColor(mcolor);
792 if(coordinate.CompareTo(
"GEOGRAPHIC")==0)
CwbToGeographic(phi,theta,phi,theta);
793 if(coordinate.CompareTo(
"CELESTIAL")==0)
CwbToCelestial(phi,theta,phi,theta);
794 DrawText(phi, theta, text, tsize, tcolor);
812 if (projection.CompareTo(
"hammer")==0) {
814 ProjectHammer(phi, theta, x, y);
816 if (projection.CompareTo(
"sinusoidal")==0) {
818 ProjectSinusoidal(phi, theta, x, y);
820 if (projection.CompareTo(
"parabolic")==0) {
822 ProjectParabolic(phi, theta, x, y);
828 TText *tP =
new TText(x,y,text);
829 tP->SetTextSize(tsize);
830 tP->SetTextColor(tcolor);
856 Double_t alpha2 = (l/2)*TMath::DegToRad();
857 Double_t
delta = b*TMath::DegToRad();
858 Double_t
r2 = TMath::Sqrt(2.);
861 Double_t denom = TMath::Sqrt(1. + cdec*
TMath::Cos(alpha2));
862 x = cdec*TMath::Sin(alpha2)*2.*r2/denom;
863 y = TMath::Sin(delta)*r2/denom;
864 x *= TMath::RadToDeg()/
f;
865 y *= TMath::RadToDeg()/
f;
886 Al = l*cos(b*TMath::DegToRad());
904 Al = l*(2.*
TMath::Cos(2*b*TMath::DegToRad()/3) - 1);
905 Ab = 180*TMath::Sin(b*TMath::DegToRad()/3);
922 const Int_t
NRGBs = 5;
923 const Int_t
NCont = 255;
925 if (
fabs(paletteId)==1) {
926 Double_t
stops[
NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
927 Double_t
red[
NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
928 Double_t
green[
NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
929 Double_t
blue[
NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
931 TColor::CreateGradientColorTable(NRGBs, stops, blue, green, red, NCont);
933 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
936 if (
fabs(paletteId)==2) {
937 Double_t
stops[
NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
938 Double_t
red[
NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
940 Double_t
green[
NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
942 Double_t
blue[
NRGBs] = { 1.00, 1.00, 0.00, 0.00, 0.00 };
944 TColor::CreateGradientColorTable(NRGBs, stops, blue, green, red, NCont);
946 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
949 if (
fabs(paletteId)==3) {
950 Double_t
stops[
NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
951 Double_t
red[
NRGBs] = { 0.00, 0.09, 0.18, 0.09, 0.00 };
952 Double_t
green[
NRGBs] = { 0.01, 0.02, 0.39, 0.68, 0.97 };
953 Double_t
blue[
NRGBs] = { 0.17, 0.39, 0.62, 0.79, 0.97 };
955 TColor::CreateGradientColorTable(NRGBs, stops, blue, green, red, NCont);
957 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
960 if (
fabs(paletteId)==4) {
961 Double_t
stops[
NRGBs] = { 0.00, 0.50, 0.75, 0.875, 1.00 };
962 Double_t
red[
NRGBs] = { 1.00, 1.00, 1.00, 1.00, 1.00 };
963 Double_t
green[
NRGBs] = { 1.00, 0.75, 0.50, 0.25, 0.00 };
964 Double_t
blue[
NRGBs] = { 0.00, 0.00, 0.00, 0.00, 0.00 };
966 TColor::CreateGradientColorTable(NRGBs, stops, blue, green, red, NCont);
968 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
971 if (
fabs(paletteId)==5) {
972 Double_t
stops[
NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
973 Double_t
red[
NRGBs] = { 1.00, 0.84, 0.61, 0.34, 0.00 };
974 Double_t
green[
NRGBs] = { 1.00, 0.84, 0.61, 0.34, 0.00 };
975 Double_t
blue[
NRGBs] = { 1.00, 0.84, 0.61, 0.34, 0.00 };
977 TColor::CreateGradientColorTable(NRGBs, stops, blue, green, red, NCont);
979 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
982 if (
fabs(paletteId)==57) {
983 Double_t
stops[9] = { 0., 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0};
984 Double_t
red[9] = { 0.2082, 0.0592, 0.0780, 0.0232, 0.1802, 0.5301, 0.8186, 0.9956, 0.9764};
985 Double_t
green[9] = { 0.1664, 0.3599, 0.5041, 0.6419, 0.7178, 0.7492, 0.7328, 0.7862, 0.9832};
986 Double_t
blue[9] = { 0.5293, 0.8684, 0.8385, 0.7914, 0.6425, 0.4662, 0.3499, 0.1968, 0.0539};
988 TColor::CreateGradientColorTable(9, stops, blue, green, red, NCont);
990 TColor::CreateGradientColorTable(9, stops, red, green, blue, NCont);
994 gStyle->SetNumberContours(NCont);
1020 if (!in.good()) {cout <<
"gskymap::ReadWorlMapCoastLine: Error Opening File : " << ifileName << endl;
exit(1);}
1025 wm_lon =
new double[
size];
1026 wm_lat =
new double[
size];
1029 in.getline(iline,1024);
1030 if (!in.good())
break;
1034 if (tok->GetEntries()==1)
continue;
1036 TObjString*
tra = (TObjString*)tok->At(0);
1037 TObjString*
tdec = (TObjString*)tok->At(1);
1039 if (tdec->GetString().IsAlpha()==1)
continue;
1042 double ra = tra->GetString().Atof();
1043 double dec = tdec->GetString().Atof();
1045 if (
fabs(dec)<0.001)
continue;
1052 cout << cnt << endl;
1056 drawWorldMap =
false;
1068 for(
int i=0;
i<(
int)axisT.size();
i++) {
if(axisT[
i])
delete axisT[
i];}
1080 for(
int i=0;
i<(
int)gdL.size();
i++) {
if(gdL[
i])
delete gdL[
i];}
1092 for(
int i=0;
i<(
int)wmM.size();
i++) {
if(wmM[
i])
delete wmM[
i];}
1104 for(
int i=0;
i<(
int)gridxL.size();
i++) {
if(gridxL[
i])
delete gridxL[
i];}
1115 for(
int i=0;
i<(
int)gridyL.size();
i++) {
if(gridyL[
i])
delete gridyL[
i];}
1129 if(
canvas==NULL) {cout <<
"gskymap::Print: Error - canvas not initialized " << endl;
exit(1);}
1131 TGaxis::SetMaxDigits(3);
1151 pname.ReplaceAll(
".PNG",
".png");
1154 TGaxis::SetMaxDigits();
1182 if((fp = fopen(fname,
"w")) == NULL) {
1183 cout <<
"netevent::DumpSkyMap() error: cannot open file " << fname <<
". \n";
1188 x = cos(this->theta_1*
PI/180.)-cos(this->theta_2*
PI/180.);
1189 x*= (this->phi_2-this->phi_1)*180/
PI/L;
1190 x = double(
int(1000*x))/1000.;
1192 fprintf(fp,
"theta_1 %f\n",this->theta_1);
1193 fprintf(fp,
"theta_2 %f\n",this->theta_2);
1194 fprintf(fp,
"phi_1 %f\n",this->phi_1);
1195 fprintf(fp,
"phi_2 %f\n",this->phi_2);
1212 for (
int i=1;
i<=h2->GetNbinsX();
i++) {
1214 double xvalue = h2->GetXaxis()->GetBinCenter(
i)+h2->GetXaxis()->GetBinWidth(
i)/2.;
1215 int nbin=
int(h2->GetNbinsX()/4.);
1217 sprintf(xlabel,
"%d",
int(360-xvalue));
1219 h2->GetXaxis()->SetBinLabel(
i,xlabel);
1220 h2->GetXaxis()->SetLabelSize(0.06);
1221 h2->GetXaxis()->LabelsOption(
"h");
1222 h2->GetXaxis()->SetNdivisions(604);
1223 h2->GetXaxis()->SetLabelFont(42);
1224 h2->GetXaxis()->SetLabelOffset(0.010);
1225 h2->GetXaxis()->SetTitleOffset(1.5);
1237 TFile* rfile =
new TFile(const_cast<char*>(file),
"RECREATE");
1238 this->
Write(const_cast<char*>(name));
1249 TFile* rfile =
new TFile(const_cast<char*>(file));
1252 cout <<
"gskymap::LoadObject : Error - input file don't contains object gskymap" << endl;
void CwbToCelestial(double ilongitude, double ilatitude, double &olongitude, double &olatitude, double gps=0)
void SetPlotStyle(int paletteId=1)
char * watversion(char c='s')
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1) *itime+ifreq;double time=itime *dT;double freq=(ifreq >0) ? ifreq *dF :dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
void DrawMarker(double phi, double theta, int marker, Size_t msize=1, Color_t tcolor=1)
void DrawText(double phi, double theta, TString text, double tsize=0.04, Color_t tcolor=1)
void Draw(int dpaletteId=1, Option_t *option="colfz")
cout<< "SNR "<< xsnr<< endl;wavearray< double > f
fprintf(stdout,"start=%f duration=%f rate=%f\, x.start(), x.size()/x.rate(), x.rate())
double RA2phi(double ph, double gps)
void ReverseXAxis(TH2D *h2)
void CelestialToCwb(double ilongitude, double ilatitude, double &olongitude, double &olatitude, double gps=0)
void ProjectParabolic(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
double fabs(const Complex &x)
void ProjectHammer(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
void LoadObject(const char *file, const char *name="gskymap")
void CwbToGeographic(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
void DumpObject(const char *file, const char *name="gskymap")
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
void GalacticToEquatorial(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
void set(size_t i, double a)
param: sky index param: value to set
void ProjectSinusoidal(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
void DumpSkyMap(char *fname)
double get(size_t i)
param: sky index
void GeographicToCwb(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
int ReadWorlMapCoastLine(double *&wm_lon, double *&wm_lat)
void Print(TString pname)
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)