Commit b4c37584 authored by John Douglas Veitch's avatar John Douglas Veitch

Add files for distance marg

parent 42427c32
//
// LALInferenceDistanceMarg.c
//
//
// Created by John Veitch on 20/03/2018.
//
#include "LALInferenceDistanceMarg.h"
#include <math.h>
double dist_integral(double rho_opt, double rho_match);
double dist_snr_pdf(double rho_opt, double rho_match, double dL)
{
double A = (rho_opt / dL)*(rho_opt / dL);
double B = rho_match/dL;
return exp(-A + B);
}
//
// LALInferenceDistanceMarg.h
//
//
// Created by John Veitch on 20/03/2018.
//
#ifndef LALInferenceDistanceMarg_h
#define LALInferenceDistanceMarg_h
#include <stdio.h>
/**
* Compute the integral
Int p(d | D, rho_opt, rho_mf) dD
* D is luminosity distance
* rho_opt is optimal SNR at 1 Mpc
* rho_mf is <d|h> at 1 Mpc
*/
double dist_integral(double rho_opt, double rho_match);
double dist_snr_pdf(double rho_opt, double rho_match, double dL);
#endif /* LALInferenceDistanceMarg_h */
......@@ -43,6 +43,7 @@ pkginclude_HEADERS = \
LALInferenceBurstRoutines.h \
LALInferenceHDF5.h \
LALInferencePriorVolumes.h \
LALInferenceDistanceMarg.h \
cubic_interp.h \
$(BAYESTARHDR) \
$(XMLHDR)
......@@ -71,6 +72,7 @@ liblalinference_la_SOURCES = \
LALInferenceHDF5.c \
LALInferencePriorVolumes.c \
DetectorFixedSkyCoords.c \
LALInferenceDistanceMarg.c \
logaddexp.h \
cubic_interp.c \
$(BAYESTARSRC) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment