8 #define OFILE_NAME "L1H1V1_EarthSkyMask_2DetMask_FxThr_0d02.txt"
26 for (
int l=0;
l<
L;
l++) {
44 for (
int l=0;
l<
L;
l++)
if(sm.
get(
l)==1) n++;
45 cout << 100*(double)n/(
double)L << endl;
54 if (!out.good()) {cout <<
"Error Opening File : " <<
OFILE_NAME << endl;
exit(1);}
55 for (
int l=0;
l<
L;
l++) out <<
l <<
" " << sm.
get(
l) << endl;
58 bool*
mask =
new bool[
L];
60 for (
int l=0;
l<
L;
l++) sm.
set(
l,(
double)mask[
l]);
84 if(!strlen(file))
return 0;
86 if( (in=fopen(file,
"r"))==NULL )
return 0;
88 while(fgets(str,1024,in) != NULL){
90 if(str[0] ==
'#')
continue;
91 if((pc = strtok(str,
" \t")) == NULL)
continue;
93 if((pc = strtok((
char*)NULL,
" \t")) == NULL)
continue;
94 if(pc && i>=0 && i<
int(L)) {
95 skyHole.
data[
i] = atof(pc);
101 skyHole *= a>0. ? 1./a : 0.;
102 if(f==0.) { skyHole = 1.;
return n; }
104 double* p = skyHole.
data;
105 double** pp = (
double **)malloc(L*
sizeof(
double*));
106 for(l=0; l<
L; l++) pp[l] = p + l;
113 *pp[
l] = a/L<f ? 0. : 1.;
115 if(*pp[l] == 0.) mask[pp[
l]-p]=
false;
else mask[pp[
l]-p]=
true;
virtual size_t size() const
size_t add(detector *)
param: detector structure return number of detectors in the network
wavearray< double > a(hp.size())
size_t setSkyMask(double, char *, bool *, int)
cout<< "skymap size : "<< L<< endl;for(int l=0;l< L;l++) sm.set(l, l);sm > const_cast< char * >("skymap.dat")
double getTheta(size_t i)
void Draw(int dpaletteId=0, Option_t *option="colfz")
virtual double mean() const
detector V1((char *)"V1")
virtual void waveSort(DataType_t **pp, size_t l=0, size_t r=0) const
double GetAntennaPattern(double phi, double theta, double psi=0., int polarization=1)
void set(size_t i, double a)
param: sky index param: value to set
detector H1((char *)"H1")
double get(size_t i)
param: sky index
#define REJECTED_SKY_PIXEL_PERCENTAGE