 LAL  6.21.0.1-1696c80 XLALMarcumQ.c File Reference

## Prototypes

static double Q (double mu, double x)

static double c_mu (double mu, double xi)

static double lnA (int n, double mu)

static double half_zeta_2 (double x, double y)

static double zeta (double x, double y)

static double theta_over_sin_theta (double theta)

static double theta_over_sin_theta_primed_sin_theta (double theta)

static double rho (double theta_over_sin_theta_, double xi)

static double r (double theta, double y, double xi)

static double r_primed_sin_theta (double theta, double y, double xi)

static double f (double theta, double y, double xi)

static double psi (double theta, double xi)

static void f1_f2 (double x, double M, double *f1, double *f2)

static double MarcumQ_small_x (double M, double x, double y)

static double MarcumQ_large_xy (double M, double x, double y, double xi)

static double MarcumQ_recurrence (double M, double x, double y, double xi)

static double MarcumQ_large_M (double M, double x, double y)

static double integrand (double theta, void *integrand_params)

static double MarcumQ_quadrature (double M, double x, double y, double xi)

double XLALMarcumQmodified (double M, double x, double y)
The modified form of the Marcum Q function. More...

double XLALMarcumQ (double M, double a, double b)
The function defined by J. Marcum,

$Q_{M}(a, b) = \int_{b}^{\infty} x \left( \frac{x}{a} \right)^{M - 1} \exp \left( -\frac{x^{2} + a^{2}}{2} \right) I_{M - 1}(a x) \,\mathrm{d}x,$

where $$I_{M - 1}$$ is the modified Bessel function of order $$M - 1$$. More...

Go to the source code of this file.

## Data Structures

struct  integrand_params

## ◆ Q()

 static double Q ( double mu, double x )
static

Definition at line 99 of file XLALMarcumQ.c.

## ◆ c_mu()

 static double c_mu ( double mu, double xi )
static

Definition at line 117 of file XLALMarcumQ.c.

## ◆ lnA()

 static double lnA ( int n, double mu )
static

Definition at line 128 of file XLALMarcumQ.c.

## ◆ half_zeta_2()

 static double half_zeta_2 ( double x, double y )
static

Definition at line 141 of file XLALMarcumQ.c.

## ◆ zeta()

 static double zeta ( double x, double y )
static

Definition at line 184 of file XLALMarcumQ.c.

## ◆ theta_over_sin_theta()

 static double theta_over_sin_theta ( double theta )
static

Definition at line 196 of file XLALMarcumQ.c.

## ◆ theta_over_sin_theta_primed_sin_theta()

 static double theta_over_sin_theta_primed_sin_theta ( double theta )
static

Definition at line 204 of file XLALMarcumQ.c.

## ◆ rho()

 static double rho ( double theta_over_sin_theta_, double xi )
static

Definition at line 222 of file XLALMarcumQ.c.

## ◆ r()

 static double r ( double theta, double y, double xi )
static

Definition at line 228 of file XLALMarcumQ.c.

## ◆ r_primed_sin_theta()

 static double r_primed_sin_theta ( double theta, double y, double xi )
static

Definition at line 237 of file XLALMarcumQ.c.

## ◆ f()

 static double f ( double theta, double y, double xi )
static

Definition at line 258 of file XLALMarcumQ.c.

## ◆ psi()

 static double psi ( double theta, double xi )
static

Definition at line 273 of file XLALMarcumQ.c.

## ◆ f1_f2()

 static void f1_f2 ( double x, double M, double * f1, double * f2 )
static

Definition at line 288 of file XLALMarcumQ.c.

## ◆ MarcumQ_small_x()

 static double MarcumQ_small_x ( double M, double x, double y )
static

Definition at line 311 of file XLALMarcumQ.c.

## ◆ MarcumQ_large_xy()

 static double MarcumQ_large_xy ( double M, double x, double y, double xi )
static

Definition at line 336 of file XLALMarcumQ.c.

## ◆ MarcumQ_recurrence()

 static double MarcumQ_recurrence ( double M, double x, double y, double xi )
static

Definition at line 455 of file XLALMarcumQ.c.

## ◆ MarcumQ_large_M()

 static double MarcumQ_large_M ( double M, double x, double y )
static

Definition at line 490 of file XLALMarcumQ.c.

## ◆ integrand()

 static double integrand ( double theta, void * integrand_params )
static

Definition at line 557 of file XLALMarcumQ.c.

 static double MarcumQ_quadrature ( double M, double x, double y, double xi )
static

Definition at line 569 of file XLALMarcumQ.c.

## ◆ XLALMarcumQmodified()

 double XLALMarcumQmodified ( double M, double x, double y )

The modified form of the Marcum Q function.

Used by Gil et al. in

A. Gil, J. Segura, and N. M. Temme. Algorithm 939: Computation of the Marcum Q-Function. ACM Transactions on Mathematical Software (TOMS), Volume 40 Issue 3, April 2014, Article No. 20. arXiv:1311.0681

The relationship between this function and the standard Marcum Q function is

 XLALMarcumQmodified(M, x, y) = XLALMarcumQ(M, sqrt(2. * x), sqrt(2. * y)).


The function is defined for $$1 \leq M$$, $$0 \leq x$$, $$0 \leq y$$. Additionally, the implementation here becomes inaccurate when $$M$$, $$x$$, or $$y$$ is $$\geq 10000$$.

Definition at line 626 of file XLALMarcumQ.c.

## ◆ XLALMarcumQ()

 double XLALMarcumQ ( double M, double a, double b )

The function defined by J. Marcum,

$Q_{M}(a, b) = \int_{b}^{\infty} x \left( \frac{x}{a} \right)^{M - 1} \exp \left( -\frac{x^{2} + a^{2}}{2} \right) I_{M - 1}(a x) \,\mathrm{d}x,$

where $$I_{M - 1}$$ is the modified Bessel function of order $$M - 1$$.

The CCDF for the random variable $$x$$ distributed according to the noncentral $$\chi^{2}$$ distribution with $$k$$ degrees-of-freedom and noncentrality parameter $$\lambda$$ is $$Q_{k/2}(\sqrt{\lambda}, \sqrt{x})$$.

The CCDF for the random variable $$x$$ distributed according to the Rice distribution with noncentrality parameter $$\nu$$ and width $$\sigma$$ is $$Q_{1}(\nu/\sigma, x/\sigma)$$.

The probability that a signal that would be seen in a two-phase matched filter with |SNR| $$\rho_{0}$$ is seen to have matched filter |SNR| $$\geq \rho$$ in stationary Gaussian noise is $$Q_{1}(\rho_{0}, \rho)$$.

This function is implemented by computing the modified form used by Gil et al.,

 XLALMarcumQ(M, a, b) = XLALMarcumQmodified(M, a * a / 2., b * b / 2.).

Definition at line 742 of file XLALMarcumQ.c.