Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInference 4.1.9.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
distance_integrator.h
Go to the documentation of this file.
1#ifndef DISTANCE_INTEGRATOR_H
2#define DISTANCE_INTEGRATOR_H
3
4/* exclude from SWIG interface and C++ code */
5#if !defined(SWIG) && !defined(__cplusplus)
6
7#include <gsl/gsl_spline.h>
8#include <gsl/gsl_interp.h>
9#include <lal/cubic_interp.h>
10
11typedef struct taglog_radial_integrator {
15 double xmax, ymax, vmax, r1, r2;
16 int k;
18
19typedef struct tagradial_integrand_params {
20 double scale;
21 double p;
22 double b;
26
27double log_dVC_dVL(double DL);
28void dVC_dVL_init(void);
29
30double log_radial_integrand(double r, void *params);
31double log_radial_integral(double r1, double r2, double p, double b, int k,
32 int cosmology, int gaussian);
33
34/**
35 * Distance integrator for marginalisation. Assumes a besselI0-type marginalised phase likelihood.
36 * @param r1 Minimum distance (Mpc)
37 * @param r2 Maximum distance (Mpc)
38 * @param k Exponent of distance prior \f$ p(r) propto r^k \f$
39 * @param cosmology 0: Euclidean, 1: use co-moving volume prior
40 * @param pmax: The maximum optimal SNR to allow
41 * @param size: Size of lookup table
42 * @param gaussian: Use gaussian likelihood instead of phase-marginalised one
43 */
44log_radial_integrator *log_radial_integrator_init(double r1, double r2, int k, int cosmology, double pmax, size_t size, int gaussian);
45
46/**
47 * Free an integrator
48 */
50
51/**
52 * Evaluate the log distance integrator for given SNRs.
53 * With a template at reference distance (1Mpc), compute the marginal likelihood
54 * over distance. Uses the two SNRs \f$ p=sqrt(<h|h>) \f$ and \f$ b=<d|h> \f$.
55 * @param integrator a log_radial_integrator
56 * @param p The optimal SNR \f$ p = sqrt(<h|h>) \f$
57 * @param b match between template and data \f$ b = <h|d> \f$
58 * @param log_p log(p)
59 * @param log_b log(b)
60 */
61double log_radial_integrator_eval(const log_radial_integrator *integrator, double p, double b, double log_p, double log_b);
62
63#endif /* !defined(SWIG) && !defined(__cplusplus) */
64
65#endif /* DISTANCE_INTEGRATOR_H */
int k
double log_radial_integrator_eval(const log_radial_integrator *integrator, double p, double b, double log_p, double log_b)
Evaluate the log distance integrator for given SNRs.
double log_radial_integrand(double r, void *params)
void dVC_dVL_init(void)
void log_radial_integrator_free(log_radial_integrator *integrator)
Free an integrator.
log_radial_integrator * log_radial_integrator_init(double r1, double r2, int k, int cosmology, double pmax, size_t size, int gaussian)
Distance integrator for marginalisation.
double log_radial_integral(double r1, double r2, double p, double b, int k, int cosmology, int gaussian)
double log_dVC_dVL(double DL)
const double r2
static const INT4 r
bicubic_interp * region0