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 coordinate of the specified point.

y: Input. The 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 coordinate system used is the one defined in the global_space structure: it is to a (counterclockwise) rotation of the 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 by:

 (9.34.216)

Note that corresponds to the match being equal to =global_space.match in equation . We ignore the cubic components of the match function when dealing with the local distance metric. So we have:
 (9.34.217)

when . So the metric components m[] are related to the match function coefficients coef[] via:
 (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: Function: get_chirp_boundary Up: GRASP Routines: Template Bank Previous: Function: set_chirp_space   Contents
Bruce Allen 2000-11-19