PHYSICAL REVIEW D 85, 122006 (2012) FINDCHIRP: An algorithm for detection of gravitational waves from inspiraling compact binaries

Bruce Allen,1,2 Warren G. Anderson,1 Patrick R. Brady,1 Duncan A. Brown,1,3,4,5 and Jolien D. E. Creighton1 1Department of Physics, University of Wisconsin–Milwaukee, P.O. Box 413, Milwaukee, Wisconsin 53201, USA 2Max-Planck-Institut fu¨r Gravitationsphysik (Albert-Einstein-Institut), Callinstraße 38, D-30167 Hannover, Germany 3Theoretical Astrophysics 130-33, California Institute of Technology, Pasadena, California 91125, USA 4LIGO Laboratory, California Institute of Technology, Pasadena, California 91125, USA 5Department of Physics, Syracuse University, Syracuse, New York 13244, USA (Received 4 August 2011; published 19 June 2012) Matched-filter searches for gravitational waves from coalescing compact binaries by the LIGO Scientific Collaboration use the FINDCHIRP algorithm: an implementation of the optimal filter with innovations to account for unknown parameters and to improve performance on detector data that has nonstationary and non-Gaussian artifacts. We provide details on the FINDCHIRP algorithm as used in the search for subsolar mass binaries, binary neutron stars, neutron starblack hole binaries, and binary black holes.

DOI: 10.1103/PhysRevD.85.122006 PACS numbers: 06.20.Dk, 04.80.Nn

The FINDCHIRP algorithm is the implementation of I. INTRODUCTION matched filtering used by the LIGO Scientific For the detection of a known signal it is well-known that, Collaboration (LSC) and Virgo’s offline searches for gravi- in the presence of stationary and Gaussian , the use of tational waves from low-mass (2M

1550-7998=2012=85(12)=122006(19) 122006-1 Ó 2012 American Physical Society ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012) particular ‘‘science run’’ of the LIGO and/or Virgo detec- Fourier transform (FFT) algorithm. Thus, it is important tors. We refer to Refs. [14–16,18,19,21–25,30–32] for to write the most computationally demanding terms in the descriptions of the pipelines that have used the algorithms form of Eq. (2.3) so that this computation can be done most described here. This paper is not intended to provide efficiently. documentation for our implementation of the FINDCHIRP Throughout this paper we will reserve the indices j to be algorithm. (This can be found in Refs. [33,34].) Rather, this a time index (which labels a particular time sample), k to paper is intended to describe the algorithm itself. be a frequency index (which labels a particular frequency bin), m to be an index over a bank of templates, and n to be II. NOTATION an index over analysis segments. Thus, for example, the quantity z ½j will be the jth sample of analysis segment Our conventions for the Fourier transform are as follows. m;n n of the matched-filter output for the mth template, and For continuous quantities, the forward and inverse Fourier z~ ½k will be the kth frequency bin of the Fourier trans- transforms are given by m;n Z form of the matched-filter output for the same template and 1 analysis segment. x~ðfÞ¼ xðtÞe2iftdt; (2.1a) 1 and III. WAVEFORM Z 1 For first-generation gravitational-wave detectors (such xðtÞ¼ x~ðfÞe2iftdf; (2.1b) 1 as Initial LIGO), the gravitational-wave signal from a compact binary inspiral waveform can be accurately respectively, so x~ðfÞ is the Fourier transform of xðtÞ. modeled by the restricted post-Newtonian waveform [35] If these continuous quantities are discretized so that below approximately M 12M [36] for nonspinning x½j¼xðjtÞ where 1=t is the sampling rate and bodies. At higher masses, resummation techniques such j ¼ 0; ...;N 1 are N sample points, then the discrete as the effective one body (EOB) waveforms better repro- approximation to the forward and inverse Fourier trans- duce the waveforms computed by numerically solving the forms are full nonlinear Einstein equations [37,38]. In either case, the NX1 two polarizations of the gravitational-wave produced by 2ijk=N x~½k¼t x½je ; (2.2a) such a system exhibit a monotonically-increasing fre- j¼0 quency and amplitude as the orbital motion radiates away NX1 energy and decays. The waveform, often called a chirp x½j¼f x~½ke2ijk=N; (2.2b) waveform, is given for t

122006-2 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) c however for a detection algorithm, the formal definition of detector, t0, and on the polarization angle [41]. The the coalescence time is not critical, as long as any offset antenna response functions are very nearly constant in caused by the choice of coalescence time is constant time over the duration of the short inspiral signal. Thus between the detectors in the network. For restricted post- the strain on a particular detector can be written as Newtonian waveforms, we define t to be the time at which c GM t t 1=4 the gravitational-wave frequency becomes infinite within hðtÞ¼ 0 2 M 3 the post-Newtonian formalism. The Initial LIGO science c Deff 5G =c runs (S1–S5) used the second-post-Newtonian waveform, cos½20 þ 2ðt t0; M; Þ; (3.3a) whereas the Enhanced LIGO (S6) analysis uses post- Newtonian waveforms computed to 3.5th order. In this where 0 is the termination phase which is related to the coalescence phase by paper we illustrate the FINDCHIRP algorithm using second-order post-Newtonian waveforms. The extension F 2 cos ¼ of the algorithm to EOB waveforms (and other waveforms 20 2c arctan 2 (3.3b) Fþ 1 þ cos computed in the time-domain) is described in Appendix A and the extension to higher post-Newtonian orders is de- and scribed in Appendix E. We assume that the binary system’s 1 þ cos2 2 1=2 D ¼ D F2 þ F2 cos2 (3.3c) center-of-mass is at rest with respect to the detector frame eff þ 2 (otherwise this motion ‘‘redshifts’’ the binary’s masses). We also assume that the time that the signal is in the is the effective distance of the source. The effective dis- detector’s sensitive bandwidth is short compared to 24h, tance of the source is related to the true distance of the so that the detector does not change orientation signifi- source by several geometrical factors that relate the source cantly as the earth rotates. orientation to the detector orientation. Because the location The gravitational-wave strain induced in a particular and orientation of the source are not likely to be known detector depends on the detector’s antenna response to when filtering data from a single detector, it is convenient the two polarizations of the gravitational waveform. The to combine the geometric factors with the true distance to induced strain on the detector is given by give a single observable, the effective distance. For an opti- mally oriented source (one that is directly overhead and is c hðtÞ¼Fþð; ; ;tÞhþðt þ tc t0Þ orbiting in the plane of the sky) the effective distance þ F ð; ; c ;tÞh ðt þ t t Þ (3.2) is equal to the true distance; for sub-optimally-oriented c 0 sources the effective distance is greater than the true dis- where t0 is the termination time (the time at the detector at tance. (The location and distance can be estimated using which the coalescence occurs, i.e., the detector time when three or more detectors, but we do not consider this here.) the gravitational-wave frequency, according to restricted Equation (3.3a) gives a waveform that is used as a post-Newtonian approximation, becomes infinite), t0 tc template for a matched filter. Since FINDCHIRP implements is the propogation time from the source to the detector, and the matched filter via a FFT correlation, it is beneficial to Fþ and F are the antenna response functions for the write the Fourier transform of the template and implement incident signal; these functions depend on the location it directly rather than taking the FFT of the time-domain of the source with respect to the reference frame of the waveform of Eq. (3.3a). A frequency-domain version of the detector, which is described by the right ascension and waveform can be obtained via the stationary phase declination of the source, (, ), the arrival time at the approximation [6,42,66]. For f>0 one has

5 1=2 GM GM GM 7=6 1 Mpc ~ iðf;M;Þ A 7=6 iðf;M;Þ hðfÞ¼ 3 2 3 f e ¼ 1 MpcðM; Þf e ; (3.4a) 24 c c Deff c Deff where

5 1=2 GM =c2 GM 1=6 M 5=6 A ðM; Þ¼ ; (3.4b) 1 Mpc 3 M 24 1 Mpc c 3 3715 55 ðf; M; Þ¼2ft 2 =4 þ v5 þ þ v3 0 0 128 756 9 15 293 365 27 145 3085 16v2 þ þ þ 2 v1 ; (3.4c) 508 032 504 72 GM 1=3 v ¼ f (3.4d) c3

122006-3 ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012) and has been written to second post-Newtonian order. velocities that the higher-order corrections to the post- For f<0 one has h~ðfÞ¼h~ðfÞ. This template wave- Newtonian waveform will become significant. We regard form has been expressed in terms of several factors: (1) An Eq. (3.6) as an upper limit on the frequency that can be overall distance factor involving the effective distance, regarded as representing an ‘‘inspiral’’ waveform—not as Deff.Foratemplate waveform, we are free to choose this the frequency to which we can trust our inspiral waveform effective distance as convenient, and in the FINDCHIRP code templates. With this caveat, we nevertheless use this as a it is chosen to be 1 Mpc. (2) A constant (in frequency) high-frequency cutoff for the inspiral template waveforms A 1=6 factor 1 MpcðM; Þ, which has dimensions of ðtimeÞ , (should this frequency be less than the Nyquist frequency that depends only on the total and reduced masses, M and fNyquist ¼ 1=2t of the data, where t is the sample rate). , of the particular system. (3) The factor f7=6 which For the lowest mass binary systems (binary neutron stars or does not depend on the system parameters. And (4) a subsolar mass black holes) the post-Newtonian template phasing factor involving the phase ðf; M; Þ which is waveforms are reliable within the sensitive band of Initial both frequency-dependent and dependent on the system’s LIGO so the precise choice of the high-frequency cutoff is total and reduced masses. We will see below that an not important [36]. For higher-mass systems (containing efficient implementation of the matched filter will make black holes) the effects of higher-order corrections to use of this factorization of the stationary phase template. the post-Newtonian waveform can be significant. For In order to construct a waveform template we need to frequency-domain templates, this can be addressed by the know how long the binary system will radiate gravitation use of ‘‘pseudo post-Newtonian’’ terms in the waveform waves in the sensitivity band of LIGO. A true inspiral chirp phasing and/or different choices of the high-frequency waveform would last tens of Myr, but the amount of time cutoff [44,45]. When using time-domain EOB waveforms that the binary system spends radiating gravitational waves tuned to numerical relativity simulations, the upper- with a frequency above some low-frequency cutoff flow is frequency cutoff is set by the frequency of the fundamental short: the duration of the chirp or chirp time from a given l ¼ 2, m ¼ 2 quasinormal ringdown mode [46]. In this frequency flow is given to second post-Newtonian order by case the FINDCHIRP algorithm uses the minimum of this Eq. (3.3) of Ref. [43]as or the Nyquist frequency. 5 GM 8 743 11 6 32 5 Tchirp ¼ v þ þ v v IV. MATCHED FILTER 256 c3 low 252 3 low 5 low 3 058 673 5429 617 The matched filter is the optimal filter for detecting a þ þ þ 2 v4 (3.5a) 508 032 504 72 low known waveform in stationary Gaussian noise. Suppose that nðtÞ is a stationary Gaussian noise process with where one-sided power SnðfÞ defined by 0 1 0 GM 1=3 hn~ðfÞn~ ðf Þi ¼ 2SnðjfjÞðf f Þ. Then the matched-filter vlow ¼ flow : (3.5b) ð Þ c3 output of a data stream s t —which now may contain detector noise alone, sðtÞ¼nðtÞ, or a signal in addition For the Initial and Enhanced LIGO detectors, FINDCHIRP to the noise, sðtÞ¼nðtÞþhðtÞ—with a filter template uses flow ¼ 40 Hz. Higher-mass systems coalesce much htemplateðtÞ is more quickly (from a given f ) than lower mass systems. low Z ~ A search for low-mass systems, such as primordial black 1 s~ðfÞhtemplateðfÞ xðt0Þ¼2 df holes of mass 0:1M, can require very long waveform 1 SnðfÞ templates (of the order of tens of minutes) which can result Z ~ 1 s~ðfÞ½htemplateðfÞt ¼0 in a significant computational burden. ¼ 4< 0 e2ift0 df; (4.1) There is also a high-frequency cutoff for the inspiral 0 SnðfÞ waveform. Physically, at some high frequency a binary where the signal htemplateðtÞ is implicitly taken to depend on system will terminate its secular inspiral and the orbit a termination time t0 as in (3.3a). Notice that the use of a will decay on a dynamical time scale, though identifying FFT will allow one to search for all possible termination the precise frequency is difficult except in the extreme times t0 efficiently. However, the waveforms described mass ratio limit ! 0. In this limit, that of a test mass above have additional unknown parameters. These are orbiting a Schwarzschild black hole, the frequency is (i) the amplitude (or effective distance to the source), known as the innermost stable circular orbit or ISCO. (ii) the coalescence phase, and (iii) the binary companion The ISCO gravitational-wave frequency is masses. The amplitude simply sets a scale for the matched- 3 filter output, and is unimportant for matched-filter tem- ffiffiffic fisco ¼ p : (3.6) plates (these can be normalized). 6 6GM The ‘‘best match’’ unknown phase 0 can be found However, before reaching this frequency, the binary by maximizing xðt0Þ over 0. xðt0Þ can be written as components will be orbiting with sufficiently high orbital xðt0Þ¼xreðt0Þ cos20 þ ximðt0Þ sin20 where xre;imðt0Þ

122006-4 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) are (respectively) the values of (4.1) with 0 ¼ 0, and with V. DETECTOR OUTPUT AND CALIBRATION 0 ¼ 0 and Re ! Im. Setting the derivative with regard to 2 LIGO records several interferometer channels. The 0 to vanish, one finds that at the maximum x ðt0Þj ^ ¼ 0 gravitational-wave channel (the primary channel for 2 2 ^ xreðt0Þþximðt0Þ at 20 ¼ argðxre þ iximÞ. Hence this searching for gravitational waves) is formed from the out- maximum value is given by the (more computationally put of a photo-diode at the antisymmetric (or ‘‘dark’’) port efficient) modulus of the complex filter output of the interferometer [47]. This output is used as an error signal for a feedback loop that is needed to keep various zðt0Þ¼xreðt0Þþiximðt0Þ optical cavities in the interferometer in resonance or Z ~ ‘‘in-lock.’’ Hence it is often called the error signal eðtÞ. 1 s~ðfÞ½htemplateðfÞ0 ¼ 4 e2ift0 df (4.2) The error signal is not an exact measure of the differential 0 SnðfÞ arm displacements of the interferometer so it does not correspond to the gravitational-wave strain. Rather it is where ½h~ ðfÞ ¼½h~ ðfÞ . This tem- template 0 template t0¼0;0¼0 part of a linear feedback loop that controls the position plate is obtained from Eq. (3.4) by deleting the first two of the interferometer mirrors. A gravitational-wave terms on the right-hand side of (3.4c). strain-equivalent output, called sðtÞ above, can be obtained To search over all the possible binary companion masses from the error signal eðtÞ via a linear filter. This is it is necessary to construct a bank of matched-filter tem- called calibration. Details on the calibration of the LIGO plates laid out on the ðm1;m2Þ plane sufficiently finely that interferometers can be found in [48,49]. In the frequency- any true system masses will produce a waveform that domain, the process of calibration can be thought of as is close enough to the nearest template. There are well- multiplying the error signal by a complex response func- known strategies for constructing such a bank [8–11]. tion, RðfÞ For our purposes, we shall simply introduce an index m ¼ 0; ...;NT 1 labeling the particular waveform s~ðfÞ¼RðfÞe~ðfÞ: (5.1) template hmðtÞ in the bank of NT waveform templates. By convention, the waveform templates are constructed The FINDCHIRP algorithm can analyze either calibrated data sðtÞ or it can calibrate the error signal eðtÞ in the frequency- for systems with an effective distance of Deff ¼ 1 Mpc.To construct a signal-to-noise ratio, a normalization constant domain. With time-domain calibrated data now available, for each template is computed it is more convenient to use sðtÞ so in this paper we will present the algorithm in terms of strain data rather than the Z 1 j~ ð Þj2 error signal. 2 h1 Mpc;m f m ¼ 4 df: (4.3) The detector output is not a continuous signal but rather 0 SnðfÞ a time series of samples of sðtÞ taken with a sample rate of 1=t ¼ 16384 Hz where t is the sampling interval. The quantity is a measure of the sensitivity of the m Thus, rather than sðtÞ, the input to FINDCHIRP is a discretely instrument. For sðtÞ that is purely stationary and sampled set of values s½j¼sðtstart þ jtÞ for some large Gaussian noise, h

122006-5 ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012) consists of the points s½j for j ¼ 0; ...;N 1, the second problems, the strain can simply be rescaled by a consists of the points j ¼ ; ...; þ N 1 where is dynamic-range factor . If strain data is input, it is imme- known as the stride, and so on until the last segment which diately scaled by the factor ,sos½j is used rather than consists of the points j ¼ðNS 1Þ; ...; ðNS 1Þ þ s½j. If the error signal is input, the dynamic-range factor is N 1. Note that applied to the response function instead, so that R is used rather than R. Choosing a value of 1020 will keep all T ¼½ðN 1Þ þ Nt: (5.2) block S quantities within representable single-precision IEEE 781 All of the LSC’s searches choose to overlap the segments floating-point numbers. It is important to keep track of the by 50% so that the stride is ¼ N=2 (and N is always factor to make sure it cancels out in all of the results. even) and hence there are NS ¼ 2ðTblock=TÞ1 segments. Essentially this is achieved by multiplying all quantities The values of Tblock, T, , and NS must be commensurate with ‘‘units’’ of strain by the factor within the implemen- so that these relations hold. Values typically used in the tation of the FINDCHIRP algorithm. Thus, in addition to the LIGO and/or Virgo analyses for low-mass binaries strain data or response function, the signal template must are Tblock ¼ 2048 s, N ¼ 256 s=t, NS ¼ 15, and ¼ also be scaled by . On conventional CPUs, storing quan- 128 s=t. tities in single-precision reduces the performance cost of The FINDCHIRP algorithm (4.2) implements the matched moving quantities to and from memory (which can be filter by an FFT correlation. Thus the discrete Fourier dominant). In addition, some CPUs and most graphics transforms of the individual data segments, n, processing units (GPUs) perform single-precision arith- metic at least twice as fast as double-precision arithmetic. NX1 2ijk=N Therefore it is advantageous to use floating-point (single- s~n½k¼t s½j þ ne (5.3) j¼0 precision) operations for the FINDCHIRP algorithm. If frequency-domain calibration of the error signal is for n ¼ 0; ...;NS 1 are constructed via an FFT. Here desired (e.g., if the effects of calibration error are being k is a frequency index that runs from 0 to N 1. The k ¼ 0 investigated), the following replacements need to be made component represents the DC component (f ¼ 0) which in the formulas in this paper: s~½k!R½ke~½k, S½k! is purely real, the components 0

122006-6 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) by FINDCHIRP. We call this average power spectrum overly sensitive to a single glitch (or strong gravitational- the mean average power spectrum. If uncalibrated data wave signal). en½j is being used rather than sn½j, then the power spec- The FINDCHIRP algorithm can compute the mean average trum of the detector strain-equivalent noise is related to spectrum, the median average spectrum, or the median- the power spectrum of the uncalibrated data by S½k¼ mean average spectrum. Traditionally the median average 2 jR½kj Se½k. spectrum has been used though we expect that the median- The problem with using Welch’s method for power mean average spectrum will be adopted in the future. spectral estimation is that for detector noise containing significant excursions from ‘‘normal’’ behavior (due to VII. DISCRETE MATCHED FILTER instrumental glitches or unexpectedly strong gravitational- wave ), the mean used in Eq. (6.1) can be signifi- The discretized version of Eq. (4.2) is simply cantly biased by the excursion. An alternative that is bðNX1Þ=2c s~ ½kh~ ½k pursued in the FINDCHIRP algorithm is to replace the n 1 Mpc;m 2ijk=N zn;m½j¼4f 2 e ; (7.1) mean in Eq. (6.1) by a median, which is a more robust k¼1 S½k estimator of the average power spectrum ~ where in h both t0 and 0 are set to zero. Element j of 2S½k¼1 median f2P ½k;2P ½k; ...;2P ½kg; 0 1 NS1 zn;m½j corresponds to the matched-filter output (4.2) for (6.3a) time t0 ¼ tstart þðn þ jÞt where tstart is the start time of the block of data analyzed and is the stride. Note that the where is a required correction factor. When ¼ 1, the sum is over the positive frequencies only, and DC and expectation value of the median is not equal to the expec- Nyquist frequencies are excluded. (The interferometer is tation value of the mean in the case of Gaussian noise; AC-coupled so it has no sensitivity at the DC component; hence the factor is introduced to ensure that the same similarly, the instrument has very little sensitivity at the power spectrum results for Gaussian noise. In Ref. [53] Nyquist-frequency so rejecting this frequency bin has very and in Appendix B it is shown that if the set fP0½k; little effect.) This inverse Fourier transform can be P ½k; ;P ½kg 1 ... NS1 are independent exponentially- performed by the complex reverse DFT (as opposed to a distributed random variables (as expected for Gaussian half-complex-to-real reverse DFT) of the quantity noise) then z~n;m½kf XNS ð1Þnþ1 8 ¼ ðodd NSÞ (6.3b) > 0 k n¼1 < ~ s~n½kh1 Mpc;m½k is the correction factor. We call this median estimate of the ¼ > 4f klow k bðN 1Þ=2c > 2S½k average power spectrum, corrected by the factor , the :> median average spectrum. 0 bðN 1Þ=2c

122006-7 ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012) ~ h1 Mpc;m½k is generated in the frequency domain via the truncation. Our goal is to limit the amount of the matched stationary phase approximation, we can imagine that it filter that is corrupted due to the of the data came from a time-domain signal h1 Mpc;m½j of duration with the inverse power spectrum. To do this we will begin with the time-domain version of the frequency-domain Tchirp;m that is given by Eq. (3.5a) for the low-frequency quantity S1½k, truncate it so that it has finite duration, cutoff flow. By convention of template generation, the time of coalescence corresponds to j ¼ 0. Thus, the entire chirp and then find the frequency-domain quantity Q½k corre- waveform is nonzero only from t ¼ t T to t ¼ t . sponding to this truncated time-domain filter. Note that 0 chirp;m 0 S1½k is real and non-negative, and we want Q½k to share Because the discrete Fourier transform presumes that the these properties. First, construct the time-domain quantity data is periodic, this is represented by having the chirp qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi begin at point j ¼ N Tchirp;m=t and end at point j ¼ NX1 1 2 2ijk=N N 1. Thus h1 Mpc;m½j¼0 for j ¼ 0; ...;N 1 q½j¼f 1=ð S½kÞ e ; (7.3a) k¼0 Tchirp;m=t. The correlation of h1 Mpc;m½j with the inter- ferometer data will involve multiplying the Tchirp;m=t which can be done via a half-complex-to-real reverse FFT. points of data before a given time with the Tchirp;m=t Since S½k is real and symmetric (S½k¼S½N k), q½j points of the chirp. When this is performed by the FFT will be real and symmetric (so that q½j¼q½N j). This correlation, this means that the first Tchirp;m=t points of quantity will be nonzero for all N points, though strongly- the matched-filter output involve data at times before the peaked near j ¼ 0 and j ¼ N 1. Now create a truncated start of the segment, which are interpreted as the data quantity qT½j with a total duration of Tspec (Tspec=2 at the values at the end of the segment (since the FFT assumes beginning and Tspec=2 at the end) that the data is periodic). Hence the first Tchirp;m=t points 8 > 1 are of the correlation are invalid and must be discarded. <> q½j 0 j0 Tspec=2t j chirp;m :1q½j N T = t j

122006-8 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) VIII. WAVEFORM DECOMPOSITION computed once per template but does not depend on k), G ½k¼expði ½kÞ with ½k is a template phase Our goal is now to construct the quantity m m m which must be computed at all values of k for every 2 ~ z~n;m½k¼4 Q½ks~n½kh1 Mpc;m½k (8.1) template (but does not depend on the data segment), and Fn½k is the FINDCHIRP data segment that must be com- as efficiently as possible. This quantity must be computed puted for all values of k for each data segment (but does not for every segment n, every template m, and every fre- depend on the template). As before, both t0 and 0 are set quency bin in the range k ¼ klow; ...;khigh;m 1 where to zero in . FINDCHIRP first computes and stores the klow ¼bflow=fc and khigh;m is the high-frequency cutoff quantities Fn½k for all data segments. Then, for each of the waveform template, which is given by the minimum template m in the bank, the phasing m½k is computed of the ISCO frequency of Eq. (3.6) and the Nyquist- once and then applied to all of the data segments (thereby frequency marginalizing the cost of the template generation). To facilitate the factorization, we rewrite Eq. (3.4a) with khigh;m ¼ minfbfisco=fc; bðN þ 1Þ=2cg (8.2) t0 ¼ 0 ¼ 0 in the discrete form (recall that the ISCO frequency depends on the binary system’s total mass so it is template-dependent). We can ~ 1 7=6 h1 Mpc;m½k¼ðfÞ A1 Mpc;mk expðim½kÞ factorize z~n;m½k as follows: (8.4) 1 z~n;m½k¼ðfÞ A1 Mpc;mFn½kGm½k (8.3) where A1 Mpc;m is a template normalization (it needs to be with

5 1=2 GM =c2 GM 1=6 M 5=6 A ¼ f ; (8.5a) 1 Mpc;m 3 M 24 1 Mpc c 3 3715 55 ½k¼=4 þ v5½kþ þ v3½k16v2½k m m m m 128 756 9 15 293 365 27 145 3085 2 1 þ þ þ vm ½k ; (8.5b) 508 032 504 72 1=3 1=3 GM M 1=3 vm½k¼ 3 f k : (8.5c) c M

The dependence on the data segment is wholly contained in khighX;m1 2 4 2 7=3 the template-independent quantity Fn½k which is & ½khigh;m¼ Q½kk (8.9) f k¼k 2 7=6 low Fn½k¼4 Q½ks~n½kk : (8.6) needs to be computed only once per data block (i.e., only As mentioned earlier, FINDCHIRP computes and stores once per power spectrum)—it does not depend on the Fn½k for all segments only once, and then reuses these particular segment within a block or on the particular precomputed spectra in forming z~n;m½k according to template in the bank, except in the high-frequency cutoff Eq. (8.3). The k-dependence on the template is wholly of the template (if it is less than the Nyquist-frequency). To contained in the data-segment-independent quantity account for this minimal dependence on the template, the Gm½k which is quantity &½k is precomputed for all values of k .  high high expðim½kÞ klow k

122006-9 ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012) for each data segment and template the computational cost Now consider the contribution to m;n½j coming from is essentially limited to N complex multiplications plus various frequency sub-bands one complex reverse FFT. The quantities ½j and z ½j are simply related by a ðkX‘1Þ m;n m;n ½j¼ F ½kG ½ke2ijk=N (9.1) normalization factor ‘;m;n n m k¼kð‘1Þ zm;n½j¼A1 Mpc;mm;n½j: (8.11) for ‘ ¼ 1; ...;p. The p sub-bands are defined by the Furthermore, the signal-to-noise ratio is related to frequency boundaries fk0 ¼ klow;k1; ...;kp ¼ khigh;mg, m;n½j via which are chosen so that a true signal will contribute an 2 2 2 equal amount to the total matched filter from each fre- m;n½j¼jm;n½jj =& ½khigh;m: (8.12) quency band. This means that the values of k‘ must be Rather than applying this normalization to construct the chosen so that signal-to-noise ratio, FINDCHIRP instead scales the desired ðkX‘1Þ signal-to-noise ratio threshold to obtain a normalized 4 1 ? 2Q½kk7=3 ¼ &2½k : (9.2) threshold f p high;m k¼kð‘1Þ 2 2 2 ? ¼ & ½khigh;m? (8.13) With this choice of bands and for pure Gaussian noise, the 2 which can be directly compared to the values jm;n½jj real and imaginary parts of ‘;m;n½j will be independent to determine if there is a candidate event (when Gaussian random variables with zero mean and variance 2 2 2 jm;n½jj >?). When an event candidate is located, the & ½khigh;m=p. Furthermore, the real and imaginary parts of value of the signal-to-noise ratio can then be recovered for 0 ‘;m;n½j and ‘0;m;n½j with ‘ ‘ will be independent that event along with an estimate of the termination time, since ‘;m;n½j and ‘0;m;n½j are constructed from disjoint t^ 0 ¼ tstart þðn þ jpeakÞt; (8.14a) bands. Also note that where jpeak is the point at which jm;n½jj is peaked; the Xp effective distance of the candidate, m;n½j¼ ‘;m;n½j: (9.3) 2 ‘¼1 jA1 Mpc;mj& ½khigh;m D^ eff ¼ Mpc; (8.14b) jm;n½jpeakj The chi-squared statistic is now constructed from and the termination phase of the candidate, ‘;m;n½j as follows: ^ Xp 2 20 ¼ argðzmn½jpeakÞ ¼ argðm;n½jpeakÞ: (8.14c) 2 j‘;m;n½jm;n½j=pj m;n½j¼ 2 ; (9.4) & ½khigh;m=p The relative sign in the argument arises because zm;n and ‘¼1 m;n have opposite sign; this is because A1Mpc;m, which For pure Gaussian noise, 2 is chi-squared distributed with appears in Eq. (8.11) is negative. ¼ 2p 2 degrees of freedom. That ¼ 2p 2 rather than ¼ 2p results from the fact that the sample mean IX. THE CHI-SQUARED VETO m;n½j=p is subtracted from each of values of ‘;m;n½j in the sum. However, this subtraction guarantees that, in the The FINDCHIRP algorithm employs the chi-squared dis- presence of a signal that exactly matches the template criminator of Ref. [13] to distinguish between plausible h1 Mpc;m (up to an arbitrary amplitude factor and a coales- signal candidates and common types of noise artifacts. cence phase), the value of 2 is unchanged. Thus, 2 is chi- This method is a type of time-frequency decomposition squared distributed with ¼ 2p 2 degrees of freedom in that ensures that the matched-filter output has the expected Gaussian noise with or without the presence of an exactly accumulation in various frequency bands. (Noise artifacts matched signal. tend to excite the matched filter at the high-frequency or If there is a small mismatch between a signal present in the low-frequency, but seldom produce the same spectrum the data and the template, which would be expected since as an inspiral.) the templates are spaced on a grid and are expected to For data consisting of pure Gaussian noise, the real provide a close match but not a perfect match to a true and imaginary parts of m;n½j (for a given value of j) are signal, then 2 will acquire a small noncentral parameter. independent Gaussian random variables with zero This is because the mismatched signal may not shift the mean and variance &2½k . If there is a signal high;m mean value of the real parts of f‘;m;ng by the same amount present at an effective distance Deff then hRem;n½ji¼ (for each ‘), and similarly the mean values of the imagi- 2 A1Mpc;m& ½khigh;mð1Mpc=DeffÞcos20 and hImm;n½ji ¼ nary parts of f‘;m;ng may not be shifted by the same 2 A1 Mpc;m& ½khigh;mð1 Mpc=DeffÞ sin20 (at the termina- amounts. The effect on the chi-squared distribution is to tion time, where 0 is the termination phase). introduce a noncentral parameter that is no larger than

122006-10 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) 2 2 max ¼ 2m=Deff where Deff is the effective distance of filter. FINDCHIRP will only perform the chi-squared test the true signal and is the mismatch between the if a threshold-crossing trigger is found. Therefore, if true signal and the template h1 Mpc;m, which could be as threshold-crossing triggers are rare then the cost of the large as the maximum mismatch of the template bank that is chi-squared test is small compared to the cost of the filter- used [8]. ing. Early LIGO science runs (S1 and S2) used a ‘‘single- Even for small values of (3% is a canonical value), a stage’’ pipeline, in which the chi-squared veto is computed large value of 2 can be obtained for gravitational waves as described here. For reasons of computational cost, later from nearby binaries. Therefore, one should not adopt a LIGO and/or Virgo analyses used a ‘‘two-stage’’ pipeline fixed threshold on 2 lest very loud binary inspirals be in which triggers are required to be coincident between at rejected by the veto. For a noncentral chi-squared distribu- least two different detectors before the chi-squared is tion with degrees of freedom and a noncentral parameter computed. This is achieved by disabling the chi-squared of , the mean of the distribution is þ while the test on the first pass of trigger generation on individual variance is between 1 and 2 times the mean (the variance detectors and then only applying it on the triggers that equals twice the mean when ¼ 0 and the variance equals survive the coincidence criteria. The chi-squared compu- the mean for ). Thus it is useful to adopt a threshold tation is easily parallelizable and a GPU can be used to on the quantity 2=ð þ Þ, which would be expected to perform the calculation. Simple GPU implementations of be on the order of unity even for very large signals. The the chi-squared veto have been shown to reduce the cost of FINDCHIRP algorithm adopts a threshold on the related performing the chi-squared by a factor of 20 [54,55]. quantity Given this reduced cost, future LSC analyses are likely to again use the single-stage pipeline for simplicity. Addi- 2 ½j tional speed gains can be realized by moving the entire ½j¼ m;n : (9.5) m;n 2 FINDCHIRP p þ m;n½j computation onto the GPU. A true signal in the data is expected to produce a sharp Sometimes the quantity r2 ¼ 2=p is referred to, rather peak in the matched-filter output at almost exactly the than , but this quantity does not include the effect of the correct termination time t0 (usually within one sample noncentral parameter. point of the correct time in simulations). For sufficiently loud signals, however, a signal-to-noise threshold may be crossed for several samples even though the correct ter- X. TRIGGER SELECTION mination time will have a much greater signal-to-noise The signal-to-noise ratio threshold is the primary ratio than nearby times. Non-Gaussian noise artifacts may parameter in identifying candidate events or triggers.As produce many threshold-crossing triggers, often for a we have said, the FINDCHIRP algorithm does not directly duration similar to the duration of the inspiral template compute the signal-to-noise ratio, but rather the quantity that is used. In principle, a large impulse in the detector m;n½j given in Eq. (8.10), whose square modulus is output at sample j0 can cause triggers for samples j0 then compared to a normalized threshold given by Tspec=t j j0 þðTspec þ Tchirp;mÞ=t. Rather than re- Eq. (8.13). The computational cost of the search is cord triggers for all samples in which the signal-to-noise essentially the cost of OðNÞ complex multiplications threshold is exceeded while the chi-squared test is satis- plus OðN logNÞ operations to perform the reverse FFT fied, FINDCHIRP has the option of maximizing over a of Eq. (8.10), and an additional OðNÞ operations to form chirp: essentially clustering together triggers that lie the square modulus of m;n½j for all j. In practice, the within a time Tchirp;m. Algorithmically, whenever 2 2 computational cost is dominated by the reverse complex jm;n½jj >? and m;n½j < ?, a trigger is created FFT. with a value of and 2. If this trigger is within a time Triggers that exceed the signal-to-noise ratio threshold Tchirp;m after an earlier trigger with a larger value of the are then subjected to a chi-squared test. However, the signal-to-noise ratio , discard the current trigger (it is 2 construction of m;n½j is much more costly than the con- clustered with the previous trigger). If this trigger struction of m;n½j simply because p reverse complex T 2 is within a time chirp;m after an earlier trigger with a FFTs of the form given by Eq. (9.1) must be performed. smaller signal-to-noise ratio , discard the earlier trigger The cost of performing a chi-squared test is essentially (the previous trigger is clustered with the current p times as great as the cost of performing the matched trigger). The result is a set of remaining triggers that are separated by a time of at least Tchirp;m. Note that 2 2 If m;n½j is only required for one particular j then there is a this algorithm depends on the order in which the triggers more efficient way to compute it. However, the FINDCHIRP are selected, i.e., a different set of triggers may arise if the algorithm does not employ the chi-squared test so much as a veto as a part of a constrained maximization of signal-to-noise triggers are examined in inverse order of j rather than in for times in which the chi-squared condition is satisfied. Thus, order of j. FINDCHIRP applies the conditions as j is 2 m;n½j needs to be computed for all j if it is computed at all. advanced from j ¼ N=4 to j ¼ 3N=4 1 (i.e., forward

122006-11 ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012)

FIG. 1. FINDCHIRP flow chart. The main computation takes place in two loops: the outer loop (in light grey) is over templates while the inner loop (in dark grey) is over data segments. The chi-squared branch, shown with a checkerboard pattern, is within the inner loop and is computationally costly. However, this branch is only executed if a candidate event is identified. Therefore, the computational cost is dominated by the procedure shown with a thick border: the calculation of the matched filter given by Eq. (8.10).

3 in time). The effect of the maximizing over a chirp is to XI. EXECUTION OF THE FINDCHIRP ALGORITHM retain any true signal without introducing any significant bias in parameters, e.g., time of arrival (which can be In this section, we describe the sequence of operations demonstrated by simulations), while reducing the number that comprise the FINDCHIRP algorithm and highlight the of triggers that are produced by noise artifacts. tunable parameters of each operation. The algorithm is also illustrated in Fig. 1. Since we are only describing the FINDCHIRP algorithm 3 Other methods can also be employed, for example, max- itself, we assume that a bank of templates ðM; Þm has imizing all triggers that are separated in time by less than Tchirp;m. already been constructed for a given minimal match ,

122006-12 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) according to the methods described in [8–10] and we are t^0, signal-to-noise ratio, effective distance D^ eff, termi- ½ ^ provided with either calibrated strain data s j or the output nation phase 0, chi-squared veto parameters, and the ½ 2 error signal of the interferometer e j and instrument cali- normalization constant m of the trigger. The triggers bration R½k as described in [48]. are generated and stored to disk for later stages of the The initial operation is to scale the strain data by the analysis pipeline. dynamic-range factor , and divide it into data segments The segment index n is then incremented and the loop s ½j T n suitable for analysis. The data segment duration , over the data segments continues. Once all NS data seg- stride length , and number of data segments NS in a block ments have been filtered against the template, the template are selected. These quantities then define a data block index m is incremented and the loop over templates con- length according to Eq. (5.2). A sample rate 1=t must tinues until all NT templates have been filtered against all be chosen (which must be less than or equal to the sample NS data segments. rate of the detector data acquisition system); the sample rate and data segment length define the number of points in a data segment N ¼ T=t. As mentioned previously, the XII. CONCLUSION lengths and sample rate are chosen so that N is an integer Profiling of the inspiral search code based on the power of 2. FINDCHIRP algorithm was performed on a 3 GHz Pentium The next operation is construction of an average power 4 CPU with seven data segments of length 256 seconds. 2 spectrum S½k using a specified data window w½j and The data was read from disk, resampled from 16384 Hz to power spectrum estimation method (Welch’s method, the 4096 Hz and filtered against a bank containing 474 tem- median method, or the median-mean method). The number plates using the FFTW package [50] to perform the discrete of periodograms used in the average power spectrum esti- Fourier transforms; the resulting 1255 triggers were written mate is typically chosen to be equal to the number of data out to disk. Of the 2909 seconds of execution time, segments, although different numbers of periodograms 1088 seconds were spent performing complex FFTs re- could be chosen. An inverse spectrum duration Tspec is quired by the matched filter, and 1600 seconds performing then given in order to construct the truncated inverse power the chi-squared veto. Of the time taken to perform the chi- spectrum 2Q½k, according to Eq. (7.3). squared veto, 1244 seconds are spent executing inverse Each input data segment is Fourier transformed to obtain FFTs. In total, 2300 seconds of the 2900 are spent doing s~n½k. The quantity Fn½k described in Eq. (8.6) can then FFTs, which means that the execution of the FINDCHIRP be constructed. All frequency components of Fn½k below algorithm is FFT-dominated, as desired. a specified low-frequency cutoff flow are set to zero, as are In practice, the FINDCHIRP algorithm is only a part of the DC and Nyquist components. The template- the search for gravitational waves from binary inspiral. independent normalization constants &½khigh described in An inspiral analysis pipeline typically includes data Eq. (8.9) are also computed at this point. selection, template bank generation, trigger generation The algorithm now commences a loop over the NT using FINDCHIRP, trigger coincidence tests between mul- templates in the bank, using the specified signal-to-noise- tiple detectors, vetoes based on instrumental behavior, ratio and modified chi-squared thresholds, ? and ?, and coherent combination of the optimal filter output from the method of maximizing over triggers. For each template multiple detectors, and finally manual candidate follow- ðM; Þm, the FINDCHIRP template Gm½k is computed, ac- ups. Pipelines vary between specific analyses and the cording to Eq. (8.7). The high-frequency cutoff khigh;m for topology of the analysis pipelines has evolved due to the template is obtained using Eq. (3.6) and used to select the specific demands of particular observing runs 2 the correct value of & ½khigh;m for the template. The nor- [14–16,18,19,21–25]. malized signal-to-noise threshold ? is then computed for It is simple to modify the FINDCHIRP algorithm to use this template according to Eq. (8.13). restricted post-Newtonian templates higher than second- An inner loop over the FINDCHIRP data segments is order by adding addition terms to the construction of the then entered. For each FINDCHIRP segment Fn½k and FINDCHIRP template phase in Eq. (8.5b). The phasing equa- FINDCHIRP template Gm½k the filter output m;n is tions used in the LSC implementation of FINDCHIRP are computed according to Eq. (8.10). The trigger selection given in Appendix A for completeness. Appendix A de- algorithm described in Sec. X is now used to determine scribed the modification of FINDCHIRP used to search if any triggers should be generated for this data seg- for time-domain templates, e.g., those based on post- ment and template, given the supplied thresholds and Newtonian resummation techniques, such as the effective trigger maximization method. If necessary, the chi- one body formalism [37]. These modifications cannot squared veto is computed at this stage, according to make use of the factorization used in the stationary phase Eq. (9.4) and the threshold given in Eq. (9.5). If templates, but they allow efficient reuse of the search code any triggers are generated, the template parameters developed and tested for the frequency-domain post- ðM; Þm are stored, along with the termination time Newtonian templates.

122006-13 ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012)

ACKNOWLEDGMENTS To construct the FINDCHIRP template Gm½k, we con- struct a segment of length N sample points and populate We would like to thank Stanislav Babak for several it with the discrete samples of the template waveform useful suggestions and corrections on this work. h ½j. The waveform is sampled at the sampling This work has been supported in part by the National 1 Mpc;m Science Foundation Grant Nos. PHY-9728704, PHY- interval of the matched filter t. When we place the 0071028, PHY-0099568, PHY-0200852, PHY-0701817, waveform in this segment, we must ensure that the termi- ¼ PHY-0847611, and PHY-0970074, and by the LIGO nation of the waveform is placed at the sample point j 0, ¼ Laboratory coperative agreement PHY-0107417. Patrick i.e., t0 0. For example, if the template is a post- Brady is also grateful to the Alfred P Sloan Foundation Newtonian waveform generated in the time-domain [40], for support. Patrick Brady and Duncan Brown also thank then it is typical to end the waveform generation at the time and the Research Corporation Cottrell Scholars Program which the frequency evolution of the waveform ceases to for support. be monotonically-increasing and not the time at which the gravitational-wave frequency goes to infinity. Thus the last nonzero sample point of the generated template may not APPENDIX A: ALGORITHM FOR TEMPLATES correspond to the formal time of coalescence. If the algo- GENERATED IN THE TIME-DOMAIN rithm generating the waveform provides the FINDCHIRP algorithm a formal coalescence time, the waveform is The optimization of the FINDCHIRP algorithm described above is dependent on the use of frequency-domain- placed so that the coalescence time is at the last sample restricted post-Newtonian waveforms as the template. It point in the segment. Any subsequent signal (such as is a simple matter, however, to modify the algorithm (and merger and ringdown, in the case of EOB) is wrapped hence the code used to implement the algorithm) so that an around to the start of the segment. If a formal coalescence arbitrary waveform generated in the time-domain hðtÞ may time is not provided, the waveform is placed so that the last be used as the matched-filter template. This allows use of nonzero sample of the template is at the end of the seg- inspiral templates such as the effective one body (EOB) ment. As discussed in Sec. III, this causes some ambiguity [37] waveforms. These waveforms have been tuned to in the meaning of the recorded arrival time, but as long as numerical relativity simulations of coalescing black holes this is consistent among all detectors in the network, this is and have a higher overlap with higher-mass signals in the not a significant effect. After placing the waveform in the sensitive band of the LIGO detectors [38]. Other wave- segment, we construct the discrete forward Fourier trans- forms of interest are described in [56–60]. In this form of the waveform, as described by Eq. (2.3) and Appendix, we describe the modifications necessary to use construct  time-domain templates in FINDCHIRP. ~ fh1 Mpc;m½k klow k

122006-14 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) frequency bin of the periodogram, and for brevity we adopt noise. The normalization factor C is a combinatoric factor the symbol x for the power in the frequency bin, that is, we which arises from the number of ways of selecting a par- define x‘ ¼ P‘½k for ‘ ¼ 1; ...;n. (Here n is the number ticular sample as the median and then choosing half of the of periodograms being averaged. It is either NS or NS=2 remaining points to be greater than this value. Thus it has depending on the choice of method.) Let fðxÞ be the the value of n (number of ways to select the median probability distribution function for x. For Gaussian noise, sample) times n 1 ¼ 2m choose ðn 1Þ=2 ¼ m (num- fðxÞ¼1ex= where ber of ways of choosing half the points to be larger) Z ! 1 2m 1 ¼hxi¼ xfðxÞdx (B1) C ¼ n ¼ ; (B9) 0 m Bðm þ 1;mþ 1Þ is the population mean of x.So ¼hP½ki. The popula- R where Bðx; yÞ¼ 1 tx1ð1 tÞy1dt is the Euler beta func- tion median x1=2 is defined by 0 Z tion. This factor can also be obtained simply by normaliz- 1 x1=2 ¼ fðxÞdx (B2) ing the probability distribution gðxmedÞ. To do so it is useful 2 0 to make the substitution t ¼ QðxmedÞ so that dt ¼ which yields fðxmedÞdxmed and Z Z x1=2 ¼ ln 2: (B3) 1 1 ¼ gðxÞdx ¼ Ctmð1 tÞmdt Thus the bias of the population median is ¼ ln2. 0 The sample mean is unbiased compared to the popula- ¼ CBðm þ 1;mþ 1Þ: (B10) tion mean. The sample mean is Now we can compute the expected value for the median. 1 Xn x ¼ x‘: (B4) Note that for the exponential probabilityR distribution, n 1 m m ‘¼1 hxmedi¼ lnt. Thus xmed ¼C 0 t ð1 tÞ lntdt. To evaluate the integral, start with the definition (above) The expected value of x is of the Euler beta function. Differentiate it with regard to Xn 1 the first argument, and use the definition of the digamma hxi¼ hx i¼ (B5) ‘ function c ðzÞ¼0ðzÞ=ðzÞ to obtain n ‘¼1 Xn ‘þ1 so x is an unbiased estimator of . ð1Þ hx i¼½c ð2mþ2Þc ðmþ1Þ ¼ The sample median, however, does have a bias. The med ‘¼1 ‘ sample median is: (B11) x ¼ medianfx g: (B6) med ‘ where we have used Eqs. 8.365.6, 8.365.2, and 8.375.2 of To compute the bias, we first need to obtain the probability Ref. [66] to reduce c . The bias factor is therefore distribution for the sample median. Xn ð1Þ‘þ1 For simplicity, assume now that n is odd. The probability ¼ (B12) of the sample median having a value between xmed and ‘¼1 ‘ x þ dx is proportional to the probability of one of med med for odd n. This result makes sense: As n !1the series the samples having a value between xmed and xmed þ dxmed times the probability that half of the remaining samples are approaches ln2 which is the bias for the population median. larger than x and the other half are smaller than x . However, for n ¼ 1, ¼ 1, so there is no bias (the median med med is equal to the mean for one sample!). Thus, the probability distribution for xmed is given by gðxmedÞ where APPENDIX C: CHI-SQUARED STATISTIC gðx Þdx ¼ C½1 Qðx ÞmQmðx Þfðx Þdx med med med med med med FOR A MISMATCHED SIGNAL (B7) For simplicity we write the chi-squared statistic [13]in where m ¼ðn 1Þ=2 is half the number of remaining the equivalent form [cf. Eq. (7.1)] samples after one has been selected as the median. Here, Xp 2 QðxÞ is the upper-tail probability of x, i.e., the probability 2 jz‘½jz½j=pj ½j¼ 2 ; (C1) that a sample exceeds the value x ‘¼1 =p Z 1 QðxÞ¼ fðxÞdx ¼ ex=; (B8) where x kX‘1 s~½kh~ ½k 1 Mpc 2ijk=N where the second equality holds for the exponential distri- z‘½j¼4f e ; (C2) S½k bution function corresponding to the power in Gaussian k¼k‘1

