5 C. Search Boundary B. Termination criterion 1. Types of boundary conditions Invisible walls – No change is made to the dynamics of the boundary crossing particle but λ ( θ | x ) is set to zero and it is not evaluated as long as the particle stays outside the boundary. Reflecting walls – As with the absorbing walls condi- tion, the particle velocity is altered but instead of being zeroed, the velocity component perpendicu- lar to the wall is reversed in sign. This throws the particle back into the search domain. Absorbing walls – When a particle crosses a rectangular boundary, the velocity component perpendicular to the boundary is zeroed. Eventually, this allows the particle to be pulled into the search domain. The boundary conditions proposed in the PSO litera- ture are as follows. (This list is taken from [18] and is by no means an exhaustive one.) We have tried all three boundary conditions but, like the authors of [18], we find that the invisible wall condition tends to perform better than the other two. 2. Search region for the testbed The simplest search region in θ parameter space is a rectangle τ$_{0}$$_{,min}$ ≤ τ$_{0}$ ≤ τ$_{0}$$_{,max}$ and τ$_{1}$$_{.}$$_{5}$$_{,min}$ ≤ τ$_{1}$$_{.}$$_{5}$ ≤ τ$_{1}$$_{.}$$_{5}$$_{,max}$ . A part of this region, however, admits wave- forms that do not correspond to a physically valid bi- nary system. This is due to the dependence of τ$_{0}$ , τ$_{1}$$_{.}$$_{5}$ on the symmetric combinations of binary component masses M and µ , the total and reduced mass of the binary re- spectively, and the inequality M ≥ 4 µ . Nonetheless, as remarked in Sec. II B, there is no technical problem in generating waveforms corresponding to the unphysical chirp times and nothing strange happens to the fitness function there. See Fig. 1, for example, where a part of the parameter region shown is unphysical. Since the pri- mary utility of the binary inspiral problem in this paper The termination criterion implies that if PSO termi- nates near the true global maximum, the fitness value found will have a fractional drop less than α . Conse- quently, it will have a performance comparable to a grid- based search in which the templates are spaced according to the minimal match criterion [5] and the minimal match is 1 − α . This is important for situations where a grid- based search is infeasible as it guarantees that PSO will perform as well or better. The probability of convergence to the global maximum must be high, however, and this is the objective of the tuning process described later. Thus, we arrive at the following criterion for terminat- ing PSO. At each step k , (i) obtain the ellipsoid around gbest , that is, S$_{α}$ ( P$_{g}$ [ k ]). (ii) If the best location P$_{g}$ [ k +1] falls outside S$_{α}$ ( P$_{g}$ [ k ]), then reset the region of conver- gence to the new best location, i.e., use S$_{α}$ ( P$_{g}$ [ k + 1]). (iii) If the region of convergence is not found to change over N$_{t}$ successive steps, then terminate PSO. Now, the neighborhood of the global maximum in the presence of noise is also S$_{α}$ ( θ ) on the average for a frac- tional drop α . Therefore, it is natural to choose the re- gion of convergence to be S$_{α}$ ( θ ) in general. This reduces the task of specifying the region to simply choosing a value for α . Following a convention widely used in the GW literature [3], we fix α = 0 . 03. θ ′ = θ where θ is the location of the signal. For a small frac- tional drop α , therefore, we get an ellipsoidal region S$_{α}$ ( θ ) centered at θ such that λ ( θ $^{′}$| s ( θ )) ≥ (1 − α ) λ ( θ | s ( θ )) if θ ′ ∈ S$_{α}$ ( θ ). 1 − λ ( θ + Δ θ | s ( θ )) λ ( θ | s ( θ )) ≃ − ∑ 2 i,j =1 H$_{ij}$ Δ θ$_{i}$ Δ θ$_{j}$ 2 λ ( θ | s ( θ )) , (12) H$_{ij}$ = ∂ $^{2}$λ ( θ $^{′}$| s ( θ )) ∂θ ′ $_{i}$∂θ ′ j ∣ , (13) Even with the termination criterion in place, the search region must be finite in order for PSO to terminate in a finite number of steps. Otherwise, the swarm may con- tinue to find a better gbest and the termination criterion may never be satisfied. This is especially relevant in the case when the data has only noise. Thus, the PSO dy- namics must be supplemented with appropriate bound- ary conditions. Many approaches to this problem have been proposed, with a good summary provided in [18]. In this paper, we use the invisible wall boundary condition, but we also briefly describe some of the others below. For stochastic methods, the probability of convergence to the global maximum is usually guaranteed only in the asymptotic limit. Hence, any practical implementation of a stochastic method must include a criterion for termi- nating the search. The criterion we adopt for termination is specific to the fitness function for the binary inspiral testbed and, accordingly, θ now refers to the chirp time parameters. If the particles in PSO continue to move over several steps but do not find a significantly different gbest , it is likely that the current gbest lies close to the global maximum. A natural criterion for termination then is to check if gbest stays confined to a small region over a predetermined number of steps. When the data contains only a signal, x = s ( {A , Φ$_{a}$ , t$_{a}$, θ } ), the fitness function is maximum at the location θ of the signal. ( s ( θ ) ≡ s ( {A , Φ$_{a}$ , t$_{a}$, θ } ) for brevity in the following since the other parameters do not figure in the fitness function.) The fractional drop in the fitness function for a small displacement Δ θ = (Δ θ$_{1}$ = Δ τ$_{0}$, Δ θ$_{2}$ = Δ τ$_{1}$$_{.}$$_{5}$ ) is given by,