Commit 62d8e678 authored by Jonah Kanner's avatar Jonah Kanner 🤓
Browse files

Attempt to fix bug in cluster prior reading

git-svn-id: https://svn.ligo.caltech.edu/svn/bayeswave/tags/bwb-er7@448 c56465c9-8126-4a4f-9d7d-ac845eff4865
parent 35ef3a12
......@@ -2,8 +2,10 @@
# INCDIR = #/Users/tyson/lscsoft/master/include /opt/local/include
# LIBDIR = #/Users/tyson/lscsoft/master/lib /opt/local/lib
INCDIR = /usr/include /ldas/include /usr/include/gsl
LIBDIR = /usr/lib64 /ldas/lib
INCDIR = /home/jkanner/opt/lalsuite/include /usr/include /usr/include/gsl
LIBDIR = /home/jkanner/opt/lalsuite/lib /usr/lib64
# LIBDIR = /usr/lib64 /ldas/lib
# INCDIR = /usr/include /ldas/include /usr/include/gsl
# LIBS = lalburst lalsupport lalframe Frame lalinference lalinspiral lalpulsar lalmetaio lalsimulation metaio lal gsl fftw3 fftw3f gslcblas m
LIBS = lalsupport lalframe Frame lalinference lalinspiral lalpulsar lalmetaio lalsimulation metaio lal gsl fftw3 fftw3f gslcblas m
......@@ -16,20 +18,20 @@ OBJS = Subroutines.o BayesLine.o
all: $(OBJS) BayesWaveBurst BayesWavePost
BayesLine.o : BayesLine.c BayesLine.h
gcc $(CCFLAGS) -c BayesLine.c $($INCDIR:%=-I%)
# condor_compile gcc $(CCFLAGS) -c BayesLine.c $($INCDIR:%=-I%)
# gcc $(CCFLAGS) -c BayesLine.c $($INCDIR:%=-I%)
condor_compile gcc $(CCFLAGS) -c BayesLine.c $($INCDIR:%=-I%)
Subroutines.o : Subroutines.c BayesLine.c BayesLine.h Declarations.h Constants.h numrec.h
gcc $(CCFLAGS) -c Subroutines.c $(INCDIR:%=-I%)
# condor_compile gcc $(CCFLAGS) -c Subroutines.c $(INCDIR:%=-I%)
# gcc $(CCFLAGS) -c Subroutines.c $(INCDIR:%=-I%)
condor_compile gcc $(CCFLAGS) -c Subroutines.c $(INCDIR:%=-I%)
BayesWaveBurst: BayesWaveBurst.c Declarations.h Constants.h numrec.h $(OBJS)
gcc $(CCFLAGS) -o BayesWaveBurst BayesWaveBurst.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
# condor_compile gcc $(CCFLAGS) -o BayesWaveBurst BayesWaveBurst.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
# gcc $(CCFLAGS) -o BayesWaveBurst BayesWaveBurst.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
condor_compile gcc $(CCFLAGS) -o BayesWaveBurst BayesWaveBurst.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
BayesWavePost: BayesWavePost.c Declarations.h Constants.h numrec.h $(OBJS)
gcc $(CCFLAGS) -o BayesWavePost BayesWavePost.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
# condor_compile gcc $(CCFLAGS) -o BayesWavePost BayesWavePost.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
# gcc $(CCFLAGS) -o BayesWavePost BayesWavePost.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
condor_compile gcc $(CCFLAGS) -o BayesWavePost BayesWavePost.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
BayesWavePostPEC: BayesWavePostPEC.c Declarations.h Constants.h numrec.h $(OBJS)
condor_compile gcc $(CCFLAGS) -o BayesWavePostPEC BayesWavePostPEC.c $(OBJS) $(LIBDIR:%=-L%) $(INCDIR:%=-I%) $(LIBS:%=-l%)
......
......@@ -7146,8 +7146,7 @@ void initialize_priors(struct Data *data, struct Prior *prior, int omax)
else
{
sprintf(filename,"%s/cluster_norm_flow%i_twin%i_srate%i_Qmax%i.dat",prior->path,(int)fmin,(int)data->Twin,(in\
t)fmax*2,(int)Qmax);
sprintf(filename,"%s/cluster_norm_flow%i_twin%i_srate%i_Qmax%i.dat",prior->path,(int)fmin,(int)data->Twin,(int)fmax*2,(int)Qmax);
normFile = fopen(filename,"r");
for(i=0; i<prior->smax; i++)
......@@ -7193,15 +7192,12 @@ void initialize_priors(struct Data *data, struct Prior *prior, int omax)
}
printf(" frequency prior range [%.1f,%.1f] Hz\n\n",prior->bkgFreq[0],prior->bkgFreq[prior->bkgBins-1]);
//normalize prior
for(i=0; i<prior->bkgBins; i++)prior->bkgCnts[i]*=prior->bkgBins/norm/(prior->bkgFreq[prior->bkgBins-1]-prior->\
bkgFreq[0]);// (fmax-fmin);
fclose(bkgFile);
//normalize prior
for(i=0; i<prior->bkgBins; i++)prior->bkgCnts[i]*=prior->bkgBins/norm/(prior->bkgFreq[prior->bkgBins-1]-prior->bkgFreq[0]);// (fmax-fmin);
fclose(bkgFile);
}
}
void reset_priors(struct Data *data, struct Prior *prior)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment