StackMetric.h

Go to the documentation of this file.
00001 /*
00002 *  Copyright (C) 2007 Jolien Creighton, Reinhard Prix, Teviet Creighton
00003 *
00004 *  This program is free software; you can redistribute it and/or modify
00005 *  it under the terms of the GNU General Public License as published by
00006 *  the Free Software Foundation; either version 2 of the License, or
00007 *  (at your option) any later version.
00008 *
00009 *  This program is distributed in the hope that it will be useful,
00010 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 *  GNU General Public License for more details.
00013 *
00014 *  You should have received a copy of the GNU General Public License
00015 *  along with with program; see the file COPYING. If not, write to the
00016 *  Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00017 *  MA  02111-1307  USA
00018 */
00019 
00020 /**
00021  * \author Creighton, T. D.
00022  * \date 2000 -- 2003
00023  * \file 
00024  * \ingroup PulsarMetric
00025  * \brief Provides routines to compute parameter-space metrics for coherent or
00026  * stacked pulsar searches.
00027  *
00028  * $Id: StackMetric.h,v 1.11 2007/06/08 14:41:50 bema Exp $
00029  *
00030  * \par Description 
00031  * 
00032  This header covers routines that determine the metric
00033  coefficients for the mismatch function (ambiguity function) on the
00034  parameter space for a pulsar search.  The assumed search method is
00035  stacking one or more Fourier power spectra, after some suitable
00036  demodulation.
00037  
00038  The method for determining the parameter metric is discussed in detail
00039  in Sec.~II of \ref Brady_P2000; we present the key results here in
00040  brief.  We assume that a model waveform in our search is described by
00041  an overall frequency scale \f$f_0\f$, and by some modulation about that
00042  frequency described by ``shape'' parameters
00043  \f$\vec{\lambda}=(\lambda^1,\ldots,\lambda^n)\f$, such that the
00044  parameterized phase of the waveform is \f$\phi[t;\mathbf{\lambda}] = 2\pi
00045  f_0\tau[t;\vec{\lambda}]\f$.  Here \f$\mathbf{\lambda} = (\lambda^0,\vec{\lambda})
00046  = (f_0,\lambda^1,\ldots,\lambda^n)\f$ represents the total set of
00047  parameters we must search over, and \f$\tau[t;\vec{\lambda}]\f$ is a
00048  canonical time coordinate describing the shape of the waveform.
00049  
00050  A (local) maximum in detected power \f$P\f$ occurs if a signal is filtered
00051  (or demodulated in time and the Fourier spectrum is sampled) using a
00052  phase model that matches the true phase of the signal.  If the
00053  parameters \f$\mathbf{\lambda}\f$ do not match the true parameters of the
00054  signal, then the detected power will be degraded.  The fractional
00055  power loss \f$\Delta P/P\f$ thus has a (local) minimum of 0 for matched
00056  parameters and increases for mismatched parameters; it can be thought
00057  of as describing a distance between the two (nearby) parameter sets.
00058  The \em metric of this distance measure is simply the set of
00059  quadratic coefficients of the Taylor expansion of \f$\Delta P/P\f$ about
00060  its minimum.
00061  
00062  Clearly the power will degrade rapidly with variation in some
00063  parameter \f$\lambda^\alpha\f$ if the phase function \f$\phi\f$ depends
00064  strongly on that parameter.  It turns out that if the detected power
00065  is computed from a coherent power spectrum of a time interval \f$\Delta t\f$, 
00066  then the metric components are given simply by the covariances of
00067  the phase derivatives \f$\partial\phi/\partial\lambda^\alpha\f$ over the
00068  time interval: \anchor eq_gab_phi
00069  \f{equation}
00070  g_{\alpha\beta}(\mathbf{\lambda}) =
00071  \left\langle
00072  \frac{\partial\phi[t;\mathbf{\lambda}]}{\partial\lambda^\alpha}
00073  \frac{\partial\phi[t;\mathbf{\lambda}]}{\partial\lambda^\beta}
00074  \right\rangle
00075  -
00076  \left\langle
00077  \frac{\partial\phi[t;\mathbf{\lambda}]}{\partial\lambda^\alpha}
00078  \right\rangle
00079  \left\langle
00080  \frac{\partial\phi[t;\mathbf{\lambda}]}{\partial\lambda^\beta}
00081  \right\rangle \; ,
00082  \f} 
00083  where \f$\langle\ldots\rangle\f$ denotes a time average over the interval
00084  \f$\Delta t\f$, and \f$\alpha\f$ and \f$\beta\f$ are indecies running from 0 to
00085  \f$n\f$.  The partial derivatives are evaluated at the point \f$\mathbf{\lambda}\f$
00086  in parameter space.  If instead the detected power is computed from
00087  the sum of several power spectra computed from separate time intervals
00088  (of the same length), then the overall metric is the \em average of
00089  the metrics from each time interval.
00090  
00091  When power spectra are computed using fast Fourier transforms, the
00092  entire frequency band from DC to Nyquist is computed at once; one then
00093  scans all frequencies for significant peaks.  In this case one is
00094  concerned with how the peak power (maximized over frequency) is
00095  reduced by mismatch in the remaining ``shape'' parameters
00096  \f$\vec{\lambda}\f$.  This is given by the the \em projected metric
00097  \f$\gamma_{ij}(\vec{\lambda})\f$, where \f$i\f$ and \f$j\f$ run from 1 to \f$n\f$:
00098  \anchor eq_gij_gab
00099  \f{equation}
00100  \gamma_{ij}(\vec{\lambda}) = \left[g_{ij}-\frac{g_{0i}g_{0j}}{g_{00}}
00101  \right]_{\lambda^0=f_\mathrm{max}} \; .
00102  \f}
00103  Here \f$f_\mathrm{max}\f$ is the highest-frequency signal expected to be
00104  present, which ensures that, for lower-frequency signals,
00105  \f$\gamma_{ij}\f$ will \em overestimate the detection scheme's
00106  sensitivity to the ``shape'' parameters.
00107 */
00108 
00109 #ifndef _STACKMETRIC_H
00110 #define _STACKMETRIC_H
00111 
00112 #include <lal/LALStdlib.h>
00113 #include <lal/PulsarTimes.h>
00114 
00115 #ifdef  __cplusplus
00116 extern "C" {
00117 #endif
00118 
00119 NRCSID(STACKMETRICH,"$Id: StackMetric.h,v 1.11 2007/06/08 14:41:50 bema Exp $");
00120 
00121 
00122 /** @{ \name Error conditions */
00123 #define STACKMETRICH_ENUL 1
00124 #define STACKMETRICH_EBAD 2
00125 
00126 #define STACKMETRICH_MSGENUL "Null pointer"
00127 #define STACKMETRICH_MSGEBAD "Bad parameter values"
00128 /* @} */
00129 
00130 /** This structure stores and passes parameters for computing a
00131     parameter-space metric.  It points to the canonical time function used
00132     to compute the metric and to the parameters required by this function.
00133     In addition, this structure must indicate the timespan over which the
00134     timing differences accumulate, and whether this accumulation is
00135     coherent or divided into stacks which are summed in power.  
00136 */
00137 typedef struct tagMetricParamStruc{
00138   void (*dtCanon)(LALStatus *, REAL8Vector *, REAL8Vector *, PulsarTimesParamStruc * ); /**< The function to compute the canonical 
00139                                                                                           * time coordinate and its derivatives. */
00140   PulsarTimesParamStruc *constants;     /**< The constant parameters used by *dt(). */
00141   REAL8 start;                          /**< Start time of search, measured relative to constants->epoch. */
00142   REAL8 deltaT;                         /**< Length of each stack, in s. */
00143   UINT4 n;                              /**< Number of stacks. */
00144   BOOLEAN errors;                       /**< Whether to estimate errors in metric. */
00145 } MetricParamStruc;
00146 
00147 
00148 void
00149 LALCoherentMetric( LALStatus *,
00150                    REAL8Vector *metric,
00151                    REAL8Vector *lambda,
00152                    MetricParamStruc *params );
00153 
00154 void
00155 LALStackMetric( LALStatus *,
00156                 REAL8Vector *metric,
00157                 REAL8Vector *lambda,
00158                 MetricParamStruc *params );
00159 
00160 void
00161 LALProjectMetric( LALStatus *, REAL8Vector *metric, BOOLEAN errors );
00162 
00163 #ifdef  __cplusplus
00164 }
00165 #endif
00166 
00167 #endif /* _STACKMETRIC_H */

Generated on Tue Oct 7 02:40:28 2008 for LAL by  doxygen 1.5.2