122006-15 ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012) Xp where we have used the Schwarz inequality to obtain the z½j¼ z ½j; (C3) ‘ second line and the normalization condition ðu; uÞ‘ ¼ 1=p ‘¼1 to obtain the third. The final approximation assumes that and 1. Thus, the chi-squared statistic is offset by an amount that is bounded by twice the squared signal-to- bðNX1Þ=2c jh~ ½kj2 2 ¼ 4f 1 Mpc : (C4) noise ratio observed times the mismatch factor. There is no k¼1 S½k offset for a template that perfectly matched the signal waveform. For brevity we have dropped the indices n and m; the It can be shown [13] that in the presence of a signal and explicit dependence on j will also be dropped hereafter. Gaussian noise that 2 has a noncentral chi-squared dis- In this Appendix we further simplify the notation by adopt- tribution [62] with ¼ 2p 2 degrees of freedom and a ~ 2 ing normalized templates u~½k¼h1 Mpc½k=. In terms of noncentral parameter & 2 (where now might these templates we define the inner products as in [13] possibly be slightly greater than 2 times the measured ð Þ signal-to-noise ratio squared owing to the presence of the kX‘ 1 s~½ku~½k ðs; uÞ ¼ 4f e2ijk=N (C5) noise). This distribution has a mean value of þ and a ‘ S½k k¼kð‘1Þ variance of 2 þ 4. We see then that the modified chi- squared statistic of Eq. (9.5) has a mean of & 2 and a for the p different bands, which are chosen so that variance of & ð4 or 8Þ=ðp þ 2Þ (4 when p 2 and 8 ðu; uÞ‘ ¼ 1=p, and the inner product when p 2) for Gaussian noise. Thus we would expect Xp bðNX1Þ=2c s~½ku~½k to set a threshold on of ? a few. ðs; uÞ¼ ðs; uÞ‘ ¼ 4f : (C6) ‘¼1 k¼1 S½k APPENDIX D: DISTANCE CONVENTIONS With this notation, the signal-to-noise ratio is given by The effective distance, D , is a measure of the inverse 2 ¼jðs; uÞj2 and chi-squared statistic is eff amplitude of a gravitational-wave signal produced in a Xp jðs; uÞ ðs; uÞ=pj2 detector. For a binary that is optimally located (directly 2 ¼ ‘ above or below a two-arm interferometric detector) and ‘¼1 1=p oriented (where the binary’s orbit is viewed face-on), the Xp 2 2 effective distance is equal to the actual distance, D.Fora ¼ jðs; uÞj þ p jðs; uÞ‘j : (C7) ‘¼1 source that is not optimally located or oriented, the signal is weaker than one from an optimally located and oriented To see how the chi-squared statistic is affected by a source at the same actual distance, and therefore the effec- strong signal (considerably larger than the noise)4, suppose tive distance is greater than the actual distance. that the detector output s½j consists of the gravitational If a signal from a system having a total mass M,a waveform av½j where a specifies the amplitude of the reduced mass , and an effective distance Deff is present gravitational-wave. Here v½j is also a normalized [in in a detector’s data stream, so that it induces a strain hðtÞ on terms of the inner product of Eq. (C6)] gravitational wave- the detector, then the expected signal-to-noise ratio found form that is not exactly the same as u½j. The discrepancy for a matched-filter search is between the two waveforms is given by the mismatch sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi Z 1 jh~ðfÞj2 ¼ 1 jðv; uÞj: (C8) % ¼ 4 df 0 S ðfÞ sn ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi The mismatch is the fraction of the signal-to-noise ratio Z 1 Mpc 1 f7=3 that is lost by filtering the true signal av½j with the A2 ¼ 4 1 MpcðM; Þ df (D1) template u½j compared to if the template v½j were Deff 0 SnðfÞ used. The chi-squared statistic is if the data is filtered with a template that has exactly the Xp same waveform parameters as the signal. A common 2 ¼a2jðv; uÞj2 þ pa2 jðv; uÞ j2 ‘ source of confusion is the use of the term ‘‘signal-to-noise ‘¼1 ratio’’ in reference to the matched-filter output for a par- Xp 2 2 2 ticular template, mðtÞ, as well as in reference to the a jðv; uÞj þ pa ðv; vÞ‘ðu; uÞ‘ ‘¼1 measure of the strength of a signal relative to a detector’s noise, %. The latter should be called the expected signal-to- ¼2 þ a2 2a2 22 (C9) noise ratio, while the actual observed signal-to-noise ratio will differ owing to the presence of random noise as well as 4The strong-signal assumption holds if p 1 2a2. This the possible mismatch between the true signal and the can be seen from a full calculation, cf. Eq. (6.24) of Ref. [13]. template used in filtering.

122006-16 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) The effective distance is related to other distances that probed by the detector. (Note that F is not equal to 51=2, have become widely used in gravitational-wave physics. as it is often mistaken to be.) The horizon distance, Dhor, is the effective distance of a While the actual distance, D, is a physical parameter of a particular source, a 1:4M–1:4M binary neutron star source, the effective distance Deff is related to the inverse system, that would produce an expected signal-to-noise of the strain amplitude seen in a detector. The horizon R ratio % ¼ 8. That is, the horizon distance is defined by distance Dhor and sense-monitor range , on the other sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi Z hand, are not related to an actual source but rather are 1 Mpc 1 f7=3 A2 measures of the sensitivity of the detector. The horizon Dhor ¼ 4 1 MpcðM; Þ df; (D2) % 0 SnðfÞ distance is a representation of the maximum distance to which a detector can see, while the sense-monitor range ¼ ¼ ¼ where % 8, M 2:8M, and 0:7M. Horizon dis- describes the volume that may be surveyed by a detector. tance is therefore a measure of the sensitivity of a detector: Finally, Ref. [65] defines a distance quantity which is it depends on the integral of the inverse power spectral 7=3 useful in the computation of rate limits on coalescing density with a frequency weighting of f . binaries [43]. If an inspiral signal observed in the detector R The sense-monitor range [63], , is related to the does not terminate in the sensitive band of the detector (as R F F 1 5 horizon distance by ¼ Dhor where ’ 2:2648. is the case for M & 10M binaries in Initial LIGO), then it It is called sense-monitor range after the data monitor follows from Eq. (3.4b) that the amplitude of the waveform SENSEMONITOR [64] that is run in the LIGO control rooms. M5=6 is proportional to Deff. For the purpose of comput- The sense-monitor range represents not the farthest ing the efficiency of a search, it is convenient to define the distance to which a detector is sensitive, but, rather, the chirp distance radius of a sphere that would contain as many sources as M 5=6 the number that would produce an expected signal-to-noise BNS D ¼ D ; (D3) ratio % ¼ 8 in a detector under the assumption of a homo- c M eff geneous distribution of sources having random orienta- M where BNS is the chirp mass of a binary with m1 ¼ tions. Specifically, suppose that there are Nhor sources m2 ¼ 1:4M. homogeneously distributed in a sphere of radius Dhor. Each of these sources has an effective distance D (which eff APPENDIX E: EXTENSION TO HIGHER is always greater than or equal to its actual distance D). POST-NEWTONIAN ORDERS The number Ndet of these sources that are detectable (i.e., which would produce an expected signal-to-noise ratio Extending to the FINDCHIRP algorithm to use higher % ¼ 8) is simply the number of the sources that have post-Newtonian orders is straighforward. At 3.5 post- 3 Deff Dhor; the quantity F ¼ Ndet=Nhor is the fraction Newtonian order, the expression for the chirp time given of the universe within the horizon distance that is actually by Eq. (3.5a) becomes (see Eq. (3.8b) of Ref. [36])

 5 GM 743 11 32 3058673 5429 617 13 7729 T ¼ v8 þ þ v6 v5 þ þ þ 2 v4 þ v3 chirp 256 c3 low 252 3 low 5 low 508032 504 72 low 3 252 low 6848 10052469856691 1282 3147553127 4512 15211 25565 6848 þ E þ þ 2 þ 3 þ lnð4v Þ v2 105 23471078400 3 3048192 12 1728 1296 105 low low  14809 75703 15419335 þ 2 v1 (E1) 378 756 127008 low and the stationary phase approximation to 3.5 post-Newtonian order is given by Eqs. (3.4a) and (3.4b) with the stationary phase function extended to include higher post-Newtonian terms (see Eq. (3.18) of Ref. [36])  3 1 3715 55 15293365 27145 3085 ðf;M;Þ¼2ft 2 þ v5 1þ þ v2 16v3 þ þ þ 2 v4 0 0 4 128 756 9 508032 504 72 38645 65 v 11583231236531 640 6848 6848 þ 1þ3ln v5 þ 2 lnð4vÞ 756 9 v 4694215680 3 21 E 21 0  15737765635 2255 76055 127825 77096675 378515 74045 þ þ 2 þ 2 3 v6 þ þ 2 v7 ; 3048192 12 1728 1296 254016 1512 756 (E2)

