30 #include <lal/LALStdio.h>
31 #include <lal/LALStdlib.h>
33 #include <lal/LALInspiral.h>
34 #include <lal/LALCache.h>
35 #include <lal/LALFrStream.h>
36 #include <lal/TimeFreqFFT.h>
37 #include <lal/LALDetectors.h>
38 #include <lal/AVFactories.h>
39 #include <lal/ResampleTimeSeries.h>
40 #include <lal/Sequence.h>
41 #include <lal/TimeSeries.h>
42 #include <lal/FrequencySeries.h>
43 #include <lal/Units.h>
45 #include <lal/StringInput.h>
46 #include <lal/VectorOps.h>
47 #include <lal/Random.h>
48 #include <lal/LALNoiseModels.h>
49 #include <lal/XLALError.h>
50 #include <lal/GenerateInspiral.h>
51 #include <lal/LIGOLwXMLRead.h>
53 #include <lal/SeqFactories.h>
54 #include <lal/DetectorSite.h>
55 #include <lal/GenerateInspiral.h>
56 #include <lal/GeneratePPNInspiral.h>
57 #include <lal/SimulateCoherentGW.h>
58 #include <lal/LIGOMetadataTables.h>
59 #include <lal/LIGOMetadataUtils.h>
60 #include <lal/LIGOMetadataInspiralUtils.h>
61 #include <lal/LIGOMetadataRingdownUtils.h>
62 #include <lal/LALInspiralBank.h>
63 #include <lal/FindChirp.h>
64 #include <lal/LALInspiralBank.h>
65 #include <lal/GenerateInspiral.h>
66 #include <lal/NRWaveInject.h>
67 #include <lal/GenerateInspRing.h>
69 #include <lal/LALInspiral.h>
70 #include <lal/LALSimulation.h>
71 #include <lal/LIGOLwXMLRead.h>
73 #include <lal/LALInference.h>
74 #include <lal/LALInferenceReadData.h>
75 #include <lal/LALInferenceLikelihood.h>
76 #include <lal/LALInferenceTemplate.h>
77 #include <lal/LALInferenceInit.h>
78 #include <lal/LALSimNoise.h>
81 #include <lal/LALInferenceBurstRoutines.h>
88 #define LALINFERENCE_DEFAULT_FLOW "20.0"
97 FILE *interpfile=NULL;
98 struct fvec *interp=NULL;
100 if(!interp) {printf(
"Unable to allocate memory buffer for reading interpolation file\n");}
101 fileLength=minLength;
104 if (interpfile==NULL){
105 printf(
"Unable to open file %s\n",
filename);
108 while(2==
fscanf(interpfile,
" %lf %lf ", &
f, &
x )){
119 fileLength+=minLength;
122 interp[
i].
f=0.0; interp[
i].
x=0.0;
126 printf(
"Read %i records from %s\n",fileLength-1,
filename);
139 if(
f<
fvec[1].
f)
return(INFINITY);
156 if(interp==NULL&&noisefunc==NULL){
157 printf(
"ERROR: Trying to calculate PSD with NULL inputs\n");
160 if(interp!=NULL && noisefunc!=NULL){
161 printf(
"ERROR: You have specified both an interpolation vector and a function to calculate the PSD\n");
175 static const LALUnit strainPerCount={0,{0,0,0,0,0,1,-1},{0,0,0,0,0,0,0}};
190 sprintf(globPattern,
"%c-*.gwf",ifo[0]);
194 if ( ! frGlobCache->
length )
196 fprintf( stderr,
"error: no frame file files found\n");
199 CHAR ifoRegExPattern[6];
202 snprintf( ifoRegExPattern,
205 fprintf(stderr,
"GlobFramesPWD : Found unseived src files:\n");
210 if ( ! frGlobCache->
length )
212 fprintf( stderr,
"error: no frame file files found after sieving\n");
217 fprintf(stderr,
"GlobFramesPWD : Sieved frames with pattern %s. Found src files:\n",ifoRegExPattern);
231 UINT4 max_tries=7,tries=0,delay=5;
235 if(
cache==NULL)
fprintf(stderr,
"readTseries ERROR: Received NULL pointer for channel %s\n",
channel);
236 for (tries=0,delay=5;tries<max_tries;tries++,delay*=2) {
241 if(stream==NULL) {
fprintf(stderr,
"readTseries ERROR: Unable to open stream from frame cache file\n"); exit(-1);}
243 for (tries=0,delay=5;tries<max_tries;tries++,delay*=2) {
248 if(
out==NULL)
fprintf(stderr,
"readTseries ERROR: unable to read channel %s at times %i - %f\nCheck the specified data duration is not too long\n",
channel,
start.gpsSeconds,
start.gpsSeconds+length);
263 *caches=*
ifos=*channels=*flows=*fhighs=*
timeslides=*asds=*psds=NULL;
266 if(!
this) {
fprintf(stderr,
"No command line arguments given!\n"); exit(1);}
268 for(
this=commandLine;
this;
this=this->next)
270 if(!strcmp(this->param,
"--ifo"))
292 sprintf(tmp,
"--%s-cache",(*
ifos)[
i]);
294 if(!
this){
fprintf(stderr,
"ERROR: Must specify a cache file for %s with --%s-cache\n",(*
ifos)[
i],(*
ifos)[
i]); exit(1);}
299 sprintf(tmp,
"--%s-channel",(*
ifos)[
i]);
304 sprintf(tmp,
"--%s-flow",(*
ifos)[
i]);
309 sprintf(tmp,
"--%s-fhigh",(*
ifos)[
i]);
314 sprintf(tmp,
"--%s-timeslide",(*
ifos)[
i]);
319 sprintf(tmp,
"--%s-asd",(*
ifos)[
i]);
324 sprintf(tmp,
"--%s-psd",(*
ifos)[
i]);
346 if(!
this) {
fprintf(stderr,
"No command line arguments given!\n"); exit(1);}
348 for(
this=commandLine;
this;
this=this->next)
350 if(!strcmp(this->param,
"--ifo"))
389 thisData=thisData->
next;
397 fprintf(stderr,
"Unable to open injection file(LALInferenceReadData) %s\n",procparam->
value);
402 event=atoi(procparam->
value);
410 else injTable=injTable->
next;
413 fprintf(stderr,
"Error, cannot find simulation id %s in injection file\n",procparam->
value);
424 if(injTable) memcpy(&GPStrig,&(injTable->
geocent_end_time),
sizeof(GPStrig));
426 fprintf(stderr,
"+++ Error: No trigger time specifed and no injection given \n");
433 const UINT4 nameLength=FILENAME_MAX+50;
437 for (
i=0;
i<Nifo;
i++) {
441 if((
int)nameLength<=snprintf(
filename, nameLength,
"%s%s-timeDataWithInjection.dat",
ppt->
value, IFOdata[
i].
name))
451 fprintf(stderr,
"Unable to open the path %s for writing time data with injection files\n",
filename);
474 fprintf(stderr,
"Unable to open the path %s for writing freq data with injection files\n",
filename);
479 REAL8 dre = creal(IFOdata[
i].freqData->data->data[
j]);
480 REAL8 dim = cimag(IFOdata[
i].freqData->data->data[
j]);
482 fprintf(
out,
"%10.10g %10.10g %10.10g\n",
f, dre, dim);
493 ----------------------------------------------\n\
494 --- Data Parameters --------------------------\n\
495 ----------------------------------------------\n\
496 Options for reading/generating data. User should specify which interferometers\n\
497 to use and their data source using the following options. The data source\n\
498 can be either a LFS cache file (generated by gw_data_find) with channel name\n\
499 (e.g. --H1-cache H1.cache --H1-channel H1:DCS-CALIB-STRAIN_C02 )\n\
500 or internally-generated gaussian noise with a given detector PSD model\n\
501 (e.g. --H1-cache LALSimAdLIGO --dataseed 1234)\n\
502 or by searching for frame files in the local directory\n\
503 (e.g. --glob-frame-data --H1-channel H1:DCS-CALIB-STRAIN_C02)\n\
505 Additional noise curves for simulated data can be specified by providing\n\
506 their PSD or ASD as a text file. See detailed options below.\n\
508 --ifo IFO1 [--ifo IFO2 ...] IFOs can be H1,L1,V1\n\
509 --IFO1-cache cache1 Cache files \n\
510 [--IFO2-cache2 cache2 ...] lal PSDs: LAL{Ad}LIGO, LALVirgo\n\
511 lalsimuation PSDs: LALSim{Ad}LIGO, LALSim{Ad}Virgo\n\
512 interpolate from file: interp:asd_file.txt\n\
513 --psdstart GPStime GPS start time of PSD estimation data\n\
514 --psdlength length Length of PSD estimation data in seconds\n\
515 --seglen length Length of segments for PSD estimation and analysis in seconds\n\
516 (--glob-frame-data) Will search for frame files containing data in the PWD.\n\
517 Filenames must begin with the IFO's 1-letter code, e.g. H-*.gwf\n\
518 (--dont-dump-extras) If given, won't save PSD and SNR files\n\
519 (--dump-geocenter-pols) If given, print out the TD/FD h_plus and h_cross polarisations\n\
520 (--trigtime GPStime) GPS time of the trigger to analyse\n\
521 (optional when using --margtime or --margtimephi)\n\
522 (--segment-start) GPS time of the start of the segment\n\
523 (optional with --trigtime,\n\
524 default: seglen-2 s before --trigtime)\n\
525 (--srate rate) Downsample data to rate in Hz (4096.0,)\n\
526 (--padding PAD [sec] Override default 0.4 seconds padding\n\
527 (--injectionsrate rate) Downsample injection signal to rate in Hz (--srate)\n\
528 (--IFO1-flow freq1 Specify lower frequency cutoff for overlap integral (20.0)\n\
529 [--IFO2-flow freq2 ...])\n\
530 (--IFO1-fhigh freq1 Specify higher frequency cutoff for overlap integral (Nyquist\n\
531 [--IFO2-fhigh freq2 ...]) freq 0.5*srate)\n\
532 (--IFO1-channel chan1 Specify channel names when reading cache files\n\
533 [--IFO2-channel chan2 ...])\n\
534 (--IFO1-asd asd1-ascii.txt Read in ASD from ascii file. This is not equivalent \n\
535 [--IFO2-asd asd2-ascii.txt ...]) to using --IFO1-cache interp:asd_file.txt since the former\n\
536 won't use the ascii ASD to generate fake noise. \n\
537 (--IFO1-psd psd1-ascii.txt Read in PSD from ascii file. This is not equivalent \n\
538 [--IFO2-psd psd2-ascii.txt ...]) to using --IFO1-cache interp:asd_file.txt since the former\n\
539 won't use the ascii PSD to generate fake noise. \n\
540 (--dataseed number) Specify random seed to use when generating data\n\
541 (--lalinspiralinjection) Enables injections via the LALInspiral package\n\
542 (--inj-fref) Reference frequency of parameters in injection XML (default 100Hz)\n\
543 (--inj-lambda1) value of lambda1 to be injected, LALSimulation only (0)\n\
544 (--inj-lambda2) value of lambda2 to be injected, LALSimulation only (0)\n\
545 (--inj-lambdaT value of lambdaT to be injected (0)\n\
546 (--inj-dlambdaT value of dlambdaT to be injected (0)\n\
547 (--inj-logp1) value of logp1 to be injected\n\
548 (--inj-gamma1) value of gamma1 to be injected\n\
549 (--inj-gamma2) value of gamma2 to be injected\n\
550 (--inj-gamma3) value of gamma3 to be injected\n\
551 (--inj-SDgamma0) value of SDgamma0 to be injected (0)\n\
552 (--inj-SDgamma1) value of SDgamma1 to be injected (0)\n\
553 (--inj-SDgamma2) value of SDgamma2 to be injected (0)\n\
554 (--inj-SDgamma3) value of SDgamma3 to be injected (0)\n\
555 (--inj-spinOrder PNorder) Specify twice the injection PN order (e.g. 5 <==> 2.5PN)\n\
556 of spin effects effects to use, only for LALSimulation\n\
557 (default: -1 <==> Use all spin effects).\n\
558 (--inj-tidalOrder PNorder) Specify twice the injection PN order (e.g. 10 <==> 5PN)\n\
559 of tidal effects to use, only for LALSimulation\n\
560 (default: -1 <==> Use all tidal effects).\n\
561 (--inj-spin-frame FRAME Specify injection spin frame: choice of total-j, orbital-l, view.\n\
562 (Default = OrbitalL).\n\
563 (--inj-numreldata FileName) Location of NR data file for the injection of NR waveforms (with NR_hdf5 in injection XML file).\n\
564 (--0noise) Sets the noise realisation to be identically zero\n\
565 (for the fake caches above only)\n\
577 REAL8 SampleRate=4096.0,SegmentLength=0;
584 UINT4 Ncache=0,Nifo=0,Nchannel=0,NfLow=0,NfHigh=0;
587 char strainname[]=
"LSC-STRAIN";
593 char **channels=NULL;
597 char **IFOnames=NULL;
598 char **fLows=NULL,**fHighs=NULL;
602 REAL8 PSDdatalength=0;
640 if(Nifo!=Ncache) {
fprintf(stderr,
"ERROR: Must specify equal number of IFOs and Cache files\n"); exit(1);}
641 if(Nchannel!=0 && Nchannel!=Nifo) {
fprintf(stderr,
"ERROR: Please specify a channel for all caches, or omit to use the defaults\n"); exit(1);}
645 NfHigh=Ntimeslides=Ncache=Nchannel=NfLow=Nifo;
654 dataseed=atoi(procparam->
value);
673 seglen=(size_t)(SegmentLength*SampleRate);
678 nSegs=(
int)floor(PSDdatalength/SegmentLength);
681 CHAR df_argument_name[262];
684 for(
i=0;
i<Nifo;
i++) {
685 IFOdata[
i].fLow=fLows?atof(fLows[
i]):defaultFLow;
686 if(fHighs) IFOdata[
i].fHigh=fHighs[
i]?atof(fHighs[
i]):(SampleRate/2.0-(1.0/SegmentLength));
687 else IFOdata[
i].fHigh=(SampleRate/2.0-(1.0/SegmentLength));
690 dof=4.0 / M_PI * nSegs;
691 sprintf(df_argument_name,
"--dof-%s",IFOdata[
i].
name);
695 IFOdata[
i].STDOF = dof;
696 XLALPrintInfo(
"Detector %s will run with %g DOF if Student's T likelihood used.\n",
697 IFOdata[
i].
name, IFOdata[
i].STDOF);
701 if(!dataOpts && !Nchannel) channels=
XLALCalloc(Nifo,
sizeof(
char *));
702 for(
i=0;
i<Nifo;
i++) {
706 if(!strcmp(IFOnames[
i],
"H1")) {
708 if(!Nchannel) sprintf((channels[
i]),
"H1:%s",strainname);
continue;}
709 if(!strcmp(IFOnames[
i],
"H2")) {
711 if(!Nchannel) sprintf((channels[
i]),
"H2:%s",strainname);
continue;}
712 if(!strcmp(IFOnames[
i],
"LLO")||!strcmp(IFOnames[
i],
"L1")) {
714 if(!Nchannel) sprintf((channels[
i]),
"L1:%s",strainname);
continue;}
715 if(!strcmp(IFOnames[
i],
"V1")||!strcmp(IFOnames[
i],
"VIRGO")) {
717 if(!Nchannel) sprintf((channels[
i]),
"V1:h_16384Hz");
continue;}
718 if(!strcmp(IFOnames[
i],
"GEO")||!strcmp(IFOnames[
i],
"G1")) {
720 if(!Nchannel) sprintf((channels[
i]),
"G1:DER_DATA_H");
continue;}
722 if(!strcmp(IFOnames[
i],
"E1")){
724 if(!Nchannel) sprintf((channels[
i]),
"E1:STRAIN");
continue;}
725 if(!strcmp(IFOnames[
i],
"E2")){
727 if(!Nchannel) sprintf((channels[
i]),
"E2:STRAIN");
continue;}
728 if(!strcmp(IFOnames[
i],
"E3")){
730 if(!Nchannel) sprintf((channels[
i]),
"E3:STRAIN");
continue;}
731 if(!strcmp(IFOnames[
i],
"K1")){
733 if(!Nchannel) sprintf((channels[
i]),
"K1:STRAIN");
continue;}
734 if(!strcmp(IFOnames[
i],
"I1")){
736 if(!Nchannel) sprintf((channels[
i]),
"I1:STRAIN");
continue;}
737 if(!strcmp(IFOnames[
i],
"A1")||!strcmp(IFOnames[
i],
"LIGOSouth")){
740 sprintf(LIGOSouthFr.
name,
"LIGO-South");
741 sprintf(LIGOSouthFr.
prefix,
"A1");
756 printf(
"Created LIGO South detector, location: %lf, %lf, %lf\n",IFOdata[
i].
detector->location[0],IFOdata[
i].detector->location[1],IFOdata[
i].detector->location[2]);
757 printf(
"Detector tensor:\n");
758 for(
int jdx=0;jdx<3;jdx++){
759 for(
j=0;
j<3;
j++) printf(
"%f ",IFOdata[
i].
detector->response[jdx][
j]);
764 fprintf(stderr,
"Unknown interferometer %s. Valid codes: H1 H2 L1 V1 GEO A1 K1 I1 E1 E2 E3 HM1 HM2 EM1 EM2\n",IFOnames[
i]); exit(-1);
768 for (
i=0;
i<Nifo;
i++){
780 fprintf(stdout,
"Using %lf seconds of padding for IFO %s \n",padding, IFOdata[
i].
name);
783 fprintf(stderr,
"Padding is negative or 2*padding is bigger than the whole segment. Consider reducing it using --padding or increase --seglen. Exiting\n");
786 IFOdata[
i].padding=padding;
795 REAL8 offset=SegmentLength-2.;
811 for(
i=0;
i<Nifo;
i++) {
816 if( (globFrames)?0:strstr(caches[
i],
"interp:")==caches[
i]){
818 char *interpfilename=&(caches[
i][7]);
819 printf(
"Looking for ASD interpolation file %s\n",interpfilename);
825 if( (globFrames)?0:(interpFlag || (!(strcmp(caches[
i],
"LALLIGO") && strcmp(caches[
i],
"LALVirgo") && strcmp(caches[
i],
"LALGEO") && strcmp(caches[
i],
"LALEGO") && strcmp(caches[
i],
"LALSimLIGO") && strcmp(caches[
i],
"LALSimAdLIGO") && strcmp(caches[
i],
"LALSimVirgo") && strcmp(caches[
i],
"LALSimAdVirgo") && strcmp(caches[
i],
"LALAdLIGO")))))
828 fprintf(stderr,
"Error: You need to specify a dataseed when generating data with --dataseed <number>.\n\
829 (--dataseed 0 uses a non-reproducible number from the system clock, and no parallel run is then possible.)\n" );
834 ifo_salt+=(
int)IFOnames[
i][0]+(
int)IFOnames[
i][1];
844 if(!strcmp(caches[
i],
"LALLIGO")) {PSD = &
LALLIGOIPsd; scalefactor=9E-46;}
845 if(!strcmp(caches[
i],
"LALVirgo")) {PSD = &
LALVIRGOPsd; scalefactor=1.0;}
846 if(!strcmp(caches[
i],
"LALGEO")) {PSD = &
LALGEOPsd; scalefactor=1E-46;}
847 if(!strcmp(caches[
i],
"LALEGO")) {PSD = &
LALEGOPsd; scalefactor=1.0;}
848 if(!strcmp(caches[
i],
"LALAdLIGO")) {PSD = &
LALAdvLIGOPsd; scalefactor = 1E-49;}
853 if(interpFlag) {PSD=NULL; scalefactor=1.0;}
854 if(PSD==NULL && !(interpFlag|| LALSimPsd)) {
fprintf(stderr,
"Error: unknown simulated PSD: %s\n",caches[
i]); exit(-1);}
857 for(
j=0;
j<IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++)
859 MetaNoiseFunc(&
status,&(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]),
j*IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF,interp,PSD);
860 IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]*=scalefactor;
868 int j_Lo = (
int) IFOdata[
i].
fLow/IFOdata[
i].freqData->deltaF;
870 for(
j=j_Lo;
j<IFOdata[
i].freqData->data->length;
j++){
871 IFOdata[
i].freqData->data->data[
j] = 0.0;
874 for(
j=j_Lo;
j<IFOdata[
i].freqData->data->length;
j++){
875 IFOdata[
i].freqData->data->data[
j] =
crect(
876 XLALNormalDeviate(datarandparam)*(0.5*sqrt(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]/IFOdata[
i].freqData->deltaF)),
877 XLALNormalDeviate(datarandparam)*(0.5*sqrt(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]/IFOdata[
i].freqData->deltaF))
881 IFOdata[
i].freqData->data->data[0] = 0;
882 const char timename[]=
"timeData";
897 if(
cache==NULL) {
fprintf(stderr,
"ERROR: Unable to import cache file \"%s\",\n XLALError: \"%s\".\n",caches[
i],
XLALErrorString(err)); exit(-1);}
901 printf(
"Looking for frames for %s in PWD\n",IFOnames[
i]);
905 if(!
cache) {
fprintf(stderr,
"ERROR: Cannot find any frame data!\n"); exit(1);}
906 if ((!((psds[
i])==NULL)) && (!((asds[
i])==NULL))) {
fprintf(stderr,
"ERROR: Cannot provide both ASD and PSD file from command line!\n"); exit(1);}
907 if (!((asds)==NULL || (asds[
i])==NULL)){
910 char *interpfilename=&(asds[
i][0]);
911 fprintf(stderr,
"Reading ASD for %s using %s\n",IFOnames[
i],interpfilename);
912 printf(
"Looking for ASD file %s for PSD interpolation\n",interpfilename);
918 for(
j=0;
j<IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++)
920 MetaNoiseFunc(&
status,&(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]),
j*IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF,interp,NULL);
923 }
else if(!((psds)==NULL || (psds[
i])==NULL)){
926 char *interpfilename=&(psds[
i][0]);
927 fprintf(stderr,
"Reading PSD for %s using %s\n",IFOnames[
i],interpfilename);
928 printf(
"Looking for PSD file %s for PSD interpolation\n",interpfilename);
934 for(
j=0;
j<IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++)
936 MetaNoiseFunc(&
status,&(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]),
j*IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF,interp,NULL);
945 fprintf(stderr,
"Estimating PSD for %s using %i segments of %i samples (%lfs)\n",IFOnames[
i],nSegs,(
int)
seglen,SegmentLength);
953 GPSstart=trueGPSstart;
954 if(!PSDtimeSeries) {
XLALPrintError(
"Error reading PSD data for %s\n",IFOnames[
i]); exit(1);}
958 fprintf(stderr,
"ERROR while estimating PSD for %s\n",IFOnames[
i]);
972 const UINT4 nameLength=256;
975 snprintf(
filename, nameLength,
"%s-BinFitLines.dat", IFOdata[
i].
name);
977 printf(
"Running PSD bin fitting... ");
979 printf(
"completed!\n");
984 double deltaF = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF;
985 int lengthF = IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
990 printf(
"Running chi-squared tests... ");
992 printf(
"completed!\n");
994 const UINT4 nameLength=256;
1001 else lines_width =
deltaF;
1003 double lines_threshold;
1006 else lines_threshold = 2*pow(10.0,-14.0);
1008 printf(
"Using chi squared threshold of %g\n",lines_threshold);
1010 snprintf(
filename, nameLength,
"%s-ChiSquaredLines.dat", IFOdata[
i].
name);
1012 for (
int k = 0;
k < lengthF; ++
k ) {
1013 if (
pvalues[
k] < lines_threshold) {
1019 snprintf(
filename, nameLength,
"%s-ChiSquaredLines-pvalues.dat", IFOdata[
i].
name);
1021 for (
int k = 0;
k < lengthF; ++
k ) {
1030 double deltaF = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF;
1031 int lengthF = IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
1036 printf(
"Running KS tests... ");
1038 printf(
"completed!\n");
1040 const UINT4 nameLength=256;
1047 else lines_width =
deltaF;
1049 double lines_threshold;
1052 else lines_threshold = 0.134558;
1054 printf(
"Using KS threshold of %g\n",lines_threshold);
1056 snprintf(
filename, nameLength,
"%s-KSLines.dat", IFOdata[
i].
name);
1058 for (
int k = 0;
k < lengthF; ++
k ) {
1059 if (
pvalues[
k] < lines_threshold) {
1065 snprintf(
filename, nameLength,
"%s-KSLines-pvalues.dat", IFOdata[
i].
name);
1067 for (
int k = 0;
k < lengthF; ++
k ) {
1076 double deltaF = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF;
1077 int lengthF = IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
1082 printf(
"Running power law tests... ");
1084 printf(
"completed!\n");
1086 const UINT4 nameLength=256;
1093 else lines_width =
deltaF;
1095 double lines_threshold;
1098 else lines_threshold = 0.7197370;
1100 printf(
"Using power law threshold of %g\n",lines_threshold);
1102 snprintf(
filename, nameLength,
"%s-PowerLawLines.dat", IFOdata[
i].
name);
1104 for (
int k = 0;
k < lengthF; ++
k ) {
1105 if (
pvalues[
k] < lines_threshold) {
1111 snprintf(
filename, nameLength,
"%s-PowerLawLines-pvalues.dat", IFOdata[
i].
name);
1113 for (
int k = 0;
k < lengthF; ++
k ) {
1122 int lengthF = IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
1127 const UINT4 nameLength=256;
1131 snprintf(
filename, nameLength,
"%s-XCorrVals.dat", IFOdata[
i].
name);
1133 printf(
"Running xcorr tests... ");
1135 printf(
"completed!\n");
1137 snprintf(
filename, nameLength,
"%s-XCorrBands.dat", IFOdata[
i].
name);
1157 segStart=truesegstart;
1158 if(Ntimeslides) IFOdata[
i].timeData->epoch=truesegstart;
1160 if(!IFOdata[
i].timeData) {
1173 for(
j=0;
j<IFOdata[
i].freqData->data->length;
j++){
1174 IFOdata[
i].freqData->data->data[
j] /= sqrt(IFOdata[
i].window->sumofsquares / IFOdata[
i].window->data->length);
1175 IFOdata[
i].windowedTimeData->data->data[
j] /= sqrt(IFOdata[
i].window->sumofsquares / IFOdata[
i].window->data->length);
1185 for(
j=0;
j<IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++)
1186 IFOdata[
i].noiseASD->
data->
data[
j]=sqrt(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]);
1188 const UINT4 nameLength=FILENAME_MAX+100;
1202 fprintf(stderr,
"Unable to open the path %s for writing PSD files\n",
filename);
1205 for (
j = 0;
j < IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++) {
1206 REAL8 f = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF*
j;
1207 REAL8 psd = IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j];
1219 snprintf(
filename, nameLength,
"%s%s-timeData.dat",
ppt->
value, IFOdata[
i].name);
1228 fprintf(stderr,
"Unable to open the path %s for writing time data files\n",
filename);
1231 for (
j = 0;
j < IFOdata[
i].timeData->data->length;
j++) {
1233 j * IFOdata[
i].timeData->deltaT;
1234 REAL8 d = IFOdata[
i].timeData->data->data[
j];
1242 snprintf(
filename, nameLength,
"%s%s-freqData.dat",
ppt->
value, IFOdata[
i].name);
1251 fprintf(stderr,
"Unable to open the path %s for writing freq data files\n",
filename);
1254 for (
j = 0;
j < IFOdata[
i].freqData->data->length;
j++) {
1255 REAL8 f = IFOdata[
i].freqData->deltaF *
j;
1256 REAL8 dre = creal(IFOdata[
i].freqData->data->data[
j]);
1257 REAL8 dim = cimag(IFOdata[
i].freqData->data->data[
j]);
1259 fprintf(
out,
"%10.10g %10.10g %10.10g\n",
f, dre, dim);
1271 fprintf(stderr,
"Unable to open the path %s for writing freq ASD files\n",
filename);
1274 for (
j = 0;
j < IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++) {
1275 REAL8 f = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF*
j;
1276 REAL8 asd = sqrt(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]);
1285 for (
i=0;
i<Nifo;
i++) IFOdata[
i].SNR=0.0;
1287 for (
i=0;
i<Nifo-1;
i++) IFOdata[
i].next=&(IFOdata[
i+1]);
1289 for(
i=0;
i<Nifo;
i++) {
1290 if(channels)
if(channels[
i])
XLALFree(channels[
i]);
1291 if(caches)
if(caches[
i])
XLALFree(caches[
i]);
1292 if(IFOnames)
if(IFOnames[
i])
XLALFree(IFOnames[
i]);
1294 if(fHighs)
if(fHighs[
i])
XLALFree(fHighs[
i]);
1305 fprintf(stderr,
"done LALInferenceSetupROQdata\n");
1337 REAL8 iHigh = (iHighDefaultCut < iHighFromFHigh ? iHighDefaultCut : iHighFromFHigh);
1338 REAL8 windowSquareSum = 0.0;
1352 REAL8 weight = 0.5*(1.0 + cos(M_PI*(
i-iLow)/iLow));
1356 windowSquareSum += weight*weight;
1357 }
else if (
i >= iHigh) {
1363 REAL8 weight = 0.5*(1.0 + cos(M_PI*(
i-iHigh)/NWind));
1367 windowSquareSum += weight*weight;
1369 windowSquareSum += 1.0;
1389 REAL8 responseScale=1.0;
1391 REAL8 SNR=0,NetworkSNR=0;
1395 FILE *rawWaveform=NULL;
1397 REAL8 bufferLength = 2048.0;
1404 REAL8 InjSampleRate=1.0/MindeltaT;
1407 char SNRpath[FILENAME_MAX+50]=
"";
1408 int flipped_masses=0;
1411 minFlow = minFlow>thisData->
fLow ? thisData->
fLow : minFlow;
1413 thisData = thisData->
next;
1425 sprintf(SNRpath,
"%s_snr.txt",
ppt->
value);
1427 sprintf(SNRpath,
"snr.txt");
1435 injEvent = injTable;
1436 injEvent->
next = NULL;
1441 printf(
"Injecting approximant %i: %s\n", injapprox, injTable->
waveform);
1448 InjectFD(IFOdata, injTable, commandLine);
1463 fprintf(stderr,
"WARNING: NINJA2 injections only work with 16384 Hz sampling rates. Generating injection in %s at this rate, then downsample to the run's sampling rate.\n", thisData->
name);
1464 InjSampleRate = 16384;
1467 memset(&det,0,
sizeof(det));
1481 bufferN = (
UINT4) (bufferLength*InjSampleRate);
1486 &bufferStart, 0.0, 1.0/InjSampleRate,
1510 printf(
"Using LALInspiral for injection\n");
1521 ppnParams.
deltaT = 1.0/InjSampleRate;
1523 ppnParams.
ppn = NULL;
1524 unsigned lengthTest = 0;
1534 lengthTest =
waveform.phi->data->length;
1540 fprintf(stderr,
"The waveform injected is %f seconds long. Consider increasing the %f seconds segment length (--seglen) to be greater than %f. (in %s, line %d)\n",ppnParams.
tc , thisData->
timeData->
data->
length * thisData->
timeData->
deltaT, ppnParams.
tc + 2.0*padding + 2.0, __FILE__, __LINE__);
1542 if(ppnParams.
tc>bufferLength){
1543 fprintf(stderr,
"ERROR: The waveform injected is %f seconds long and the buffer for FindChirpInjectSignal is %f seconds long. The end of the waveform will be cut ! (in %s, line %d)\n",ppnParams.
tc , bufferLength, __FILE__, __LINE__);
1554 printf(
"Using LALSimulation for injection\n");
1585 fprintf(stdout,
"Flipping lambdas since masses are flipped\n");
1596 REAL8 dLambdaT = 0.;
1605 fprintf(stdout,
"Injection lambdaT set to %f\n",lambdaT);
1606 fprintf(stdout,
"Injection dLambdaT set to %f\n",dLambdaT);
1623 fprintf(stdout,
"Injection logp1 set to %f\n",logp1);
1624 fprintf(stdout,
"Injection gamma1 set to %f\n",gamma1);
1625 fprintf(stdout,
"Injection gamma2 set to %f\n",gamma2);
1626 fprintf(stdout,
"Injection gamma3 set to %f\n",gamma3);
1651 REAL8 gamma[]={SDgamma0,SDgamma1,SDgamma2,SDgamma3};
1653 fprintf(stdout,
"Injection SDgamma0 set to %lf\n",SDgamma0);
1654 fprintf(stdout,
"Injection SDgamma1 set to %lf\n",SDgamma1);
1655 fprintf(stdout,
"Injection SDgamma2 set to %lf\n",SDgamma2);
1656 fprintf(stdout,
"Injection SDgamma3 set to %lf\n",SDgamma3);
1789 fprintf(stdout,
"Injection will run using Approximant %i (%s), phase order %i, amp order %i, spin order %i, tidal order %i, in the time domain with a reference frequency of %f.\n",
approximant,
XLALSimInspiralGetStringFromApproximant(
approximant),order,
amporder,(
int)
spinO, (
int)
tideO, (
float)
fref);
1793 printf(
"Injecting with f_min = %f.\n",
f_min);
1809 if(!hplus || !hcross) {
1810 fprintf(stderr,
"Error: XLALSimInspiralChooseWaveform() failed to produce waveform.\n");
1822 fprintf(stdout,
"Dump injected TimeDomain h_plus and h_cross at geocenter (for IFO %s)\n", thisData->
name);
1825 sprintf(
filename,
"%s_TD_geocenter_pols.dat",thisData->
name);
1829 fprintf(stderr,
"Unable to open the path %s for writing injected TimeDomain h_plus and h_cross at geocenter\n",
filename);
1865 XLALPrintError(
"Unable to allocate memory for injection buffer\n");
1879 thisData->
SNR=sqrt(SNR);
1884 fprintf(stdout,
"Injected SNR in detector %s = %g\n",thisData->
name,thisData->
SNR);
1886 sprintf(
filename,
"%s_timeInjection.dat",thisData->
name);
1892 sprintf(
filename,
"%s_freqInjection.dat",thisData->
name);
1902 thisData=thisData->
next;
1908 NetworkSNR=sqrt(NetworkSNR);
1909 fprintf(stdout,
"Network SNR of event %d = %g\n",
event,NetworkSNR);
1931 fclose(rawWaveform);
1948 char SNRpath[FILENAME_MAX+50];
1950 int flipped_masses=0;
1955 sprintf(SNRpath,
"%s_snr.txt",
ppt->
value);
1957 sprintf(SNRpath,
"snr.txt");
1988 fprintf(stdout,
"Flipping lambdas since masses are flipped\n");
2000 REAL8 dLambdaT = 0.;
2006 fprintf(stdout,
"Injection lambdaT set to %f\n",lambdaT);
2007 fprintf(stdout,
"Injection dLambdaT set to %f\n",dLambdaT);
2024 fprintf(stdout,
"Injection logp1 set to %f\n",logp1);
2025 fprintf(stdout,
"Injection gamma1 set to %f\n",gamma1);
2026 fprintf(stdout,
"Injection gamma2 set to %f\n",gamma2);
2027 fprintf(stdout,
"Injection gamma3 set to %f\n",gamma3);
2052 REAL8 gamma[]={SDgamma0,SDgamma1,SDgamma2,SDgamma3};
2054 fprintf(stdout,
"Injection SDgamma0 set to %lf\n",SDgamma0);
2055 fprintf(stdout,
"Injection SDgamma1 set to %lf\n",SDgamma1);
2056 fprintf(stdout,
"Injection SDgamma2 set to %lf\n",SDgamma2);
2057 fprintf(stdout,
"Injection SDgamma3 set to %lf\n",SDgamma3);
2155 else if (!strcmp(
ppt->
value,
"orbital-l"))
2157 else if (!strcmp(
ppt->
value,
"total-j"))
2191 dataPtr=dataPtr->
next;
2195 fprintf(stdout,
"\n\n---\t\t ---\n");
2196 fprintf(stdout,
"Injection will run using Approximant %i (%s), phase order %i, amp order %i, spin order %i, tidal order %i, in the frequency domain.\n",
approximant,
XLALSimInspiralGetStringFromApproximant(
approximant),phase_order,amp_order,(
int)
spinO,(
int)
tideO);
2197 fprintf(stdout,
"---\t\t ---\n\n");
2217 XLALPrintError(
" ERROR in InjectFD(): error encountered when injecting waveform. errnum=%d\n",errnum);
2222 fprintf(stdout,
"Dump injected FreqDomain h_plus and h_cross at geocenter (for IFO %s)\n", IFOdata->
name);
2224 sprintf(
filename,
"%s_FD_geocenter_pols.dat",IFOdata->
name);
2227 fprintf(stderr,
"Unable to open the path %s for writing injected FreqDomain h_plus and h_cross\n",
filename);
2234 creal(hctilde->data->data[
j]), cimag(hctilde->data->data[
j]));
2239 REAL8 Fplus, Fcross;
2240 REAL8 plainTemplateReal, plainTemplateImag;
2241 REAL8 templateReal, templateImag;
2247 REAL8 twopit, re, im, dre, dim, newRe, newIm;
2260 while (dataPtr != NULL) {
2277 timeshift = (injtime - instant) + timedelay;
2280 dataPtr->
fPlus = Fplus;
2281 dataPtr->
fCross = Fcross;
2284 char InjFileName[320];
2285 sprintf(InjFileName,
"injection_%s.dat",dataPtr->
name);
2286 FILE *outInj=fopen(InjFileName,
"w");
2293 re = cos(twopit *
deltaF * lower);
2294 im = -sin(twopit *
deltaF * lower);
2297 double windowFactor;
2300 for (
i=lower;
i<=upper; ++
i){
2302 if (i < hptilde->
data->length) {
2303 plainTemplateReal = Fplus * creal(hptilde->
data->
data[
i])
2304 + Fcross * creal(hctilde->data->data[
i]);
2305 plainTemplateImag = Fplus * cimag(hptilde->
data->
data[
i])
2306 + Fcross * cimag(hctilde->data->data[
i]);
2308 plainTemplateReal = 0.0;
2309 plainTemplateImag = 0.0;
2315 templateReal = (plainTemplateReal*re - plainTemplateImag*im);
2316 templateImag = (plainTemplateReal*im + plainTemplateImag*re);
2319 templateReal *= ((
REAL8) windowFactor);
2320 templateImag *= ((
REAL8) windowFactor);
2323 dim = -sin(twopit*
deltaF);
2324 dre = -2.0*sin(0.5*twopit*
deltaF)*sin(0.5*twopit*
deltaF);
2325 newRe = re + re*dre - im * dim;
2326 newIm = im + re*dim + im*dre;
2336 printf(
"injected SNR %.1f in IFO %s\n",sqrt(2.0*chisquared),dataPtr->
name);
2337 NetSNR+=2.0*chisquared;
2338 dataPtr->
SNR=sqrt(2.0*chisquared);
2339 dataPtr = dataPtr->
next;
2343 printf(
"injected Network SNR %.1f \n",sqrt(NetSNR));
2358 thisData=thisData->
next;
2361 FILE * snrout = fopen(SNRpath,
"w");
2363 fprintf(stderr,
"Unable to open the path %s for writing SNR files\n",SNRpath);
2364 fprintf(stderr,
"Error code %i: %s\n",errno,strerror(errno));
2371 NetSNR+=(thisData->
SNR*thisData->
SNR);
2372 thisData=thisData->
next;
2376 fprintf(snrout,
"%4.2f\n",sqrt(NetSNR));
2394 if (
q > 1.0)
q = 1.0/
q;
2397 if (psi>=M_PI) psi -= M_PI;
2447 XLALSimInspiralTransformPrecessingWvf2PE(&thetaJN,&phiJL,&
theta1,&
theta2,&
phi12,&
chi1,&
chi2,theEventTable->
inclination,theEventTable->
spin1x,theEventTable->
spin1y,theEventTable->
spin1z, theEventTable->
spin2x, theEventTable->
spin2y, theEventTable->
spin2z,
m1,
m2,
fref,phase);
2461 REAL8 costhetajn=cos(thetaJN);
2469 char defaultname[]=
"injection_params.dat";
2481 fprintf(stderr,
"done LALInferenceSetupROQmodel\n");
2493 sprintf(fname,
"%s.injection",
ppt->
value);
2496 fname = defaultname;
2502 theEventTable = injTable;
2504 theEventTable = theEventTable->
next;
2506 theEventTable->next = NULL;
2508 theEventTable=injTable;
2509 theEventTable->
next = NULL;
2516 fprintf(stdout,
"Unable to print injection sample: No approximant/PN order set\n");
2539 REAL8 injPrior = runState->
prior(runState, injparams, model);
2545 fprintf(stderr,
"ERROR: Cannot print injection sample. Received error code %s\n",
XLALErrorString(errnum));
2550 REAL8 tmp2=injL-logZnoise;
2557 sprintf(tmpName,
"deltalogl%s",
data->name);
2564 if(!
outfile) {
fprintf(stderr,
"ERROR: Unable to open file %s for injection saving\n",fname); exit(1);}
2584 if (
m1>=
m2)
return(0);
2586 fprintf(stdout,
"Injtable has m1<m2. Flipping masses and spins in injection. Shifting phase by pi. \n");
2589 injEvent->
mass2=tmp;
2613 unsigned int n_basis_linear=0, n_basis_quadratic=0, n_samples=0, time_steps=0;
2625 fprintf(stderr,
"Unable to open injection file(LALInferenceReadData) %s\n",procparam->
value);
2630 event=atoi(procparam->
value);
2638 else injTable=injTable->
next;
2641 fprintf(stderr,
"Error, cannot find simulation id %s in injection file\n",procparam->
value);
2652 if(injTable) memcpy(&GPStrig,&(injTable->
geocent_end_time),
sizeof(GPStrig));
2654 fprintf(stderr,
">>> Error: No trigger time specifed and no injection given \n");
2664 if (tempfp == NULL){
2667 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2670 fscanf(tempfp,
"%u", &time_steps);
2671 fscanf(tempfp,
"%u", &n_basis_linear);
2672 fscanf(tempfp,
"%u", &n_basis_quadratic);
2673 fscanf(tempfp,
"%u", &n_samples);
2675 fprintf(stderr,
"loaded --roqtime_steps\n");
2682 model->
roq->trigtime = endtime;
2692 model->
roq->nodesFileLinear = fopen(
ppt->
value,
"rb");
2693 if (!(model->
roq->nodesFileLinear)) {
2696 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2699 fprintf(stderr,
"read model->roq->frequencyNodesLinear");
2701 for(
unsigned int linsize = 0; linsize < n_basis_linear; linsize++){
2702 fread(&(model->
roq->frequencyNodesLinear->data[linsize]),
sizeof(
REAL8), 1, model->
roq->nodesFileLinear);
2704 fclose(model->
roq->nodesFileLinear);
2705 model->
roq->nodesFileLinear = NULL;
2706 fprintf(stderr,
"loaded --roqnodesLinear\n");
2711 model->
roq->nodesFileQuadratic = fopen(
ppt->
value,
"rb");
2712 if (!(model->
roq->nodesFileQuadratic)) {
2715 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2719 for(
unsigned int quadsize = 0; quadsize < n_basis_quadratic; quadsize++){
2720 fread(&(model->
roq->frequencyNodesQuadratic->data[quadsize]),
sizeof(
REAL8), 1, model->
roq->nodesFileQuadratic);
2722 fclose(model->
roq->nodesFileQuadratic);
2723 model->
roq->nodesFileQuadratic = NULL;
2724 fprintf(stderr,
"loaded --roqnodesQuadratic\n");
2739 unsigned int n_basis_linear, n_basis_quadratic, n_samples, time_steps;
2750 fprintf(stderr,
"Unable to open injection file(LALInferenceReadData) %s\n",procparam->
value);
2755 event=atoi(procparam->
value);
2758 injTable=injTable->
next;
2765 injTable=injTable->
next;
2769 fprintf(stderr,
"Error, cannot find simulation id %s in injection file\n", procparam->
value);
2783 if (tempfp == NULL){
2786 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2789 fscanf(tempfp,
"%u", &time_steps);
2790 fscanf(tempfp,
"%u", &n_basis_linear);
2791 fscanf(tempfp,
"%u", &n_basis_quadratic);
2792 fscanf(tempfp,
"%u", &n_samples);
2794 fprintf(stderr,
"loaded --roqtime_steps\n");
2804 sprintf(tmp,
"--%s-roqweightsLinear", thisData->
name);
2807 thisData->
roq->weightsFileLinear = fopen(
ppt->
value,
"rb");
2808 if (thisData->
roq->weightsFileLinear == NULL){
2811 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2814 thisData->
roq->weightsLinear = (
double complex*)malloc(n_basis_linear*time_steps*(
sizeof(
double complex)));
2817 thisData->
roq->time_weights_width = 2*
dt + 2*0.045;
2818 thisData->
roq->time_step_size = thisData->
roq->time_weights_width/time_steps;
2819 thisData->
roq->n_time_steps = time_steps;
2822 fprintf(stderr,
"basis_size = %d\n", n_basis_linear);
2823 fprintf(stderr,
"time steps = %d\n", time_steps);
2825 double *tmp_real_weight = malloc(time_steps*(
sizeof(
double)));
2826 double *tmp_imag_weight = malloc(time_steps*(
sizeof(
double)));
2828 double *tmp_tcs = malloc(time_steps*(
sizeof(
double)));
2830 sprintf(tmp,
"--roq-times");
2833 FILE *tcFile = fopen(
ppt->
value,
"rb");
2834 if (tcFile == NULL) {
2837 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2841 for(
unsigned int gg=0;gg < time_steps; gg++){
2842 fread(&(tmp_tcs[gg]),
sizeof(
double), 1, tcFile);
2845 for(
unsigned int ii=0; ii<n_basis_linear;ii++){
2846 for(
unsigned int jj=0; jj<time_steps;jj++){
2847 fread(&(thisData->
roq->weightsLinear[ii*time_steps + jj]),
sizeof(
double complex), 1, thisData->
roq->weightsFileLinear);
2848 tmp_real_weight[jj] = creal(thisData->
roq->weightsLinear[ii*time_steps + jj]);
2849 tmp_imag_weight[jj] = cimag(thisData->
roq->weightsLinear[ii*time_steps + jj]);
2853 thisData->
roq->weights_linear[ii].acc_real_weight_linear = NULL;
2854 thisData->
roq->weights_linear[ii].acc_imag_weight_linear = NULL;
2856 thisData->
roq->weights_linear[ii].spline_real_weight_linear = gsl_spline_alloc (gsl_interp_cspline, time_steps);
2857 gsl_spline_init(thisData->
roq->weights_linear[ii].spline_real_weight_linear, tmp_tcs, tmp_real_weight, time_steps);
2859 thisData->
roq->weights_linear[ii].spline_imag_weight_linear = gsl_spline_alloc (gsl_interp_cspline, time_steps);
2860 gsl_spline_init(thisData->
roq->weights_linear[ii].spline_imag_weight_linear, tmp_tcs, tmp_imag_weight, time_steps);
2862 fclose(thisData->
roq->weightsFileLinear);
2863 thisData->
roq->weightsFileLinear = NULL;
2866 sprintf(tmp,
"--%s-roqweightsQuadratic", thisData->
name);
2868 thisData->
roq->weightsQuadratic = (
double*)malloc(n_basis_quadratic*
sizeof(
double));
2869 thisData->
roq->weightsFileQuadratic = fopen(
ppt->
value,
"rb");
2870 if (thisData->
roq->weightsFileQuadratic == NULL){
2873 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2876 for(
unsigned int ii=0; ii<n_basis_quadratic;ii++){
2877 fread(&(thisData->
roq->weightsQuadratic[ii]),
sizeof(
double), 1, thisData->
roq->weightsFileQuadratic);
2879 fclose(thisData->
roq->weightsFileQuadratic);
2880 thisData->
roq->weightsFileQuadratic = NULL;
2881 fprintf(stderr,
"loaded %s ROQ weights\n", thisData->
name);
2882 thisData = thisData->
next;
2909 XLALPrintError(
"ERROR: --injXML option is deprecated. Use --inj and update your scripts\n");
2913 fprintf(stdout,
"Checking if the xml table is an inspiral table... \n");
2920 event=atoi(procparam->
value);
2921 while(
q<
event) {
q++; inspiralTable=inspiralTable->
next;}
2925 while(inspiralTable)
2928 else inspiralTable=inspiralTable->
next;
2931 fprintf(stderr,
"Error, cannot find simulation id %s in injection file\n",procparam->
value);
2936 fprintf(stdout,
"You did not provide an event number with the injtable. Using event 0 which may not be what you want!!!!!\n");
2944 fprintf(stdout,
"Checking if the xml table is a burst table... \n");
2949 event=atoi(procparam->
value);
2950 while(
q<
event) {
q++; burstTable=burstTable->
next;}
2954 fprintf(stderr,
"Error, SimBurst tables do not currently support event_id tags \n");
2958 fprintf(stdout,
"You did not provide an event number with the injtable. Using event 0 which may not be what you want!!!!!\n");
2965 XLALPrintError(
"Error: No trigger time specifed and no injection given \n");
2977 char mdcname[]=
"GW";
2978 char **mdc_caches=NULL;
2979 char **mdc_channels=NULL;
2986 REAL8 prefactor =1.0;
2991 fprintf(stdout,
"Using prefactor=%f to scale the MDC injection\n",prefactor);
2997 fprintf(stderr,
"You cannot use both injfile (--inj) and MDCs (--inject_from_mdc) Exiting... \n");
3004 fprintf(stderr,
"You cannot use both injfile (--binj) and MDCs (--inject_from_mdc) Exiting... \n");
3012 UINT4 Nmdc=0,Nchannel=0;
3014 char mdc_caches_name[] =
"injcache";
3015 char mdc_channels_name[] =
"injchannel";
3016 char **IFOnames=NULL;
3019 fprintf(stderr,
"Must provide a --IFO-injcache option for each IFO if --inject_from_mdc is given\n");
3025 fprintf(stdout,
"WARNING: You did not provide the name(s) of channel(s) to use with the injection mdc. Using the default which may not be what you want!\n");
3026 mdc_channels= malloc((nIFO+1)*
sizeof(
char*));
3030 mdc_channels[
i] = malloc(512*
sizeof(
char));
3031 if(!strcmp(
data->name,
"H1")) {
3032 sprintf(mdc_channels[
i],
"H1:%s-H",mdcname);}
3033 else if(!strcmp(
data->name,
"L1")) {
3034 sprintf(mdc_channels[
i],
"L1:%s-H",mdcname); }
3035 else if(!strcmp(
data->name,
"V1")) {
3036 sprintf(mdc_channels[
i],
"V1:%s-16K",mdcname);}
3046 REAL8 SampleRate=4096.0,SegmentLength=0.0;
3055 XLALPrintError(
"Unable to allocate memory for injection buffer\n");
3091 for(
j=lower;
j<upper;
j++){
3092 windTimeData->
data->
data[
j] /= sqrt(
data->window->sumofsquares /
data->window->data->length);
3095 tmp+= prefactor*prefactor*(creal(injF ->
data->data[
j])*creal(injF ->
data->data[
j])+cimag(injF ->
data->data[
j])*cimag(injF ->
data->data[
j]))/
data->oneSidedNoisePowerSpectrum->data->data[
j];
3099 printf(
"Injected SNR %.3f in IFO %s from MDC \n",sqrt(2*tmp),
data->name);
3100 data->SNR=sqrt(2*tmp);
3105 printf(
"Injected network SNR %.3f from MDC\n",sqrt(net_snr));
3107 char SNRpath[FILENAME_MAX+100];
3110 fprintf(stderr,
"Must specify --outfile <filename.dat>\n");
3114 snprintf(SNRpath,
sizeof(SNRpath),
"%s_snr.txt",
outfile);
int XLALStrToGPS(LIGOTimeGPS *t, const char *nptr, char **endptr)
LALDetectorIndexGEO600DIFF
LALDetectorIndexKAGRADIFF
LALDetectorIndexVIRGODIFF
void LALFindChirpInjectSignals(LALStatus *status, REAL4TimeSeries *chan, SimInspiralTable *events, COMPLEX8FrequencySeries *resp)
void XLALDestroyDict(LALDict *dict)
LALDict * XLALCreateDict(void)
void REPORTSTATUS(LALStatus *status)
int XLALCheckBurstApproximantFromString(const CHAR *inString)
LALInferenceModel * LALInferenceInitCBCModel(LALInferenceRunState *state)
Initialise state variables needed for LALInferenceNest or LALInferenceMCMC to run on a CBC signal.
static REAL8 norm(const REAL8 x[3])
void InjectFD(LALInferenceIFOData *IFOdata, SimInspiralTable *inj_table, ProcessParamsTable *commandLine)
-----------— Inject in Frequency domain --------------—/
static void makeWhiteData(LALInferenceIFOData *IFOdata)
static INT4 getNamedDataOptionsByDetectors(ProcessParamsTable *commandLine, char ***ifos, char ***out, const char *name, UINT4 *N)
Parse the command line looking for options of the kind —IFO-name value Unlike the function above,...
void LALInferenceInjectInspiralSignal(LALInferenceIFOData *IFOdata, ProcessParamsTable *commandLine)
void MetaNoiseFunc(LALStatus *status, REAL8 *psd, REAL8 f, struct fvec *interp, NoiseFunc *noisefunc)
struct fvec * interpFromFile(char *filename, REAL8 squareinput)
void() NoiseFunc(LALStatus *statusPtr, REAL8 *psd, REAL8 f)
#define LALINFERENCE_DEFAULT_FLOW
int enforce_m1_larger_m2(SimInspiralTable *injEvent)
static const LALUnit strainPerCount
static void LALInferencePrintDataWithInjection(LALInferenceIFOData *IFOdata, ProcessParamsTable *commandLine)
static INT4 getDataOptionsByDetectors(ProcessParamsTable *commandLine, char ***ifos, char ***caches, char ***channels, char ***flows, char ***fhighs, char ***timeslides, char ***asds, char ***psds, UINT4 *N)
Parse the command line looking for options of the kind –ifo H1 –H1-channel H1:LDAS_STRAIN –H1-cache H...
static void PrintSNRsToFile(LALInferenceIFOData *IFOdata, char SNRpath[])
static LALCache * GlobFramesPWD(char *ifo)
static REAL8TimeSeries * readTseries(LALCache *cache, CHAR *channel, LIGOTimeGPS start, REAL8 length)
static void LALInferenceSetGPSTrigtime(LIGOTimeGPS *GPStrig, ProcessParamsTable *commandLine)
REAL8 interpolate(struct fvec *fvec, REAL8 f)
void XLALSimInjectNinjaSignals(REAL4TimeSeries *chan, const char *ifo, REAL8 dynRange, SimInspiralTable *events)
const char * XLALSimInspiralGetStringFromApproximant(Approximant approximant)
int XLALGetOrderFromString(const char *waveform)
int XLALGetApproximantFromString(const char *waveform)
REAL8 XLALSimInspiralfLow2fStart(REAL8 fLow, INT4 ampOrder, INT4 approximant)
int XLALSimInspiralImplementedFDApproximants(Approximant approximant)
int XLALSimInspiralGetFrameAxisFromString(const char *waveform)
SimBurst * XLALSimBurstTableFromLIGOLw(const char *filename)
SimInspiralTable * XLALSimInspiralTableFromLIGOLw(const char *fileName)
LALDetector * XLALCreateDetector(LALDetector *detector, const LALFrDetector *frDetector, LALDetectorType type)
const LALDetector lalCachedDetectors[LAL_NUM_DETECTORS]
void XLALComputeDetAMResponse(double *fplus, double *fcross, const REAL4 D[3][3], const double ra, const double dec, const double psi, const double gmst)
REAL8FrequencySeries * XLALCreateREAL8FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
COMPLEX8FrequencySeries * XLALCreateCOMPLEX8FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
COMPLEX16FrequencySeries * XLALCreateCOMPLEX16FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
void XLALDestroyCOMPLEX8FrequencySeries(COMPLEX8FrequencySeries *series)
void XLALDestroyCOMPLEX16FrequencySeries(COMPLEX16FrequencySeries *series)
void LALGenerateInspiral(LALStatus *status, CoherentGW *waveform, SimInspiralTable *params, PPNParamStruc *ppnParamsInputOutput)
LALCache * XLALCacheImport(const char *fname)
void XLALDestroyCache(LALCache *cache)
LALCache * XLALCacheGlob(const char *dirstr, const char *fnptrn)
int XLALCacheSieve(LALCache *cache, INT4 t0, INT4 t1, const char *srcregex, const char *dscregex, const char *urlregex)
LALCache * XLALCacheDuplicate(const LALCache *cache)
int XLALFrStreamClose(LALFrStream *stream)
LALFrStream * XLALFrStreamCacheOpen(LALCache *cache)
REAL8TimeSeries * XLALFrStreamInputREAL8TimeSeries(LALFrStream *stream, const char *chname, const LIGOTimeGPS *start, double duration, size_t lengthlimit)
void LALInferencePrintSample(FILE *fp, LALInferenceVariables *sample)
Output the sample to file *fp, in ASCII format.
int LALInferenceFprintParameterHeaders(FILE *out, LALInferenceVariables *params)
Print the parameter names to a file as a tab-separated ASCII line.
void LALInferenceAddVariable(LALInferenceVariables *vars, const char *name, const void *value, LALInferenceVariableType type, LALInferenceParamVaryType vary)
Add a variable named name to vars with initial value referenced by value.
void LALInferenceLogp1GammasMasses2Lambdas(REAL8 logp1, REAL8 gamma1, REAL8 gamma2, REAL8 gamma3, REAL8 mass1, REAL8 mass2, REAL8 *lambda1, REAL8 *lambda2)
Calculate lambda1,2(m1,2|eos(logp1,gamma1,gamma2,gamma3))
void LALInferenceRemoveVariable(LALInferenceVariables *vars, const char *name)
Remove name from vars Frees the memory for the name structure and its contents.
void LALInferenceLambdaTsEta2Lambdas(REAL8 lambdaT, REAL8 dLambdaT, REAL8 eta, REAL8 *lambda1, REAL8 *lambda2)
Convert from lambdaT, dLambdaT, and eta to lambda1 and lambda2.
void LALInferenceCopyVariables(LALInferenceVariables *origin, LALInferenceVariables *target)
Deep copy the variables from one to another LALInferenceVariables structure.
void LALInferenceSDGammasMasses2Lambdas(REAL8 gamma[], REAL8 mass1, REAL8 mass2, REAL8 *lambda1, REAL8 *lambda2, int size)
Convert from spectral parameters to lambda1, lambda2.
void LALInferenceParseCharacterOptionString(char *input, char **strings[], UINT4 *n)
parses a character string (passed as one of the options) and decomposes it into individual parameter ...
void LALInferenceSortVariablesByName(LALInferenceVariables *vars)
Sorts the variable structure by name.
ProcessParamsTable * LALInferenceGetProcParamVal(ProcessParamsTable *procparams, const char *name)
Returns the element of the process params table with "name".
void * LALInferenceGetVariable(const LALInferenceVariables *vars, const char *name)
Return a pointer to the memory the variable vars is stored in specified by name User must cast this p...
int LALInferenceCheckVariable(LALInferenceVariables *vars, const char *name)
Checks for name being present in vars returns 1(==true) or 0.
@ LALINFERENCE_PARAM_OUTPUT
A parameter that never changes, functions should respect this.
@ LALINFERENCE_PARAM_FIXED
A parameter that is cyclic, such as an angle between 0 and 2pi.
REAL8 LALInferenceNullLogLikelihood(LALInferenceIFOData *data)
Identical to LALInferenceFreqDomainNullLogLikelihood, but returns the likelihood of a null template.
void LALInferenceInjectionToVariables(SimInspiralTable *theEventTable, LALInferenceVariables *vars)
Fill the variables passed in vars with the parameters of the injection passed in event will over-writ...
LALInferenceVariables * LALInferencePrintInjectionSample(LALInferenceRunState *runState)
Function to output a sample with logL values etc for the injection, if one is made.
void LALInferenceSetupROQmodel(LALInferenceModel *model, ProcessParamsTable *commandLine)
void LALInferenceSetupROQdata(LALInferenceIFOData *IFOdata, ProcessParamsTable *commandLine)
void LALInferenceInjectFromMDC(ProcessParamsTable *commandLine, LALInferenceIFOData *IFOdata)
LALInferenceIFOData * LALInferenceReadData(ProcessParamsTable *commandLine)
Read IFO data according to command line arguments.
int LALInferenceRemoveLinesChiSquared(REAL8FrequencySeries *spectrum, const REAL8TimeSeries *tseries, UINT4 seglen, UINT4 stride, const REAL8Window *window, const REAL8FFTPlan *plan, REAL8 *pvalues)
Determine non-Gaussian frequency bins using a chi-squared test.
int LALInferenceXCorrBands(REAL8FrequencySeries *spectrum, const REAL8TimeSeries *tseries, UINT4 seglen, UINT4 stride, const REAL8Window *window, const REAL8FFTPlan *plan, REAL8 *pvalues, char *filename)
Determine correlated frequency bands using cross correlation.
int LALInferenceRemoveLinesPowerLaw(REAL8FrequencySeries *spectrum, const REAL8TimeSeries *tseries, UINT4 seglen, UINT4 stride, const REAL8Window *window, const REAL8FFTPlan *plan, REAL8 *pvalues)
Determine large amplitude frequency bins using power law fit.
int LALInferenceAverageSpectrumBinFit(REAL8FrequencySeries *spectrum, const REAL8TimeSeries *tseries, UINT4 seglen, UINT4 stride, const REAL8Window *window, const REAL8FFTPlan *plan, char *filename, LIGOTimeGPS GPStime)
Calculate PSD by fitting bins to lines.
int LALInferenceRemoveLinesKS(REAL8FrequencySeries *spectrum, const REAL8TimeSeries *tseries, UINT4 seglen, UINT4 stride, const REAL8Window *window, const REAL8FFTPlan *plan, REAL8 *pvalues)
Determine non-Gaussian frequency bins using a K-S test.
void * XLALCalloc(size_t m, size_t n)
void * XLALMalloc(size_t n)
void * XLALRealloc(void *p, size_t n)
void LALAdvLIGOPsd(LALStatus UNUSED *status, REAL8 *psd, REAL8 f)
void LALGEOPsd(LALStatus UNUSED *status, REAL8 *psd, REAL8 f)
void LALEGOPsd(LALStatus UNUSED *status, REAL8 *psd, REAL8 f)
void LALLIGOIPsd(LALStatus UNUSED *status, REAL8 *psd, REAL8 f)
void LALVIRGOPsd(LALStatus *status, REAL8 *shf, REAL8 x)
int XLALSimInspiralChooseFDWaveform(COMPLEX16FrequencySeries **hptilde, COMPLEX16FrequencySeries **hctilde, const REAL8 m1, const REAL8 m2, const REAL8 S1x, const REAL8 S1y, const REAL8 S1z, const REAL8 S2x, const REAL8 S2y, const REAL8 S2z, const REAL8 distance, const REAL8 inclination, const REAL8 phiRef, const REAL8 longAscNodes, const REAL8 eccentricity, const REAL8 UNUSED meanPerAno, const REAL8 deltaF, const REAL8 f_min, const REAL8 f_max, REAL8 f_ref, LALDict *params, const Approximant approximant)
int XLALSimInspiralChooseTDWaveform(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, const REAL8 m1, const REAL8 m2, const REAL8 S1x, const REAL8 S1y, const REAL8 S1z, const REAL8 S2x, const REAL8 S2y, const REAL8 S2z, const REAL8 distance, const REAL8 inclination, const REAL8 phiRef, const REAL8 longAscNodes, const REAL8 eccentricity, const REAL8 UNUSED meanPerAno, const REAL8 deltaT, const REAL8 f_min, REAL8 f_ref, LALDict *params, const Approximant approximant)
#define LAL_SIM_INSPIRAL_FRAME_AXIS_DEFAULT
LAL_SIM_INSPIRAL_SPIN_ORDER_ALL
LAL_SIM_INSPIRAL_FRAME_AXIS_VIEW
LAL_SIM_INSPIRAL_FRAME_AXIS_TOTAL_J
LAL_SIM_INSPIRAL_FRAME_AXIS_ORBITAL_L
LAL_SIM_INSPIRAL_TIDAL_ORDER_ALL
int XLALSimNoisePSDaLIGODesignSensitivityT1800044(REAL8FrequencySeries *psd, double flow)
int XLALSimNoisePSD(REAL8FrequencySeries *psd, double flow, double(*psdfunc)(double))
double XLALSimNoisePSDAdvVirgo(double f)
double XLALSimNoisePSDiLIGOSRD(double f)
double XLALSimNoisePSDVirgo(double f)
REAL8TimeSeries * XLALSimDetectorStrainREAL8TimeSeries(const REAL8TimeSeries *hplus, const REAL8TimeSeries *hcross, REAL8 right_ascension, REAL8 declination, REAL8 psi, const LALDetector *detector)
int XLALSimAddInjectionREAL8TimeSeries(REAL8TimeSeries *target, REAL8TimeSeries *h, const COMPLEX16FrequencySeries *response)
char char * XLALStringDuplicate(const char *s)
REAL4 XLALNormalDeviate(RandomParams *params)
RandomParams * XLALCreateRandomParams(INT4 seed)
void XLALDestroyRandomParams(RandomParams *params)
REAL8FFTPlan * XLALCreateReverseREAL8FFTPlan(UINT4 size, int measurelvl)
REAL8FFTPlan * XLALCreateForwardREAL8FFTPlan(UINT4 size, int measurelvl)
int XLALResampleREAL4TimeSeries(REAL4TimeSeries *series, REAL8 dt)
int XLALResampleREAL8TimeSeries(REAL8TimeSeries *series, REAL8 dt)
REAL8Sequence * XLALCreateREAL8Sequence(size_t length)
COMPLEX16Sequence * XLALCreateCOMPLEX16Sequence(size_t length)
REAL8 XLALTimeDelayFromEarthCenter(const double detector_earthfixed_xyz_metres[3], double source_right_ascension_radians, double source_declination_radians, const LIGOTimeGPS *gpstime)
int XLALREAL8AverageSpectrumWelch(REAL8FrequencySeries *spectrum, const REAL8TimeSeries *tseries, UINT4 seglen, UINT4 stride, const REAL8Window *window, const REAL8FFTPlan *plan)
int XLALREAL8AverageSpectrumMedian(REAL8FrequencySeries *spectrum, const REAL8TimeSeries *tseries, UINT4 seglen, UINT4 stride, const REAL8Window *window, const REAL8FFTPlan *plan)
int XLALREAL8TimeFreqFFT(COMPLEX16FrequencySeries *freq, const REAL8TimeSeries *tser, const REAL8FFTPlan *plan)
int XLALREAL8FreqTimeFFT(REAL8TimeSeries *tser, const COMPLEX16FrequencySeries *freq, const REAL8FFTPlan *plan)
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
REAL8TimeSeries * XLALShrinkREAL8TimeSeries(REAL8TimeSeries *series, size_t first, size_t length)
void XLALDestroyREAL4TimeSeries(REAL4TimeSeries *series)
REAL4TimeSeries * XLALCutREAL4TimeSeries(const REAL4TimeSeries *series, size_t first, size_t length)
REAL4TimeSeries * XLALCreateREAL4TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
const LALUnit lalStrainUnit
const LALUnit lalADCCountUnit
const LALUnit lalDimensionlessUnit
REAL8Vector * XLALDDVectorMultiply(REAL8Vector *out, const REAL8Vector *in1, const REAL8Vector *in2)
REAL8Window * XLALCreateTukeyREAL8Window(UINT4 length, REAL8 beta)
#define XLAL_ERROR_VOID(...)
#define XLAL_ERROR_NULL(...)
int * XLALGetErrnoPtr(void)
const char * XLALErrorString(int errnum)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_TRY(statement, errnum)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
REAL8 XLALGreenwichMeanSiderealTime(const LIGOTimeGPS *gpstime)
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
LIGOTimeGPS * XLALGPSAddGPS(LIGOTimeGPS *epoch, const LIGOTimeGPS *dt)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
LIGOTimeGPS * XLALINT8NSToGPS(LIGOTimeGPS *epoch, INT8 ns)
int XLALSimInspiralTransformPrecessingWvf2PE(REAL8 *thetaJN, REAL8 *phiJL, REAL8 *theta1, REAL8 *theta2, REAL8 *phi12, REAL8 *chi1, REAL8 *chi2, const REAL8 incl, const REAL8 S1x, const REAL8 S1y, const REAL8 S1z, const REAL8 S2x, const REAL8 S2y, const REAL8 S2z, const REAL8 m1, const REAL8 m2, const REAL8 fRef, const REAL8 phiRef)
REAL8 vertexLongitudeRadians
REAL8 vertexLatitudeRadians
REAL4 yArmAltitudeRadians
REAL4 xArmAltitudeRadians
Structure to contain IFO data.
REAL8TimeSeries * timeData
Detector name.
LALDetector * detector
integration limits for overlap integral in F-domain
REAL8FrequencySeries * oneSidedNoisePowerSpectrum
REAL8 timeshift
Detector responses.
REAL8FFTPlan * timeToFreqFFTPlan
Padding for the above window.
struct tagLALInferenceROQData * roq
counts how many time the template has been calculated
REAL8Window * window
(one-sided Noise Power Spectrum)^{-1/2}
COMPLEX16FrequencySeries * freqData
What is this?
COMPLEX16FrequencySeries * whiteFreqData
Buffer for frequency domain data.
REAL8 SNR
The epoch of this observation (the time of the first sample)
struct tagLALInferenceIFOData * next
ROQ data.
LIGOTimeGPS epoch
LALDetector structure for where this data came from.
REAL8FFTPlan * freqToTimeFFTPlan
REAL8 fLow
FFT plan needed for time/time-and-phase marginalisation.
REAL8TimeSeries * whiteTimeData
A time series from the detector.
Structure to constain a model and its parameters.
REAL8 loglikelihood
Prior value at params
LALInferenceVariables * params
struct tagLALInferenceROQModel * roq
The padding of the above window.
Structure containing inference run state This includes pointers to the function types required to run...
ProcessParamsTable * commandLine
struct tagLALInferenceIFOData * data
Log sample, i.e.
LALInferencePriorFunction prior
The algorithm's single iteration function.
LALInferenceLikelihoodFunction likelihood
MultiNest prior for the parameters.
The LALInferenceVariables structure to contain a set of parameters Implemented as a linked list of LA...
CHAR value[LIGOMETA_VALUE_MAX]
struct tagSimBurst * next
LIGOTimeGPS time_geocent_gps
LIGOTimeGPS geocent_end_time
struct tagSimInspiralTable * next
CHAR waveform[LIGOMETA_WAVEFORM_MAX]
CHAR numrel_data[LIGOMETA_STRING_MAX]