CoherentMetric.c File Reference

Author:
Creighton, T.Computes the parameter space metric for a coherent pulsar search.
More...

#include <math.h>
#include <lal/LALStdlib.h>
#include <lal/LALConstants.h>
#include <lal/AVFactories.h>
#include <lal/SeqFactories.h>
#include <lal/StackMetric.h>

Include dependency graph for CoherentMetric.c:

Go to the source code of this file.

Defines

#define COHERENTMETRICC_NPTS   100000

Functions

 NRCSID (COHERENTMETRICC,"$Id: CoherentMetric.c,v 1.9 2008/08/01 12:03:18 reinhard Exp $")
void LALCoherentMetric (LALStatus *stat, REAL8Vector *metric, REAL8Vector *lambda, MetricParamStruc *params)


Detailed Description

Author:
Creighton, T.Computes the parameter space metric for a coherent pulsar search.

D., Jolien Creighton

Date:
2000 - 2003
$Id: CoherentMetric.c,v 1.9 2008/08/01 12:03:18 reinhard Exp $ 

This function computes the metric $g_{\alpha\beta}(\mathbf{\lambda})$, as discussed in the header StackMetric.h, under the assumption that the search consists of scanning the Fourier power spectrum constructed from a single time interval $\Delta t$. The indecies $\alpha$ and $\beta$ are assumed to run from 0 to $n$, where $n$ is the total number of ``shape'' parameters.

The argument *metric is normally a vector of length $(n+1)(n+2)/2$ storing all non-redundant coefficients of $g_{\alpha\beta}$. The indexing scheme is as follows: Let us assume that $\alpha\geq\beta$. Then $g_{\alpha\beta} = g_{\beta\alpha} = $metric->data[$\beta + \alpha(\alpha+1)/2]$. If params->errors is nonzero, then *metric must be double this length, and LALCoherentMetric() will store metric components and their estimated uncertainty in alternate slots; i.e. the metric component $g_{\alpha\beta}=$metric->data[$2\beta+\alpha(\alpha+1)]$, and the uncertainty $s_{\alpha\beta}=$metric->data[$1+2\beta+\alpha(\alpha+1)]$.

The argument lambda is another vector, of length $n+1$, storing the components of $\mathbf{\lambda}=(\lambda^0,\ldots,\lambda^n)$ for the parameter space point at which the metric is being evaluated. The argument *params stores the remaining parameters for computing the metric, as given in the Structures section of StackMetric.h.

Algorithm
This routne simply computes the function given in Eq.(1) of header StackMetric.h. Most of the work is done by the function params->dtCanon(), which computes the value and parameter derivatives of the canonical time coordinate $\tau[t;\vec{\lambda}]$. Since the phase function is simply $\phi[t;\mathbf{\lambda}]=2\pi\lambda^0 \tau[t;\vec\lambda]$, where $\lambda^0=f_0$, the metric components are simply:

\begin{eqnarray} g_{00}(\mathbf{\lambda}) & = & 4\pi^2\bigg\langle\!(\tau[t;\vec\lambda])^2\bigg\rangle - 4\pi^2\bigg\langle\!\tau[t;\vec\lambda]\bigg\rangle^2 \; , \nonumber\\ g_{i0}(\mathbf{\lambda}) \;\; = \;\; g_{0i}(\mathbf{\lambda}) & = & 4\pi^2 f_0\bigg\langle\! \tau[t;\vec\lambda] \frac{\partial\tau[t;\vec\lambda]}{\partial\lambda^i} \bigg\rangle - 4\pi^2 f_0\bigg\langle\! \tau[t;\vec\lambda] \bigg\rangle \bigg\langle \frac{\partial\tau[t;\vec\lambda]}{\partial\lambda^i} \bigg\rangle \; , \nonumber\\ g_{ij}(\mathbf{\lambda}) & = & 4\pi^2 f_0^2\bigg\langle \frac{\partial\tau[t;\vec\lambda]}{\partial\lambda^i} \frac{\partial\tau[t;\vec\lambda]}{\partial\lambda^j} \bigg\rangle - 4\pi^2 f_0^2\bigg\langle \frac{\partial\tau[t;\vec\lambda]}{\partial\lambda^i} \bigg\rangle \bigg\langle \frac{\partial\tau[t;\vec\lambda]}{\partial\lambda^j} \bigg\rangle \; , \nonumber \end{eqnarray}

where the indecies $i$ and $j$ run from 1 to $n$.

In the rigorous definition of the metric, the angle brackets denote an average over the canonical time, not the detector time, so we have:

\begin{eqnarray} \bigg\langle\ldots\bigg\rangle & = & \frac{1}{\tau(t_\mathrm{start}+\Delta t)-\tau(t_\mathrm{start})} \int_{\tau(t_\mathrm{start})}^{\tau(t_\mathrm{start}+\Delta t)} \ldots\,d\tau \nonumber\\ & = & \frac{1}{\tau(t_\mathrm{start}+\Delta t)-\tau(t_\mathrm{start})} \int_{t_\mathrm{start}}^{t_\mathrm{start}+\Delta t} \ldots\frac{\partial\tau}{\partial t}\,dt \nonumber\\ & \approx & \frac{1}{\Delta t} \int_{t_\mathrm{start}}^{t_\mathrm{start}+\Delta t} \ldots\,dt \nonumber \; , \end{eqnarray}

where the approximation is good to order $\epsilon$ equal to the maximum difference between 1 and $\partial\tau/\partial t$. For an Earth-motion barycentred time coordinate, for instance, $\epsilon$ is of order $10^{-4}$ and the approximation is quite good. However, the current implementation of the metric algorithm uses the second, exact formula. If speed considerations become important, this is one obvious area for simplification.

At present, the time averaging is performed by evaluating $\tau$ and its derivatives at equally-spaced points over $\Delta t$ and applying a trapezoidal method; i.e.

\[ \frac{1}{T}\int_0^T F(t)\,dt \approx \frac{1}{N}\left(\frac{1}{2}F_0 + F_1 + F_2 + \ldots + F_{N-1} + \frac{1}{2}F_N \right) \; , \]

where $F_k=F(kT/N)$ are the $N+1$ sample points of the integrand. The number of points is a compiled-in constant. The error is on the order of $F''T^2/N^2$, where $F''$ is the second derivative of $F(t)$ at some point in the interval; we liberally estimate the error to be:

\[ \sigma = \max_{k\in\{1,\ldots,N-1\}} \left\{F_{k-1} - 2F_k + F_{k+1}\right\} \; . \]

Other more sophisticated integration techniques may be considered in future. To save on recomputing costs, the derivatives of $\tau$ at all times are stored in a large vector sequence.

Definition in file CoherentMetric.c.


Define Documentation

#define COHERENTMETRICC_NPTS   100000

Definition at line 149 of file CoherentMetric.c.


Function Documentation

NRCSID ( COHERENTMETRICC  ,
"$Id: CoherentMetric.  c,
v 1.9 2008/08/01 12:03:18 reinhard Exp $"   
)

void LALCoherentMetric ( LALStatus stat,
REAL8Vector metric,
REAL8Vector lambda,
MetricParamStruc params 
)

Definition at line 160 of file CoherentMetric.c.


Generated on Mon Oct 13 02:32:29 2008 for LAL by  doxygen 1.5.2