next up previous contents
Next: Function: get_chirp_boundary Up: GRASP Routines: Template Bank Previous: Function: set_chirp_space   Contents


Function: chirp_metric

int chirp_metric(double x, double y, double *m);
This routine computes the coefficients of a local distance metric on the space of chirp templates, at a specified location in that space. It returns 0 upon successful completion, or 1 if the metric could not be computed at that point.

The arguments are:

x: Input. The $x$ coordinate of the specified point.

y: Input. The $y$ coordinate of the specified point.

m: Output. The array m[0..2] contains the three independent components of the local distance metric; see below.

Note that this routine uses the global parameter global_space, defined at the top of the
chirp_templates.c module. This parameter must be set by the routines set_chirp_space() or get_chirp_templates() before chirp_metric() can be called. The $x,y$ coordinate system used is the one defined in the global_space structure: it is to a (counterclockwise) rotation of the $\tau_0,\tau_1$ coordinate system by an angle of global_space.angle. The metric is computed by interpolating the grid of precomputed quadratic coefficients of the match function, stored in global_space.grid.

The local distance function is defined so that the match decreases to the value global_space.match at a proper distance of 1. That is, the unit of proper distance is defined to be the maximum template patch radius. The metric coefficients m[0..2] are related to the proper interval $ds^2$ by:

\begin{displaymath}
ds^2 = \hbox{\tt m[0]}dx^2 + \hbox{\tt m[1]}dxdy +
\hbox{\tt m[2]}dy^2 \; .
\end{displaymath} (9.34.216)

Note that $ds^2=1$ corresponds to the match being equal to $\mu$=global_space.match in equation [*]. We ignore the cubic components of the match function when dealing with the local distance metric. So we have:
\begin{displaymath}
\hbox{\tt global\_space.match} = 1 + \hbox{\tt coef[0]}dx^2
+ \hbox{\tt coef[1]}dxdy
+ \hbox{\tt coef[2]}dy^2
\end{displaymath} (9.34.217)

when $ds^2=1$. So the metric components m[] are related to the match function coefficients coef[] via:
\begin{displaymath}
\hbox{\tt m[i]} = \frac{\hbox{\tt coef[i]}}
{\hbox{\tt global\_space.match}}\;, \hbox{\tt i}=0 \ldots 2 \;.
\end{displaymath} (9.34.218)

This routine also checks to make sure that the resulting metric is positive definite, which should always be the case if the match function is locally paraboloidal (rather than a saddle).

Author: Teviet Creighton, teviet@tapir.caltech.edu


next up previous contents
Next: Function: get_chirp_boundary Up: GRASP Routines: Template Bank Previous: Function: set_chirp_space   Contents
Bruce Allen 2000-11-19