next up previous contents
Next: Function: multitaper_spectrum() Up: GRASP Routines: General purpose Previous: Multi-taper methods for spectral   Contents

Function: slepian_tapers()

0 int slepian_tapers(int num_points, int nwin, double *lam, float nwdt, double *tapers, double *tapsum)

This function computes and returns properly-normalized Slepian tapers. These tapers are normalized so that

\begin{displaymath}
\sum_{t=1}^N h_t^2 = N,
\end{displaymath} (16.20.331)

which is the Numerical Recipes convention for tapers (rather than the Percival and Walden convention for which the rhs is 1). It uses the method described in Percival and Walden [40] pages 386-387, finding the eigenvectors and eigenvalues of a tri-diagonal matrix. The arguments are:

num_points: Input. The number of points $N$ in the taper.
nwin: Input. The number of tapers computed.
lam: Output. Upon return, lam[0..nwin-1] contains the eigenvalues $\lambda$ of the tapers. Note that .
nwdt: Input. The (total sample time) $\times$ (frequency resolution bandwidth) product.
tapers: Output. Upon return: tapers[0..num_points-1] contains the first taper,
tapers[num_points..2*num_points-1] contains the second taper, and so on.
tapsum: Output. On return tapsum[0] contains the sum of the num_points values of the first taper, tapsum[1] contains the sum of the values of the second taper, and so on. Note that because the odd-index Slepian taper functions are odd, tapsum[1,3,5,...] would vanish if it were not for round-off and other numerical error.

This function will print a warning message if the condition $K< 2NW \Delta t$ is not satisfied (see Section [*]).

Figure: Here are five Slepian tapers computed with slepian_tapers(). The parameters are npoints=395, nwdt=4.0 and nwin=5.
\begin{figure}\index{colorpage}
\begin{center}
\epsfig{file=Figures/slepians.ps,angle=270,width=5in}\end{center}\end{figure}

Author: Adapted from the original code (Lees and Park) by Bruce Allen (ballen@dirac.phys.uwm.edu) and Adrian Ottewill (ottewill@relativity.ucd.ie).
Comments: There are a number of techniques for calculating the Slepian tapers. We have not extensively tested these routines, but they appear to work well. They make use of the standard EISPACK routines, translated from FORTRAN into C using f2c.


next up previous contents
Next: Function: multitaper_spectrum() Up: GRASP Routines: General purpose Previous: Multi-taper methods for spectral   Contents
Bruce Allen 2000-11-19