### 4.6 Algorithms to calculate the -statistic

#### 4.6.1 The two-step procedure

In order to detect signals we search for threshold crossings of the -statistic over the intrinsic parameter space. Once we have a threshold crossing we need to find the precise location of the maximum of in order to estimate accurately the parameters of the signal. A satisfactory procedure is the two-step procedure. The first step is a coarse search where we evaluate on a coarse grid in parameter space and locate threshold crossings. The second step, called a fine search, is a refinement around the region of parameter space where the maximum identified by the coarse search is located.

There are two methods to perform the fine search. One is to refine the grid around the threshold crossing found by the coarse search [94, 92, 134, 127], and the other is to use an optimization routine to find the maximum of  [65, 78]. As initial values to the optimization routine we input the values of the parameters found by the coarse search. There are many maximization algorithms available. One useful method is the Nelder–Mead algorithm [79], which does not require computation of the derivatives of the function being maximized.

#### 4.6.2 Evaluation of the -statistic

Usually the grid in parameter space is very large and it is important to calculate the optimum statistic as efficiently as possible. In special cases the -statistic given by Eq. (62) can be further simplified. For example, in the case of coalescing binaries can be expressed in terms of convolutions that depend on the difference between the time-of-arrival (TOA) of the signal and the TOA parameter of the filter. Such convolutions can be efficiently computed using FFTs. For continuous sources, like gravitational waves from rotating neutron stars observed by ground-based detectors [65] or gravitational waves form stellar mass binaries observed by space-borne detectors [78], the detection statistic involves integrals of the general form

where are the intrinsic parameters excluding the frequency parameter , is the amplitude modulation function, and the phase modulation function. The amplitude modulation function is slowly varying compared to the exponential terms in the integral (121). We see that the integral (121) can be interpreted as a Fourier transform (and computed efficiently with an FFT), if and if does not depend on the frequency . In the long-wavelength approximation the amplitude function does not depend on the frequency. In this case, Eq. (121) can be converted to a Fourier transform by introducing a new time variable  [124],
Thus, in order to compute the integral (121), for each set of the intrinsic parameters we multiply the data by the amplitude modulation function , resample according to Eq. (122), and perform the FFT. In the case of LISA detector data when the amplitude modulation depends on frequency we can divide the data into several band-passed data sets, choosing the bandwidth for each set to be sufficiently small so that the change of is small over the band. In the integral (121) we can then use as the value of the frequency in the amplitude and phase modulation function the maximum frequency of the band of the signal (see [78] for details).