Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org starting 2 March 2020 at approximately 8am MST. It is expected to take around 10 minutes and will include a short period of downtime towards the end of the maintenance window. Please direct any comments, concerns, or questions to computing-help@igwn.org.

Commit 00b7ddc9 authored by John Douglas Veitch's avatar John Douglas Veitch

Add files for distance marg

parent 56a11efe
//
// 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 */
......@@ -39,6 +39,7 @@ pkginclude_HEADERS = \
LALInferenceBurstRoutines.h \
LALInferenceHDF5.h \
LALInferencePriorVolumes.h \
LALInferenceDistanceMarg.h \
cubic_interp.h \
$(BAYESTARHDR) \
$(XMLHDR)
......@@ -67,6 +68,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