5The factor 2.2648 is equal to 4=ð3 1:84Þ1=3 where 1.84 is the value in Eq. (5.3) of [63].

122006-17 ALLEN et al. PHYSICAL REVIEW D 85, 122006 (2012) where E 0:577216 is the Euler constant, and v is the post-Newtonian parameter given by Eq. (3.4d). Here v0 is an arbitrary reference value for the post-Newtonian parameter, which is normally taken to be v0 ¼ 1.

[1] C. W. Helstrom, Statistical Theory of Signal Detection [34] LSC Algorithm Library LAL, http://www.lsc-group (Permagon, London, 1968), 2nd ed. .phys.uwm.edu/daswg/projects/lal.html. [2] P.C. Peters and J. Mathews, Phys. Rev. 131, 435 (1963). [35] L. Blanchet, Living Rev. Relativity 9, 4, (2006), http:// [3] K. S. Thorne, in Three Hundred Years Of Gravitation, relativity.livingreviews.org/Articles/lrr-2006-4/. editor S. W. Hawking and W. Israel, (Cambridge [36] A. Buonanno, B. Iyer, E. Ochsner, Y. Pan, and B. S. University Press, Cambridge, England, 1987). Sathyaprakash, Phys. Rev. D 80, 084043 (2009). [4] B. Abbott et al., Rep. Prog. Phys. 72, 076901 (2009). [37] A. Buonanno and T. Damour, Phys. Rev. D 59, 084006 [5] F. Acernese et al., Classical Quantum Gravity 25, 184001 (1999). (2008). [38] Y. Pan et al., arXiv:1106.1021. [6] B. S. Sathyaprakash and S. V. Dhurandhar, Phys. Rev. D [39] L. Blanchet, T. Damour, B. R. Iyer, C. M. Will, and A. G. 44, 3819 (1991). Wiseman, Phys. Rev. Lett. 74, 3515 (1995). [7] R. Balasubramanian, B. S. Sathyaprakash, and S. V. [40] L. Blanchet, B. R. Iyer, C. M. Will, and A. G. Wiseman, Dhurandhar, Phys. Rev. D 53, 3033 (1996). Classical Quantum Gravity 13, 575 (1996). [8] B. J. Owen, Phys. Rev. D 53, 6749 (1996). [41] W. G. Anderson, P.R. Brady, J. D. E. Creighton, and [9] B. J. Owen and B. S. Sathyaprakash, Phys. Rev. D 60, E. E. Flanagan, Phys. Rev. D 63, 042003 (2001);W. 022002 (1999). Anderson, P. Brady, D. Chin, J. Creighton, K. Riles, [10] S. Babak et al., Phys. Rev. D 72, 022002 (2005).S. Babab and J. Whelan, LIGO technical document LIGO- et al., Classical Quantum Gravity 23, 5477 (2006). T010110-00-Z, https://dcc.ligo.org/public/0012/T010110/ [11] T. Cokelaer, Phys. Rev. D 76, 102004 (2007). 001/T010110.pdf. [12] B. Allen et al., Phys. Rev. Lett. 83, 1498 (1999). [42] C. Cutler and E. F. Flanagan, Phys. Rev. D 49, 2658 [13] B. Allen, Phys. Rev. D 71, 062001 (2005). (1994). [14] B. Abbott et al. (LIGO Scientific Collaboration), Phys. [43] R. Biswas, P. R. Brady, J. D. E. Creighton, and S. Fairhurst, Rev. D 69, 122001 (2004). Classical Quantum Gravity 26, 175009 (2009). [15] B. Abbott et al., Phys. Rev. D 72, 082001 (2005). [44] Y. Pan et al., Phys. Rev. D 77, 024014 (2008). [16] B. Abbott et al., Phys. Rev. D 72, 082002 (2005). [45] M. Boyle, D. A. Brown, and L. Pekowsky, Classical [17] B. Abbott et al., Phys. Rev. D 73, 102002 (2006). Quantum Gravity 26, 114006 (2009). [18] B. Abbott et al., Astrophys. J. 681, 1419 (2008). [46] A. Buonanno et al., Phys. Rev. D 76, 104049 (2007). [19] B. Abbott et al., Phys. Rev. D 77, 062002 (2008). [47] B. Abbott et al. (LIGO Scientific Collaboration), Nucl. [20] F. Beauville et al., Classical Quantum Gravity 25, 045001 Instrum. Methods Phys. Res., Sect. A 517, 154 (2004). (2008). [48] R. Adhikari, G. Gonza´lez, M. Landry, and B. O’Reilly, [21] B. P. Abbott et al., Phys. Rev. D 79, 122001 (2009). Classical Quantum Gravity 20, S903 (2003). [22] B. P. Abbott et al., Phys. Rev. D 80, 047101 (2009). [49] X. Siemens, B. Allen, J. Creighton, M. Hewitson, and M. [23] J. Abadie et al., Astrophys. J. 715, 1453 (2010). Landry, Classical Quantum Gravity 21, S1723 (2004). [24] J. Abadie et al., Phys. Rev. D 82, 102001 (2010). [50] M. Frigo and S. G. Johnson, computer code FFTW, http:// [25] J. Abadie et al., Phys. Rev. D 83, 122005 (2011). www.fftw.org. [26] K. Arnaud et al., Classical Quantum Gravity 24, S529 [51] P. D. Welch, IEEE Trans. Audio Electroacoust. 15,70 (2007). (1967). [27] D. A. Brown, J. Crowder, C. Cutler, I. Mandel, and M. [52] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Vallisneri, Classical Quantum Gravity 24, S595 (2007). Flannery, Numerical Recipes in C: The Art of Scientific [28] S. Babak et al., Classical Quantum Gravity 25, 114037 Computing (Cambridge University Press, Cambridge, (2008). 1992), 2nd ed. Section 13.4, http://www.nrbook.com/a/ [29] B. Aylott et al., Classical Quantum Gravity 26, 165008 bookcpdf/c13-4.pdf. (2009). [53] B. Abbott et al. (LIGO Scientific Collaboration, Phys. [30] D. A. Brown et al., Classical Quantum Gravity 21, S1625 Rev. D 72, 102004 (2005). (2004). [54] S. K. Chung, L. Wen, D. Blair, K. Cannon, and A. Datta, [31] D. A. Brown (for the LIGO Scientific Collaboration), Classical Quantum Gravity 27, 135009 (2010). Classical Quantum Gravity 22, S1097 (2005). [55] Karsten Weisner (private communication). [32] D. A. Brown et al., edited by in I. J. Taylor, E. Deelman, [56] A. Pai, S. Dhurandhar, and Sukanta Bose, Phys. Rev. D 64, D. B. Gannon, and M. S. Shields, Workflows for e-Science: 042004 (2001). Scientific Workflows for Grids (Springer-Verlag, Berlin, [57] A. Buonanno, Y. Chen, and M. Vallisneri, Phys. Rev. D 67, 2006), Chapter 4, pp. 39–59. 024016 (2003). [33] D. A. Brown, Ph.D. thesis, University of Wisconsin– [58] A. Buonanno, Y. Chen, and M. Vallisneri, Phys. Rev. D 67, Milwaukee, 2004. 104025 (2003).

122006-18 FINDCHIRP: AN ALGORITHM FOR DETECTION ... PHYSICAL REVIEW D 85, 122006 (2012) [59] B. Abbott et al. (LIGO Scientific Collaboration) (unpub- (Dover, New York, 1964), Chap. 26, p. 925, http://people lished). .math.sfu.ca/~cbm/aands/page_925.htm. [60] T. Damour, B. R. Iyer, and B. S. Sathyaprakash, Phys. Rev. [63] L. S. Finn and D. F. Chernoff, Phys. Rev. D 47, 2198 D 57, 885 (1998). (1993). [61] I. S. Gradshteyn and I. M. Ryzhik, in Table of Integrals, [64] K. C. Schlaufman and P.J. Sutton, computer code SENSE- Series and Products, edited by Alan Jeffrey and Daniel MONITOR, LIGO Project, 2002. Zwillinger (Academic Press, Orlando, Florida, (2000), [65] P. R. Brady and S. Fairhurst, Classical Quantum Gravity 6th ed. 25, 105002 (2008). [62] M. Zelen and N. C. Severo, in Handbook of Mathematical [66] E. Poisson and C. M. Will, Phys. Rev. D 52, 848 Functions, edited by M. Abramowitz and I. A. Stegun (1995)

122006-19