8 #define GWGCCatalog "$CWB_GWAT/data/GWGCCatalog_Rev1d8.txt"
9 #define DISTANCE_THR 50 // Mpc
12 #define SGRA_NAME "SgrA*"
13 #define SGRA_DEC -29.11667
14 #define SGRA_RA 266.41667
16 #define NGC0224_NAME "M31"
17 #define NGC0224_DEC 41.2687
18 #define NGC0224_RA 10.6846
20 #define NGC0292_NAME "SMC"
21 #define NGC0292_DEC -72.8002
22 #define NGC0292_RA 13.1583
24 #define ESO056_115_NAME "LMC"
25 #define ESO056_115_DEC -69.7561
26 #define ESO056_115_RA 80.8941
28 #define COORDINATES "Geographic"
36 #define SKYMASK_FILE_NAME "SkyMaskCC_GWGC50MPC_Rev1d7_R0d4.txt"
40 #define SKYMASK_RESOLUTION 0.4
51 #define REJECTED_SKY_PIXEL_PERCENTAGE 1.0
71 #ifdef SKYMASK_FILE_NAME
78 #ifdef ADD_PHI_PADDING
80 for (
int l=0;
l<
L;
l++) {
100 #ifdef OUTPUT_PROBABILITY_SKYMAP
102 for (
int l=0;
l<
L;
l++) norm+=sm.
get(
l);
103 for (
int l=0;
l<
L;
l++) out <<
l <<
" " << sm.
get(
l)/norm << endl;
108 for (
int l=0;
l<
L;
l++) {
110 out <<
l <<
" " << mask << endl;
115 cout <<
"SkyMaskCC perc : " << perc*100 << endl;
121 sprintf(title,
"Statistics of sources in the GWGC catalog out to a %d Mpc measured distance (# %d)",
DISTANCE_THR,nGWGC);
149 char ofileName[256]=
"GWGCCatalog_Rev1d8_plot.png";
151 #ifdef SKYMASK_FILE_NAME
153 ofileLabel.ReplaceAll(
".txt",
"");
154 ofileLabel.ReplaceAll(
".",
"");
155 ofileLabel.ReplaceAll(
"/",
"");
157 cout <<
"ofileName : " << ofileName << endl;
160 cout <<
"Write : " << ofileName << endl;
161 gSM->
Print(ofileName);
174 if (!in.good()) {cout <<
"Error Opening File : " << gSystem->ExpandPathName(
GWGCCatalog) << endl;
exit(1);}
177 in.getline(iline,1024);
181 in.getline(iline,1024);
182 if (!in.good())
break;
186 TObjString* tname = (TObjString*)tok->At(1);
187 TObjString*
tra = (TObjString*)tok->At(2);
188 TObjString*
tdec = (TObjString*)tok->At(3);
189 TObjString*
tdist = (TObjString*)tok->At(14);
192 double ra = tra->GetString().Atof();
193 double dec = tdec->GetString().Atof();
194 double dist = tdist->GetString().Atof();
197 double th = -(dec-90);
198 double ph = ra*360./24.;
200 sm.
set(ind,sm.
get(ind)+1);
216 if (!in.good()) {cout <<
"Error Opening File : " << gSystem->ExpandPathName(
GWGCCatalog) << endl;
exit(1);}
219 in.getline(iline,1024);
223 in.getline(iline,1024);
224 if (!in.good())
break;
228 TObjString* tname = (TObjString*)tok->At(1);
229 TObjString*
tra = (TObjString*)tok->At(2);
230 TObjString*
tdec = (TObjString*)tok->At(3);
231 TObjString*
tdist = (TObjString*)tok->At(14);
234 double ra = tra->GetString().Atof();
235 double dec = tdec->GetString().Atof();
236 double dist = tdist->GetString().Atof();
240 double ph = ra*360./24.+180.;
252 if (name.CompareTo(
"NGC0224")==0) {
256 cout << name.Data() <<
" ra : " << ra <<
" dec : " << dec <<
" " << dist << endl;
257 cout <<
"PH : " << ph <<
" TH : " << th <<
" " << dist << endl;
262 cout <<
"nGWGC : " << nGWGC << endl;
267 double ph =
i/(double)RESOLUTION;
268 double th =
j/(double)RESOLUTION;
277 TMath::Sort(size,z,index,
true);
279 for (
int i=0;
i<
size;
i++) T[
i]=x[index[
i]];
281 for (
int i=0;
i<
size;
i++) T[
i]=y[index[
i]];
283 for (
int i=0;
i<
size;
i++) T[
i]=z[index[
i]];
287 cout <<
"size : " << size << endl;
298 TTree*
itree = (TTree *) gROOT->FindObject(
"MDC");
299 int isize = itree->GetEntries();
301 itree->Draw(
"15*2.5e-21/SimHrss:External_x:External_phi:EarthCtrGPS",
"",
"goff");
302 double* idistance = itree->GetV1();
303 double* itheta = itree->GetV2();
304 double* iphi = itree->GetV3();
306 double* igps = itree->GetV4();
311 double dist = idistance[
n];
316 th = acos(itheta[
n]);
320 ph = iphi[
n] > 0 ? iphi[
n] : 2*Pi+iphi[
n];
322 ph = sm.
phi2RA(ph, igps[n]);
325 sm.
set(ind,sm.
get(ind)+1);
340 x =
new double[
NMAX];
341 y =
new double[
NMAX];
342 z =
new double[
NMAX];
345 TTree*
itree = (TTree *) gROOT->FindObject(
"MDC");
346 int isize = itree->GetEntries();
348 itree->Draw(
"15*2.5e-21/SimHrss:External_x:External_phi:EarthCtrGPS",
"",
"goff");
349 double* idistance = itree->GetV1();
350 double* itheta = itree->GetV2();
351 double* iphi = itree->GetV3();
353 double* igps = itree->GetV4();
360 double dist = idistance[
n];
365 th = acos(itheta[
n]);
370 ph = iphi[
n] > 0 ? iphi[
n] : 2*Pi+iphi[
n];
373 ph = sm.
phi2RA(ph, igps[n]);
386 cout <<
"nGWGC : " << nGWGC << endl;
391 double ph =
i/(double)RESOLUTION;
392 double th =
j/(double)RESOLUTION;
401 TMath::Sort(size,z,index,
true);
403 for (
int i=0;
i<
size;
i++) T[
i]=x[index[
i]];
405 for (
int i=0;
i<
size;
i++) T[
i]=y[index[
i]];
407 for (
int i=0;
i<
size;
i++) T[
i]=z[index[
i]];
411 cout <<
"size : " << size << endl;
#define SKYMASK_RESOLUTION
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<< "\t layers : "<< nLAYERS<< "\t dF(hz) : "<< dF<< "\t 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)
double getTheta(size_t i)
double getPhiStep(size_t i)
int ReadGWGCCatalogToSkymap(skymap &sm)
void SetGridxColor(Color_t colorGridx=kBlack)
void Draw(int dpaletteId=0, Option_t *option="colfz")
int ReadGWGCCatalog(double *&x, double *&y, double *&z, int &nGWGC)
int ReadBRST50MPC_S6(double *&x, double *&y, double *&z, int &nGWGC)
size_t getSkyIndex(double th, double ph)
param: theta param: phi
void FillData(int size, double *phi, double *theta, double *binc)
void SetGalacticDiskColor(Color_t colorGalacticDisk=kBlack)
void SetGalacticDisk(double gpsGalacticDisk=0.0)
void SetGridyColor(Color_t colorGridy=kBlack)
int ReadBRST50MPC_S6_ToSkymask(skymap &sm)
double phi2RA(double ph, double gps)
void SetTitle(TString title)
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
double get(size_t i)
param: sky index
void Print(TString pname)
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)
void SetZaxisTitle(TString zAxisTitle)
#define SKYMASK_FILE_NAME