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>
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");
175static 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"); abort();}
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"); abort();}
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]); abort();}
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"); abort();}
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"); abort();}
641 if(Nchannel!=0 && Nchannel!=Nifo) {
fprintf(stderr,
"ERROR: Please specify a channel for all caches, or omit to use the defaults\n"); abort();}
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));
691 dof=4.0 / M_PI * nSegs;
692 sprintf(df_argument_name,
"--dof-%s",IFOdata[
i].
name);
696 IFOdata[
i].STDOF = dof;
697 XLALPrintInfo(
"Detector %s will run with %g DOF if Student's T likelihood used.\n",
698 IFOdata[
i].
name, IFOdata[
i].STDOF);
702 if(!dataOpts && !Nchannel) channels=
XLALCalloc(Nifo,
sizeof(
char *));
703 for(
i=0;
i<Nifo;
i++) {
707 if(!strcmp(IFOnames[
i],
"H1")) {
709 if(!Nchannel) sprintf((channels[
i]),
"H1:%s",strainname);
continue;}
710 if(!strcmp(IFOnames[
i],
"H2")) {
712 if(!Nchannel) sprintf((channels[
i]),
"H2:%s",strainname);
continue;}
713 if(!strcmp(IFOnames[
i],
"LLO")||!strcmp(IFOnames[
i],
"L1")) {
715 if(!Nchannel) sprintf((channels[
i]),
"L1:%s",strainname);
continue;}
716 if(!strcmp(IFOnames[
i],
"V1")||!strcmp(IFOnames[
i],
"VIRGO")) {
718 if(!Nchannel) sprintf((channels[
i]),
"V1:h_16384Hz");
continue;}
719 if(!strcmp(IFOnames[
i],
"GEO")||!strcmp(IFOnames[
i],
"G1")) {
721 if(!Nchannel) sprintf((channels[
i]),
"G1:DER_DATA_H");
continue;}
723 if(!strcmp(IFOnames[
i],
"E1")){
725 if(!Nchannel) sprintf((channels[
i]),
"E1:STRAIN");
continue;}
726 if(!strcmp(IFOnames[
i],
"E2")){
728 if(!Nchannel) sprintf((channels[
i]),
"E2:STRAIN");
continue;}
729 if(!strcmp(IFOnames[
i],
"E3")){
731 if(!Nchannel) sprintf((channels[
i]),
"E3:STRAIN");
continue;}
732 if(!strcmp(IFOnames[
i],
"K1")){
734 if(!Nchannel) sprintf((channels[
i]),
"K1:STRAIN");
continue;}
735 if(!strcmp(IFOnames[
i],
"I1")){
737 if(!Nchannel) sprintf((channels[
i]),
"I1:STRAIN");
continue;}
738 if(!strcmp(IFOnames[
i],
"A1")||!strcmp(IFOnames[
i],
"LIGOSouth")){
741 sprintf(LIGOSouthFr.
name,
"LIGO-South");
742 sprintf(LIGOSouthFr.
prefix,
"A1");
757 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]);
758 printf(
"Detector tensor:\n");
759 for(
int jdx=0;jdx<3;jdx++){
760 for(
j=0;
j<3;
j++) printf(
"%f ",IFOdata[
i].
detector->response[jdx][
j]);
765 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]); abort();
769 for (
i=0;
i<Nifo;
i++){
781 fprintf(stdout,
"Using %lf seconds of padding for IFO %s \n",padding, IFOdata[
i].
name);
784 fprintf(stderr,
"Padding is negative or 2*padding is bigger than the whole segment. Consider reducing it using --padding or increase --seglen. Exiting\n");
787 IFOdata[
i].padding=padding;
796 REAL8 offset=SegmentLength-2.;
812 for(
i=0;
i<Nifo;
i++) {
817 if( (globFrames)?0:strstr(caches[
i],
"interp:")==caches[
i]){
819 char *interpfilename=&(caches[
i][7]);
820 printf(
"Looking for ASD interpolation file %s\n",interpfilename);
826 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")))))
829 fprintf(stderr,
"Error: You need to specify a dataseed when generating data with --dataseed <number>.\n\
830 (--dataseed 0 uses a non-reproducible number from the system clock, and no parallel run is then possible.)\n" );
835 ifo_salt+=(
int)IFOnames[
i][0]+(
int)IFOnames[
i][1];
845 if(!strcmp(caches[
i],
"LALLIGO")) {PSD = &
LALLIGOIPsd; scalefactor=9E-46;}
846 if(!strcmp(caches[
i],
"LALVirgo")) {PSD = &
LALVIRGOPsd; scalefactor=1.0;}
847 if(!strcmp(caches[
i],
"LALGEO")) {PSD = &
LALGEOPsd; scalefactor=1E-46;}
848 if(!strcmp(caches[
i],
"LALEGO")) {PSD = &
LALEGOPsd; scalefactor=1.0;}
849 if(!strcmp(caches[
i],
"LALAdLIGO")) {PSD = &
LALAdvLIGOPsd; scalefactor = 1E-49;}
854 if(interpFlag) {PSD=NULL; scalefactor=1.0;}
855 if(PSD==NULL && !(interpFlag|| LALSimPsd)) {
fprintf(stderr,
"Error: unknown simulated PSD: %s\n",caches[
i]); abort();}
858 for(
j=0;
j<IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++)
860 MetaNoiseFunc(&
status,&(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]),
j*IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF,interp,PSD);
861 IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]*=scalefactor;
869 int j_Lo = (
int) IFOdata[
i].
fLow/IFOdata[
i].freqData->deltaF;
871 for(
j=j_Lo;
j<IFOdata[
i].freqData->data->length;
j++){
872 IFOdata[
i].freqData->data->data[
j] = 0.0;
875 for(
j=j_Lo;
j<IFOdata[
i].freqData->data->length;
j++){
876 IFOdata[
i].freqData->data->data[
j] =
crect(
877 XLALNormalDeviate(datarandparam)*(0.5*sqrt(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]/IFOdata[
i].freqData->deltaF)),
878 XLALNormalDeviate(datarandparam)*(0.5*sqrt(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]/IFOdata[
i].freqData->deltaF))
882 IFOdata[
i].freqData->data->data[0] = 0;
883 const char timename[]=
"timeData";
898 if(
cache==NULL) {
fprintf(stderr,
"ERROR: Unable to import cache file \"%s\",\n XLALError: \"%s\".\n",caches[
i],
XLALErrorString(err)); abort();}
902 printf(
"Looking for frames for %s in PWD\n",IFOnames[
i]);
906 if(!
cache) {
fprintf(stderr,
"ERROR: Cannot find any frame data!\n"); abort();}
907 if ((!((psds[
i])==NULL)) && (!((asds[
i])==NULL))) {
fprintf(stderr,
"ERROR: Cannot provide both ASD and PSD file from command line!\n"); abort();}
908 if (!((asds)==NULL || (asds[
i])==NULL)){
911 char *interpfilename=&(asds[
i][0]);
912 fprintf(stderr,
"Reading ASD for %s using %s\n",IFOnames[
i],interpfilename);
913 printf(
"Looking for ASD file %s for PSD interpolation\n",interpfilename);
919 for(
j=0;
j<IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++)
921 MetaNoiseFunc(&
status,&(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]),
j*IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF,interp,NULL);
924 }
else if(!((psds)==NULL || (psds[
i])==NULL)){
927 char *interpfilename=&(psds[
i][0]);
928 fprintf(stderr,
"Reading PSD for %s using %s\n",IFOnames[
i],interpfilename);
929 printf(
"Looking for PSD file %s for PSD interpolation\n",interpfilename);
935 for(
j=0;
j<IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++)
937 MetaNoiseFunc(&
status,&(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]),
j*IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF,interp,NULL);
946 fprintf(stderr,
"Estimating PSD for %s using %i segments of %i samples (%lfs)\n",IFOnames[
i],nSegs,(
int)
seglen,SegmentLength);
954 GPSstart=trueGPSstart;
955 if(!PSDtimeSeries) {
XLALPrintError(
"Error reading PSD data for %s\n",IFOnames[
i]); abort();}
959 fprintf(stderr,
"ERROR while estimating PSD for %s\n",IFOnames[
i]);
973 const UINT4 nameLength=256;
976 snprintf(
filename, nameLength,
"%s-BinFitLines.dat", IFOdata[
i].
name);
978 printf(
"Running PSD bin fitting... ");
980 printf(
"completed!\n");
985 double deltaF = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF;
986 int lengthF = IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
991 printf(
"Running chi-squared tests... ");
993 printf(
"completed!\n");
995 const UINT4 nameLength=256;
1002 else lines_width =
deltaF;
1004 double lines_threshold;
1007 else lines_threshold = 2*pow(10.0,-14.0);
1009 printf(
"Using chi squared threshold of %g\n",lines_threshold);
1011 snprintf(
filename, nameLength,
"%s-ChiSquaredLines.dat", IFOdata[
i].
name);
1013 for (
int k = 0;
k < lengthF; ++
k ) {
1014 if (
pvalues[
k] < lines_threshold) {
1020 snprintf(
filename, nameLength,
"%s-ChiSquaredLines-pvalues.dat", IFOdata[
i].
name);
1022 for (
int k = 0;
k < lengthF; ++
k ) {
1031 double deltaF = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF;
1032 int lengthF = IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
1037 printf(
"Running KS tests... ");
1039 printf(
"completed!\n");
1041 const UINT4 nameLength=256;
1048 else lines_width =
deltaF;
1050 double lines_threshold;
1053 else lines_threshold = 0.134558;
1055 printf(
"Using KS threshold of %g\n",lines_threshold);
1057 snprintf(
filename, nameLength,
"%s-KSLines.dat", IFOdata[
i].
name);
1059 for (
int k = 0;
k < lengthF; ++
k ) {
1060 if (
pvalues[
k] < lines_threshold) {
1066 snprintf(
filename, nameLength,
"%s-KSLines-pvalues.dat", IFOdata[
i].
name);
1068 for (
int k = 0;
k < lengthF; ++
k ) {
1077 double deltaF = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF;
1078 int lengthF = IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
1083 printf(
"Running power law tests... ");
1085 printf(
"completed!\n");
1087 const UINT4 nameLength=256;
1094 else lines_width =
deltaF;
1096 double lines_threshold;
1099 else lines_threshold = 0.7197370;
1101 printf(
"Using power law threshold of %g\n",lines_threshold);
1103 snprintf(
filename, nameLength,
"%s-PowerLawLines.dat", IFOdata[
i].
name);
1105 for (
int k = 0;
k < lengthF; ++
k ) {
1106 if (
pvalues[
k] < lines_threshold) {
1112 snprintf(
filename, nameLength,
"%s-PowerLawLines-pvalues.dat", IFOdata[
i].
name);
1114 for (
int k = 0;
k < lengthF; ++
k ) {
1123 int lengthF = IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
1128 const UINT4 nameLength=256;
1132 snprintf(
filename, nameLength,
"%s-XCorrVals.dat", IFOdata[
i].
name);
1134 printf(
"Running xcorr tests... ");
1136 printf(
"completed!\n");
1138 snprintf(
filename, nameLength,
"%s-XCorrBands.dat", IFOdata[
i].
name);
1158 segStart=truesegstart;
1159 if(Ntimeslides) IFOdata[
i].timeData->epoch=truesegstart;
1161 if(!IFOdata[
i].timeData) {
1174 for(
j=0;
j<IFOdata[
i].freqData->data->length;
j++){
1175 IFOdata[
i].freqData->data->data[
j] /= sqrt(IFOdata[
i].window->sumofsquares / IFOdata[
i].window->data->length);
1176 IFOdata[
i].windowedTimeData->data->data[
j] /= sqrt(IFOdata[
i].window->sumofsquares / IFOdata[
i].window->data->length);
1186 for(
j=0;
j<IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++)
1187 IFOdata[
i].noiseASD->
data->
data[
j]=sqrt(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]);
1189 const UINT4 nameLength=FILENAME_MAX+100;
1203 fprintf(stderr,
"Unable to open the path %s for writing PSD files\n",
filename);
1206 for (
j = 0;
j < IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++) {
1207 REAL8 f = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF*
j;
1208 REAL8 psd = IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j];
1220 snprintf(
filename, nameLength,
"%s%s-timeData.dat",
ppt->
value, IFOdata[
i].name);
1229 fprintf(stderr,
"Unable to open the path %s for writing time data files\n",
filename);
1232 for (
j = 0;
j < IFOdata[
i].timeData->data->length;
j++) {
1234 j * IFOdata[
i].timeData->deltaT;
1235 REAL8 d = IFOdata[
i].timeData->data->data[
j];
1243 snprintf(
filename, nameLength,
"%s%s-freqData.dat",
ppt->
value, IFOdata[
i].name);
1252 fprintf(stderr,
"Unable to open the path %s for writing freq data files\n",
filename);
1255 for (
j = 0;
j < IFOdata[
i].freqData->data->length;
j++) {
1256 REAL8 f = IFOdata[
i].freqData->deltaF *
j;
1257 REAL8 dre = creal(IFOdata[
i].freqData->data->data[
j]);
1258 REAL8 dim = cimag(IFOdata[
i].freqData->data->data[
j]);
1260 fprintf(
out,
"%10.10g %10.10g %10.10g\n",
f, dre, dim);
1272 fprintf(stderr,
"Unable to open the path %s for writing freq ASD files\n",
filename);
1275 for (
j = 0;
j < IFOdata[
i].oneSidedNoisePowerSpectrum->data->length;
j++) {
1276 REAL8 f = IFOdata[
i].oneSidedNoisePowerSpectrum->deltaF*
j;
1277 REAL8 asd = sqrt(IFOdata[
i].oneSidedNoisePowerSpectrum->data->data[
j]);
1286 for (
i=0;
i<Nifo;
i++) IFOdata[
i].SNR=0.0;
1288 for (
i=0;
i<Nifo-1;
i++) IFOdata[
i].next=&(IFOdata[
i+1]);
1290 for(
i=0;
i<Nifo;
i++) {
1291 if(channels)
if(channels[
i])
XLALFree(channels[
i]);
1292 if(caches)
if(caches[
i])
XLALFree(caches[
i]);
1293 if(IFOnames)
if(IFOnames[
i])
XLALFree(IFOnames[
i]);
1295 if(fHighs)
if(fHighs[
i])
XLALFree(fHighs[
i]);
1306 fprintf(stderr,
"done LALInferenceSetupROQdata\n");
1338 REAL8 iHigh = (iHighDefaultCut < iHighFromFHigh ? iHighDefaultCut : iHighFromFHigh);
1339 REAL8 windowSquareSum = 0.0;
1353 REAL8 weight = 0.5*(1.0 + cos(M_PI*(
i-iLow)/iLow));
1357 windowSquareSum += weight*weight;
1358 }
else if (
i >= iHigh) {
1364 REAL8 weight = 0.5*(1.0 + cos(M_PI*(
i-iHigh)/NWind));
1368 windowSquareSum += weight*weight;
1370 windowSquareSum += 1.0;
1390 REAL8 responseScale=1.0;
1392 REAL8 SNR=0,NetworkSNR=0;
1396 FILE *rawWaveform=NULL;
1398 REAL8 bufferLength = 2048.0;
1405 REAL8 InjSampleRate=1.0/MindeltaT;
1408 char SNRpath[FILENAME_MAX+50]=
"";
1409 int flipped_masses=0;
1412 minFlow = minFlow>thisData->
fLow ? thisData->
fLow : minFlow;
1414 thisData = thisData->
next;
1426 sprintf(SNRpath,
"%s_snr.txt",
ppt->
value);
1428 sprintf(SNRpath,
"snr.txt");
1436 injEvent = injTable;
1437 injEvent->
next = NULL;
1442 printf(
"Injecting approximant %i: %s\n", injapprox, injTable->
waveform);
1449 InjectFD(IFOdata, injTable, commandLine);
1464 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);
1465 InjSampleRate = 16384;
1468 memset(&det,0,
sizeof(det));
1482 bufferN = (
UINT4) (bufferLength*InjSampleRate);
1487 &bufferStart, 0.0, 1.0/InjSampleRate,
1511 printf(
"Using LALInspiral for injection\n");
1522 ppnParams.
deltaT = 1.0/InjSampleRate;
1524 ppnParams.
ppn = NULL;
1525 unsigned lengthTest = 0;
1535 lengthTest =
waveform.phi->data->length;
1541 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__);
1543 if(ppnParams.
tc>bufferLength){
1544 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__);
1555 printf(
"Using LALSimulation for injection\n");
1586 fprintf(stdout,
"Flipping lambdas since masses are flipped\n");
1603 fprintf(stdout,
"Injection nonGR 21 amplitude set to %f\n",damp21);
1609 fprintf(stdout,
"Injection nonGR 33 amplitude set to %f\n",damp33);
1614 REAL8 dLambdaT = 0.;
1623 fprintf(stdout,
"Injection lambdaT set to %f\n",lambdaT);
1624 fprintf(stdout,
"Injection dLambdaT set to %f\n",dLambdaT);
1641 fprintf(stdout,
"Injection logp1 set to %f\n",logp1);
1642 fprintf(stdout,
"Injection gamma1 set to %f\n",gamma1);
1643 fprintf(stdout,
"Injection gamma2 set to %f\n",gamma2);
1644 fprintf(stdout,
"Injection gamma3 set to %f\n",gamma3);
1669 REAL8 gamma[]={SDgamma0,SDgamma1,SDgamma2,SDgamma3};
1671 fprintf(stdout,
"Injection SDgamma0 set to %lf\n",SDgamma0);
1672 fprintf(stdout,
"Injection SDgamma1 set to %lf\n",SDgamma1);
1673 fprintf(stdout,
"Injection SDgamma2 set to %lf\n",SDgamma2);
1674 fprintf(stdout,
"Injection SDgamma3 set to %lf\n",SDgamma3);
1807 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);
1811 printf(
"Injecting with f_min = %f.\n",
f_min);
1824 fprintf(stdout,
"Injected damp21 and damp33 are %f and %f\n",damp21,damp33);
1835 if(!hplus || !hcross) {
1836 fprintf(stderr,
"Error: XLALSimInspiralChooseWaveform() failed to produce waveform.\n");
1848 fprintf(stdout,
"Dump injected TimeDomain h_plus and h_cross at geocenter (for IFO %s)\n", thisData->
name);
1851 sprintf(
filename,
"%s_TD_geocenter_pols.dat",thisData->
name);
1855 fprintf(stderr,
"Unable to open the path %s for writing injected TimeDomain h_plus and h_cross at geocenter\n",
filename);
1891 XLALPrintError(
"Unable to allocate memory for injection buffer\n");
1905 thisData->
SNR=sqrt(SNR);
1910 fprintf(stdout,
"Injected SNR in detector %s = %g\n",thisData->
name,thisData->
SNR);
1912 sprintf(
filename,
"%s_timeInjection.dat",thisData->
name);
1918 sprintf(
filename,
"%s_freqInjection.dat",thisData->
name);
1928 thisData=thisData->
next;
1934 NetworkSNR=sqrt(NetworkSNR);
1935 fprintf(stdout,
"Network SNR of event %d = %g\n",
event,NetworkSNR);
1957 fclose(rawWaveform);
1974 char SNRpath[FILENAME_MAX+50];
1976 int flipped_masses=0;
1981 sprintf(SNRpath,
"%s_snr.txt",
ppt->
value);
1983 sprintf(SNRpath,
"snr.txt");
2014 fprintf(stdout,
"Flipping lambdas since masses are flipped\n");
2030 fprintf(stdout,
"Injection nonGR 21 amplitude set to %f\n",damp21);
2036 fprintf(stdout,
"Injection nonGR 33 amplitude set to %f\n",damp33);
2041 REAL8 dLambdaT = 0.;
2047 fprintf(stdout,
"Injection lambdaT set to %f\n",lambdaT);
2048 fprintf(stdout,
"Injection dLambdaT set to %f\n",dLambdaT);
2065 fprintf(stdout,
"Injection logp1 set to %f\n",logp1);
2066 fprintf(stdout,
"Injection gamma1 set to %f\n",gamma1);
2067 fprintf(stdout,
"Injection gamma2 set to %f\n",gamma2);
2068 fprintf(stdout,
"Injection gamma3 set to %f\n",gamma3);
2093 REAL8 gamma[]={SDgamma0,SDgamma1,SDgamma2,SDgamma3};
2095 fprintf(stdout,
"Injection SDgamma0 set to %lf\n",SDgamma0);
2096 fprintf(stdout,
"Injection SDgamma1 set to %lf\n",SDgamma1);
2097 fprintf(stdout,
"Injection SDgamma2 set to %lf\n",SDgamma2);
2098 fprintf(stdout,
"Injection SDgamma3 set to %lf\n",SDgamma3);
2196 else if (!strcmp(
ppt->
value,
"orbital-l"))
2198 else if (!strcmp(
ppt->
value,
"total-j"))
2232 dataPtr=dataPtr->
next;
2236 fprintf(stdout,
"\n\n---\t\t ---\n");
2237 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);
2238 fprintf(stdout,
"---\t\t ---\n\n");
2253 fprintf(stdout,
"Injected damp21 and damp33 are %f and %f\n",damp21,damp33);
2266 XLALPrintError(
" ERROR in InjectFD(): error encountered when injecting waveform. errnum=%d\n",errnum);
2271 fprintf(stdout,
"Dump injected FreqDomain h_plus and h_cross at geocenter (for IFO %s)\n", IFOdata->
name);
2273 sprintf(
filename,
"%s_FD_geocenter_pols.dat",IFOdata->
name);
2276 fprintf(stderr,
"Unable to open the path %s for writing injected FreqDomain h_plus and h_cross\n",
filename);
2283 creal(hctilde->data->data[
j]), cimag(hctilde->data->data[
j]));
2288 REAL8 Fplus, Fcross;
2289 REAL8 plainTemplateReal, plainTemplateImag;
2290 REAL8 templateReal, templateImag;
2296 REAL8 twopit, re, im, dre, dim, newRe, newIm;
2309 while (dataPtr != NULL) {
2326 timeshift = (injtime - instant) + timedelay;
2329 dataPtr->
fPlus = Fplus;
2330 dataPtr->
fCross = Fcross;
2333 char InjFileName[320];
2334 sprintf(InjFileName,
"injection_%s.dat",dataPtr->
name);
2335 FILE *outInj=fopen(InjFileName,
"w");
2342 re = cos(twopit *
deltaF * lower);
2343 im = -sin(twopit *
deltaF * lower);
2346 double windowFactor;
2349 for (
i=lower;
i<=upper; ++
i){
2351 if (i < hptilde->
data->length) {
2352 plainTemplateReal = Fplus * creal(hptilde->
data->
data[
i])
2353 + Fcross * creal(hctilde->data->data[
i]);
2354 plainTemplateImag = Fplus * cimag(hptilde->
data->
data[
i])
2355 + Fcross * cimag(hctilde->data->data[
i]);
2357 plainTemplateReal = 0.0;
2358 plainTemplateImag = 0.0;
2364 templateReal = (plainTemplateReal*re - plainTemplateImag*im);
2365 templateImag = (plainTemplateReal*im + plainTemplateImag*re);
2368 templateReal *= ((
REAL8) windowFactor);
2369 templateImag *= ((
REAL8) windowFactor);
2372 dim = -sin(twopit*
deltaF);
2373 dre = -2.0*sin(0.5*twopit*
deltaF)*sin(0.5*twopit*
deltaF);
2374 newRe = re + re*dre - im * dim;
2375 newIm = im + re*dim + im*dre;
2385 printf(
"injected SNR %.1f in IFO %s\n",sqrt(2.0*chisquared),dataPtr->
name);
2386 NetSNR+=2.0*chisquared;
2387 dataPtr->
SNR=sqrt(2.0*chisquared);
2388 dataPtr = dataPtr->
next;
2392 printf(
"injected Network SNR %.1f \n",sqrt(NetSNR));
2407 thisData=thisData->
next;
2410 FILE * snrout = fopen(SNRpath,
"w");
2412 fprintf(stderr,
"Unable to open the path %s for writing SNR files\n",SNRpath);
2413 fprintf(stderr,
"Error code %i: %s\n",errno,strerror(errno));
2420 NetSNR+=(thisData->
SNR*thisData->
SNR);
2421 thisData=thisData->
next;
2425 fprintf(snrout,
"%4.2f\n",sqrt(NetSNR));
2443 if (
q > 1.0)
q = 1.0/
q;
2446 if (psi>=M_PI) psi -= M_PI;
2496 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);
2510 REAL8 costhetajn=cos(thetaJN);
2518 char defaultname[]=
"injection_params.dat";
2530 fprintf(stderr,
"done LALInferenceSetupROQmodel\n");
2542 sprintf(fname,
"%s.injection",
ppt->
value);
2545 fname = defaultname;
2551 theEventTable = injTable;
2553 theEventTable = theEventTable->
next;
2555 theEventTable->next = NULL;
2557 theEventTable=injTable;
2558 theEventTable->
next = NULL;
2565 fprintf(stdout,
"Unable to print injection sample: No approximant/PN order set\n");
2588 REAL8 injPrior = runState->
prior(runState, injparams, model);
2594 fprintf(stderr,
"ERROR: Cannot print injection sample. Received error code %s\n",
XLALErrorString(errnum));
2599 REAL8 tmp2=injL-logZnoise;
2606 sprintf(tmpName,
"deltalogl%s",
data->name);
2613 if(!
outfile) {
fprintf(stderr,
"ERROR: Unable to open file %s for injection saving\n",fname); abort();}
2633 if (
m1>=
m2)
return(0);
2635 fprintf(stdout,
"Injtable has m1<m2. Flipping masses and spins in injection. Shifting phase by pi. \n");
2638 injEvent->
mass2=tmp;
2662 unsigned int n_basis_linear=0, n_basis_quadratic=0, n_samples=0, time_steps=0;
2674 fprintf(stderr,
"Unable to open injection file(LALInferenceReadData) %s\n",procparam->
value);
2679 event=atoi(procparam->
value);
2687 else injTable=injTable->
next;
2690 fprintf(stderr,
"Error, cannot find simulation id %s in injection file\n",procparam->
value);
2701 if(injTable) memcpy(&GPStrig,&(injTable->
geocent_end_time),
sizeof(GPStrig));
2703 fprintf(stderr,
">>> Error: No trigger time specifed and no injection given \n");
2713 if (tempfp == NULL){
2716 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2719 fscanf(tempfp,
"%u", &time_steps);
2720 fscanf(tempfp,
"%u", &n_basis_linear);
2721 fscanf(tempfp,
"%u", &n_basis_quadratic);
2722 fscanf(tempfp,
"%u", &n_samples);
2724 fprintf(stderr,
"loaded --roqtime_steps\n");
2731 model->
roq->trigtime = endtime;
2741 model->
roq->nodesFileLinear = fopen(
ppt->
value,
"rb");
2742 if (!(model->
roq->nodesFileLinear)) {
2745 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2748 fprintf(stderr,
"read model->roq->frequencyNodesLinear");
2750 for(
unsigned int linsize = 0; linsize < n_basis_linear; linsize++){
2751 fread(&(model->
roq->frequencyNodesLinear->data[linsize]),
sizeof(
REAL8), 1, model->
roq->nodesFileLinear);
2753 fclose(model->
roq->nodesFileLinear);
2754 model->
roq->nodesFileLinear = NULL;
2755 fprintf(stderr,
"loaded --roqnodesLinear\n");
2760 model->
roq->nodesFileQuadratic = fopen(
ppt->
value,
"rb");
2761 if (!(model->
roq->nodesFileQuadratic)) {
2764 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2768 for(
unsigned int quadsize = 0; quadsize < n_basis_quadratic; quadsize++){
2769 fread(&(model->
roq->frequencyNodesQuadratic->data[quadsize]),
sizeof(
REAL8), 1, model->
roq->nodesFileQuadratic);
2771 fclose(model->
roq->nodesFileQuadratic);
2772 model->
roq->nodesFileQuadratic = NULL;
2773 fprintf(stderr,
"loaded --roqnodesQuadratic\n");
2788 unsigned int n_basis_linear, n_basis_quadratic, n_samples, time_steps;
2799 fprintf(stderr,
"Unable to open injection file(LALInferenceReadData) %s\n",procparam->
value);
2804 event=atoi(procparam->
value);
2807 injTable=injTable->
next;
2814 injTable=injTable->
next;
2818 fprintf(stderr,
"Error, cannot find simulation id %s in injection file\n", procparam->
value);
2832 if (tempfp == NULL){
2835 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2838 fscanf(tempfp,
"%u", &time_steps);
2839 fscanf(tempfp,
"%u", &n_basis_linear);
2840 fscanf(tempfp,
"%u", &n_basis_quadratic);
2841 fscanf(tempfp,
"%u", &n_samples);
2843 fprintf(stderr,
"loaded --roqtime_steps\n");
2853 sprintf(tmp,
"--%s-roqweightsLinear", thisData->
name);
2856 thisData->
roq->weightsFileLinear = fopen(
ppt->
value,
"rb");
2857 if (thisData->
roq->weightsFileLinear == NULL){
2860 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2863 thisData->
roq->weightsLinear = (
double complex*)malloc(n_basis_linear*time_steps*(
sizeof(
double complex)));
2866 thisData->
roq->time_weights_width = 2*
dt + 2*0.045;
2867 thisData->
roq->time_step_size = thisData->
roq->time_weights_width/time_steps;
2868 thisData->
roq->n_time_steps = time_steps;
2871 fprintf(stderr,
"basis_size = %d\n", n_basis_linear);
2872 fprintf(stderr,
"time steps = %d\n", time_steps);
2874 double *tmp_real_weight = malloc(time_steps*(
sizeof(
double)));
2875 double *tmp_imag_weight = malloc(time_steps*(
sizeof(
double)));
2877 double *tmp_tcs = malloc(time_steps*(
sizeof(
double)));
2879 sprintf(tmp,
"--roq-times");
2882 FILE *tcFile = fopen(
ppt->
value,
"rb");
2883 if (tcFile == NULL) {
2886 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2890 for(
unsigned int gg=0;gg < time_steps; gg++){
2891 fread(&(tmp_tcs[gg]),
sizeof(
double), 1, tcFile);
2894 for(
unsigned int ii=0; ii<n_basis_linear;ii++){
2895 for(
unsigned int jj=0; jj<time_steps;jj++){
2896 fread(&(thisData->
roq->weightsLinear[ii*time_steps + jj]),
sizeof(
double complex), 1, thisData->
roq->weightsFileLinear);
2897 tmp_real_weight[jj] = creal(thisData->
roq->weightsLinear[ii*time_steps + jj]);
2898 tmp_imag_weight[jj] = cimag(thisData->
roq->weightsLinear[ii*time_steps + jj]);
2902 thisData->
roq->weights_linear[ii].acc_real_weight_linear = NULL;
2903 thisData->
roq->weights_linear[ii].acc_imag_weight_linear = NULL;
2905 thisData->
roq->weights_linear[ii].spline_real_weight_linear = gsl_spline_alloc (gsl_interp_cspline, time_steps);
2906 gsl_spline_init(thisData->
roq->weights_linear[ii].spline_real_weight_linear, tmp_tcs, tmp_real_weight, time_steps);
2908 thisData->
roq->weights_linear[ii].spline_imag_weight_linear = gsl_spline_alloc (gsl_interp_cspline, time_steps);
2909 gsl_spline_init(thisData->
roq->weights_linear[ii].spline_imag_weight_linear, tmp_tcs, tmp_imag_weight, time_steps);
2911 fclose(thisData->
roq->weightsFileLinear);
2912 thisData->
roq->weightsFileLinear = NULL;
2915 sprintf(tmp,
"--%s-roqweightsQuadratic", thisData->
name);
2917 thisData->
roq->weightsQuadratic = (
double*)malloc(n_basis_quadratic*
sizeof(
double));
2918 thisData->
roq->weightsFileQuadratic = fopen(
ppt->
value,
"rb");
2919 if (thisData->
roq->weightsFileQuadratic == NULL){
2922 fprintf(stderr,
"Error code %i: %s\n", errsave, strerror(errsave));
2925 for(
unsigned int ii=0; ii<n_basis_quadratic;ii++){
2926 fread(&(thisData->
roq->weightsQuadratic[ii]),
sizeof(
double), 1, thisData->
roq->weightsFileQuadratic);
2928 fclose(thisData->
roq->weightsFileQuadratic);
2929 thisData->
roq->weightsFileQuadratic = NULL;
2930 fprintf(stderr,
"loaded %s ROQ weights\n", thisData->
name);
2931 thisData = thisData->
next;
2958 XLALPrintError(
"ERROR: --injXML option is deprecated. Use --inj and update your scripts\n");
2962 fprintf(stdout,
"Checking if the xml table is an inspiral table... \n");
2969 event=atoi(procparam->
value);
2970 while(
q<
event) {
q++; inspiralTable=inspiralTable->
next;}
2974 while(inspiralTable)
2977 else inspiralTable=inspiralTable->
next;
2980 fprintf(stderr,
"Error, cannot find simulation id %s in injection file\n",procparam->
value);
2985 fprintf(stdout,
"You did not provide an event number with the injtable. Using event 0 which may not be what you want!!!!!\n");
2993 fprintf(stdout,
"Checking if the xml table is a burst table... \n");
2998 event=atoi(procparam->
value);
2999 while(
q<
event) {
q++; burstTable=burstTable->
next;}
3003 fprintf(stderr,
"Error, SimBurst tables do not currently support event_id tags \n");
3007 fprintf(stdout,
"You did not provide an event number with the injtable. Using event 0 which may not be what you want!!!!!\n");
3014 XLALPrintError(
"Error: No trigger time specifed and no injection given \n");
3026 char mdcname[]=
"GW";
3027 char **mdc_caches=NULL;
3028 char **mdc_channels=NULL;
3035 REAL8 prefactor =1.0;
3040 fprintf(stdout,
"Using prefactor=%f to scale the MDC injection\n",prefactor);
3046 fprintf(stderr,
"You cannot use both injfile (--inj) and MDCs (--inject_from_mdc) Exiting... \n");
3053 fprintf(stderr,
"You cannot use both injfile (--binj) and MDCs (--inject_from_mdc) Exiting... \n");
3061 UINT4 Nmdc=0,Nchannel=0;
3063 char mdc_caches_name[] =
"injcache";
3064 char mdc_channels_name[] =
"injchannel";
3065 char **IFOnames=NULL;
3068 fprintf(stderr,
"Must provide a --IFO-injcache option for each IFO if --inject_from_mdc is given\n");
3074 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");
3075 mdc_channels= malloc((nIFO+1)*
sizeof(
char*));
3079 mdc_channels[
i] = malloc(512*
sizeof(
char));
3080 if(!strcmp(
data->name,
"H1")) {
3081 sprintf(mdc_channels[
i],
"H1:%s-H",mdcname);}
3082 else if(!strcmp(
data->name,
"L1")) {
3083 sprintf(mdc_channels[
i],
"L1:%s-H",mdcname); }
3084 else if(!strcmp(
data->name,
"V1")) {
3085 sprintf(mdc_channels[
i],
"V1:%s-16K",mdcname);}
3095 REAL8 SampleRate=4096.0,SegmentLength=0.0;
3104 XLALPrintError(
"Unable to allocate memory for injection buffer\n");
3140 for(
j=lower;
j<upper;
j++){
3141 windTimeData->
data->
data[
j] /= sqrt(
data->window->sumofsquares /
data->window->data->length);
3144 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];
3148 printf(
"Injected SNR %.3f in IFO %s from MDC \n",sqrt(2*tmp),
data->name);
3149 data->SNR=sqrt(2*tmp);
3154 printf(
"Injected network SNR %.3f from MDC\n",sqrt(net_snr));
3156 char SNRpath[FILENAME_MAX+100];
3159 fprintf(stderr,
"Must specify --outfile <filename.dat>\n");
3163 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)
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)
const char * XLALSimInspiralGetStringFromApproximant(Approximant approximant)
SimInspiralTable * XLALSimInspiralTableFromLIGOLw(const char *fileName)
SimBurst * XLALSimBurstTableFromLIGOLw(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)
COMPLEX16FrequencySeries * XLALCreateCOMPLEX16FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
REAL8FrequencySeries * XLALCreateREAL8FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
void XLALDestroyCOMPLEX8FrequencySeries(COMPLEX8FrequencySeries *series)
COMPLEX8FrequencySeries * XLALCreateCOMPLEX8FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
void XLALDestroyCOMPLEX16FrequencySeries(COMPLEX16FrequencySeries *series)
void LALGenerateInspiral(LALStatus *status, CoherentGW *waveform, SimInspiralTable *params, PPNParamStruc *ppnParamsInputOutput)
void XLALDestroyCache(LALCache *cache)
LALCache * XLALCacheGlob(const char *dirstr, const char *fnptrn)
LALCache * XLALCacheImport(const char *fname)
LALCache * XLALCacheDuplicate(const LALCache *cache)
int XLALCacheSieve(LALCache *cache, INT4 t0, INT4 t1, const char *srcregex, const char *dscregex, const char *urlregex)
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 * 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...
ProcessParamsTable * LALInferenceGetProcParamVal(ProcessParamsTable *procparams, const char *name)
Returns the element of the process params table with "name".
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.
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...
void LALInferenceSetupROQmodel(LALInferenceModel *model, ProcessParamsTable *commandLine)
void LALInferenceSetupROQdata(LALInferenceIFOData *IFOdata, ProcessParamsTable *commandLine)
void LALInferenceInjectFromMDC(ProcessParamsTable *commandLine, LALInferenceIFOData *IFOdata)
LALInferenceVariables * LALInferencePrintInjectionSample(LALInferenceRunState *runState)
Function to output a sample with logL values etc for the injection, if one is made.
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 * XLALMalloc(size_t n)
void * XLALCalloc(size_t m, 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)
COMPLEX16Sequence * XLALCreateCOMPLEX16Sequence(size_t length)
REAL8Sequence * XLALCreateREAL8Sequence(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)
REAL4TimeSeries * XLALCreateREAL4TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
REAL8TimeSeries * XLALShrinkREAL8TimeSeries(REAL8TimeSeries *series, size_t first, size_t length)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
void XLALDestroyREAL4TimeSeries(REAL4TimeSeries *series)
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
REAL4TimeSeries * XLALCutREAL4TimeSeries(const REAL4TimeSeries *series, size_t first, 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(...)
const char * XLALErrorString(int errnum)
#define XLAL_ERROR_NULL(...)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_TRY(statement, errnum)
int * XLALGetErrnoPtr(void)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
REAL8 XLALGreenwichMeanSiderealTime(const LIGOTimeGPS *gpstime)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
LIGOTimeGPS * XLALGPSAddGPS(LIGOTimeGPS *epoch, const LIGOTimeGPS *dt)
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]