next up previous contents
Next: Function: find_ring() Up: GRASP Routines: Black hole Previous: Function: qn_filter()   Contents

Function: qn_normalize()

void qn_normalize(float *u, float *q, float *r, int n, float *norm)
Given a filter, $\tilde{q}(f)$, and twice the inverse power spectrum, $r(f)$, this routine generates a normalized template $\tilde{u}(f)$ for which $1=\langle N^2\rangle\to\frac{1}{2}\texttt{correlate(\ldots,u,u,r,n)}$. The arguments are:
u: Output. The array u[0..n-1] contains the positive frequency part of the complex template function $\tilde{u}(f)$, packed as described in the Numerical Recipes routine realft().
q: Input. The array q[0..n-1] contains the positive frequency part of the complex filter function $\tilde{q}(f)$, also packed as described in the Numerical Recipes routine realft().
r: Input. The array r[0..n/2] contains the values of the real function $r(f)=2/S_h(\vert f\vert)$ used as a weight in the normalization. The array elements are arranged in order of increasing frequency from the DC component at subscript 0 to the Nyquist frequency at subscript n/2.
n: Input. The total length of the arrays u and q. Must be even.
norm: Output. The normalization constant, $\alpha$, defined below.

Given a filter, $q(t)$, this routine computes a template, $u(t)=\alpha q(t)$, which is normalized so that $(u,u)=2$, where $(\cdot,\cdot)$ is the inner product defined by equation ([*]). Thus, the normalization constant is given by

\begin{displaymath}
\frac{1}{\alpha^2} = \frac{1}{2}(q,q).
\end{displaymath} (8.11.184)

Author: Jolien Creighton, jolien@tapir.caltech.edu


next up previous contents
Next: Function: find_ring() Up: GRASP Routines: Black hole Previous: Function: qn_filter()   Contents
Bruce Allen 2000-11-19