{'fraction_non_alphanumeric': 0.027870841035120147, 'fraction_numerical': 0.016347042513863215, 'mean_word_length': 4.452755905511811, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Pulsar Timing Array Observations of Massive Black Hole Binaries

Pulsar timing is a promising technique for detecting low frequency sources of gravitational waves. Historically the focus has been on the detection of diffuse stochastic backgrounds, such as those formed from the superposition of weak signals from a population of binary black holes. More recently, attention has turned to members of the binary population that are nearer and brighter, which stand out from the crowd and can be individually resolved. Here we show that the timing data from an array of pulsars can be used to recover the physical parameters describing an individual black hole binary to good accuracy, even for moderately strong signals. A novel aspect of our analysis is that we include the distance to each pulsar as a search parameter, which allows us to utilize the full gravitational wave signal. This doubles the signal power, improves the sky location determination by an order of magnitude, and allows us to extract the mass and the distance to the black hole binary.


INTRODUCTION
The detection of gravitational waves via the observation of pulse arrival times from pulsars was first proposed in the 1970s (Estabrook & Wahlquist 1975;Sazhin 1978;Detweiler 1979). Recent improvements in pulsar timing have made this method one of the best candidates for the first detection of gravitational waves. Pulsar timing arrays (PTAs) are sensitive to gravitational wave frequencies between f = 10 −9 Hz to f = 10 −6 Hz. The lower bound is set by the observation time, 30 years being a reasonable cut-off, while the upper bound is set by the sample rate, with once a week as the goal. There is little motivation to go to higher sample rates as the PTAs operate in the short wavelength limit -the distance to each pulsar is larger than the wavelength of the gravitational waves -and the sensitivity falls off as 1/f across the band.
The PTA operating range makes it a excellent tool to search for stochastic backgrounds produced by a population of slowly evolving supermassive black hole binaries (MBHBs) (Rajagopal & Romani 1995;Wyithe & Loeb 2003;Jaffe & Backer 2003;Wen et al. 2009). The idea is that the fluctuating time of arrivals caused by the gravitational waves will produce a correlated response across the PTA, with a characteristic dependence on the angle between each pair of pulsars (Hellings & Downs 1983). Considerable work has gone into producing bounds on the amplitude of the stochastic background (Hellings & Downs 1983;Stinebring et al. 1990;Lommen 2002;Jenet et al. 2006) and the development of improved analysis techniques for future searches (Jenet et al. 2005;Anholm et al. 2009;van Haasteren et al. 2009). A detection of the black hole stochastic background in the pulsar timing band may improve rate estimates for binary black hole mergers in the Laser Interferometer Space Antenna (LISA) frequency band (Wyithe & Loeb 2003).
With any population there are always members that are nearer and brighter, and it has been predicted that several black hole binary systems should be indi-vidually resolvable when the diffuse background is detected (Sesana et al. 2009). As a prelude to the first detection, upper bounds have been placed on the maximum amplitude of individual systems using the Parkes Pulsar Timing Array (Yardley et al. 2010). When a detection is made, it has been shown that an analysis of the timing residuals imparted at the Earth can be used to constrain the amplitude of the signals to ∼ 30%, and the direction to ∆Ω ∼ 40 deg 2 for a 100 pulsar array and a network signal to noise ratio of SNR = 10 (Sesana & Vecchio 2010a,b). But the timing residuals imparted at the Earth only tell part of the story. In addition to the disturbance at the Earth there is also the disturbance at the pulsar to consider. The pulsar component of the signal is usually ignored as it depends on the poorly constrained distance to each pulsar. In cross-correlation studies the pulsar terms average to zero as the projected distance to each pulsar is different, resulting in a different frequency and phase response to individual binaries. We show that it is possible to include the pulsar terms in the analysis by enlarging the parameter space to include the distance to each pulsar in the array. This doubles the signal power and allows the measurement of the mass and distance to the binary. As an added bonus, the pointing accuracy improves by an order of magnitude, improving the prospects for finding electromagnetic counterparts.
The outline of the paper is as follows: Section 2 describes the response of the detector to a signal from a black hole binary system. An overview of the Bayesian inference techniques used to estimate the errors in the parameter recovery is given in Section 3. Section 4 displays and discusses the results. The main results are summarized and future directions are outlined in Section 5.
2. GRAVITATIONAL WAVES FROM SUPERMASSIVE BLACK HOLE BINARIES Assuming circular orbits, the orbital velocity of a black hole binary in the PTA frequency band scales as v ≃ 2.5 × 10 −2 f 10 −8 Hz where M = m 1 + m 2 is the total mass, f is the gravitational wave frequency, and we are using units where G = c = 1. We conclude from this that the orbital dynamics is only mildly relativistic, and that the gravitational wave emission is well described by the lowest order post-Newtonian formulae. Another way of seeing this is to look at the time to merger, which scales as t c = 2 × 10 6 years 10 −8 Hz f 8/3 Here M = (m 1 m 2 ) 3/5 /M 1/5 is the chirp mass, which ranges from 0.44M for equal mass systems to 0.22M for mass ratios of 1:10. These considerations suggest that the gravitational wave signal can be modeled as a simple sinusoid of fixed frequency (Sesana & Vecchio 2010a,b;Yardley et al. 2010). Allowing for moderate orbital eccentricity introduces the complication of having to consider multiple sinusoids at harmonics of the orbital period, but the essential picture is unchanged. A more important effect that was not considered in these earlier studies is the contribution to the signal from gravitational waves disturbing the pulsars. This introduces a new time-scale into the problem in the form of the projected Earth-pulsar distance, d (1 − cos(µ)), where d is the distance to the pulsar and µ is the angle between the line of sight to the pulsar and the line of sight to the black hole binary. This time-scale is typically of order a few thousand years. When the pulsar term is included, the effective baseline grows from tens, to tens of thousands of years (the temporal equivalent of aperture synthesis). The extended baseline makes it possible to measure the frequency change, and hence, the chirp mass. The minimum detectable rate of frequency change (Takahashi & Seto 2002) sets the minimum chirp mass that can be measured: With the chirp mass determined, the amplitude of the signal can be used to solve for the distance to the black hole binary. The µ dependence in the effective distance provides additional information about the sky location of the binary, and this, combined with the increased SNR from using the full signal, leads to a significant improvement in the angular resolution of the PTA. The GW signal from a mildly relativistic black hole binary on a circular orbit is characterized by eight parameters: the distance to the BH binary D; the sky location φ and cos(θ); the angular frequency ω o = πf o of the binary orbit when observations begin at Earth; the orbital inclination cos(ι); the orbital phase at the line of nodes θ n ; the orientation of the line of nodes φ n and the chirp mass M. The signal can be written as the sum of two sub-signals (Hellings 1981(Hellings , 1982, which we refer to as the pulsar signal and the Earth signal. The former is due to the disturbance caused by the gravitational wave at the pulsar, the later to the disturbance at the Earth: R(t e ) = r p (t p ) + r e (t e ). (5) In the plane wave limit, which pertains when D ≫ d, t p is given by where t e is the time at the Earth and µ is the angle between the line of sight to the pulsar and the line of sight to the binary. The two parts of the residuals are explicitly given in Wahlquist (1987); Jenet et al. (2004): Here e +,× are the GW polarization tensors,â is the unit vector pointing from the Earth to the pulsar, and with The amplitude α(t) can be expressed as: Finally, the orbital frequency and the orbital phase evolve according to -4e-08 Unless the angle µ is very small, the signal at the pulsar will have a measurably different frequency compared to the signal at Earth, since the binary system will have evolved in the elapsed time ∆t = d(1 − cos(µ)) (Note: this quantity can be positive or negative depending on who "sees" the signal first). Figure 2 shows an example of the noise free timing residuals obtained from a MBHB system with M = √ 2 × 10 8 M ⊙ and initial gravitational wave frequency at the Earth f o = 5.0736 × 10 −8 Hz. The system is located at a distance of D = 1.77 Mpc with a sky location of φ = 0.3 and θ = 1.42. The orbital inclination is ι = π/2, and the initial orbital phase and orientation of the line of nodes are both set at π/3. The superposition of the two signals is apparent from the beat envelope. It is possible to recover all the parameters characterizing the MBHB from the timing residuals seen in a PTA, so long as the pulsar contributions to the signal are used.
At first sight it may seem impossible to include the pulsar terms in a coherent analysis. To have phase errors in the pulsar terms less than ∆Θ radians requires that we know the distance to each pulsar to order ∆d ∼ ∆Θ/f . Setting ∆Θ = 0.1 and f = 10 −8 Hz gives ∆d ∼ 0.1 parsecs, or a fractional error of ∆d/d ∼ 0.01%. This is far smaller than the accuracy that is currently available from electromagnetic observations. Techniques such as parallax measurements and astrometry achieved a precision of about 10%. Recently Verbiest et al. (2008) have been able to estimate the distance to a specific pulsar with 1% error using the kinematic distance derived from pulsar timing data. This accuracy is not typical, and the method is only valid for nearby pulsars. But it turns out that highly accurate pulsar distance estimates are not required if we include the distance to each pulsar, d i , as model parameters to be solved for from the GW data. The technique works as follows: for any one pulsar the phase matching of the pulsar terms produces a series of secondary maxima in d i corresponding to 2π increments in the accumulated phase. As the estimate for d i moves further away from the correct solution along this line of secondary maxima the predicted GW frequency and amplitude of the pulsar term starts to deviate from the true value, and the height of the secondary maxima drop. In other words, it is the overall frequency/amplitude envelope that fixes the distance to the pulsar, and not the phase matching. Indeed, we will see that the secondary maxima are so close together that the individual peaks in the posterior distribution for d i blend together into a continuum. The blending is even more pronounced in the marginalized posterior distributions for d i where the correlations between d i and µ are integrated out. We will see that it is possible to use the GW data to provide estimates for the pulsar distances, while simultaneously deriving useful estimates for the chirp mass and black hole location.
It was recently pointed out by Deng & Finn (2010) that the timing residuals may show departures from the plane wave approximation used to derive equation (8). They showed that the curvature of the wavefronts introduces parallax effects which can be used to measure the distance to the black hole binary and the pulsars in the array, independent of including the pulsar term in the signal. Accounting for the wavefront curvature will improve our estimates, which neglect this effect.
The common challenge with all GW detectors is to isolate a signal which is relatively weak compared to the noise surrounding it. The noise is composed of instrumentation or measurement noise and the background confusion noise generated by the superposition of all the unresolved MBHBs signals (Rajagopal & Romani 1995;Phinney 2001;Jaffe & Backer 2003;Jenet et al. 2005Jenet et al. , 2006Sesana et al. 2008). The measurement noise is simulated as a white noise with a standard deviation of σ = 100 ns for all pulsars. An array of 20 pulsars each with a timing rms of about 100 ns is a reasonable estimate of what will be achieved by PTAs in the near future (Manchester 2008;Verbiest et al. 2009). It is also thought to be close to the threshold for the detection of the diffuse background (Jenet et al. 2005). Models for the background (Sesana et al. 2008;Sesana & Vecchio 2010a) suggest that its power spectral density can be described as: where h * , f * and γ are model dependent. This result differs from earlier studies (e.g. Phinney (2001)) which predicted a simple f − 7 3 power-law. In Figure 2, we compare the power spectral density of the signal generated by the MBHB described above with white instrument noise and four different models of background noise (e.g. VHM, VHMhopk, KBD, BVRhf, for a description of these models see (Sesana et al. 2007;Volonteri et al. 2003;Koushiappas et al. 2004;Begelman et al. 2006;Volonteri et al. 2006)).  The square of the signal to noise ratio doubles when using the full signal compared to the truncated signal, which signifies that including the distances to the pulsars in the parameter space could contribute to the detection of more sources. For most of the frequency window of interest, the background noise is smaller than both the signal and the white noise (Rajagopal & Romani 1995;Jenet et al. 2005Jenet et al. , 2006. For the sake of simplicity, we will ignore the background for now, as it will not greatly affect the estimation of the parameters for a detected source. One would need to include it however in order to determine the number of detectable sources.

BAYESIAN INFERENCE AND PARAMETER
ESTIMATION To determine how well we can estimate the parameters of a MBHB from noisy pulsar timing data we need to compute the posterior distribution for the model parameters. The posterior distribution p( x|s) gives the probability of observing parameters x given data s. It is defined by Here p( x) is the prior distribution, which is the mathematical representation of the prior knowledge of the system, and p(s| x) is the likelihood evaluated at x. It is the probability that a system with parameter x will yield a signal s in the detector.
To generate the posterior distribution, a Markov Chain Monte Carlo (MCMC) algorithm (Metropolis et al. 1953;Hastings 1970;Newman & Barkema 1999;van Haasteren et al. 2009) is used to explore the parameter space. The MCMC consists of proposing "jumps" from one location x i in the parameter space to another x i+1 . The jumps have a finite probability κ( x i+1 | x i ) of being accepted that is given by the Hasting ratio: where Here q( y| x) is the proposal distribution: the probability that a jump from x to y will be proposed. For a more detailed description of MCMC techniques see Gamerman (1997).
3.1. Prior distribution Some information is known prior to the analysis. For instance, there is a higher probability the source will be located far from the Earth, as the area of a sphere increases as the square of its radius. To account for this, the prior distribution on D is chosen to be proportional to D 2 out to some large distance D max that is well outside the horizon for PTA detections. The sources are assumed to be uniformly distributed on the sky, with random orientations. A more informative prior on the distance and sky location could be built using galaxy catalogs. For the distances to the N pulsars, the prior follows from electromagnetic observations 1 , which we take to be a collection 1 Paul Demorest has pointed out to us that for distance estimates derived from parallax measurements, it would be better to choose a prior that is Gaussian in the parallax 1/d i . However, if the fractional error in d i or 1/d i is small, the difference between using distance and parallax to define the prior will also be small. For a recent discussion of the statistics of parallax measurements see Verbiest et al. (2010).
of Gaussians centered around the measured value d EM i with a standard deviation where d i is the proposed distance to the pulsar i. For our simulated PTA we draw d from the range 0.5 − 1.5 kpc, and include errors in the estimated d EM that are consistent with our choice of prior. We will consider some examples where the fractional distanced error α = 0.1 for all the pulsars, and other examples where α takes different values for different pulsars. We will focus on arrays with N = 20 pulsars.

Likelihood
The likelihood p(s| x) is by definition the probability of observing a signal s from a source with parameters x. For Gaussian noise it is given by: where C is a normalization constant, R( x) is the waveform described in Section 2 for a set of parameters x, and the noise weighted inner product is defined as: (21) A summation over the indexes i and j from 1 to N is implied. S nij (f ) is the spectral density of the noise correlation matrix C ij (τ ) = n i (t)n j (t + τ )dt where n i (t) is the noise in the signal from pulsar i. S nij is not typically diagonal since the background noise is correlated between the pulsars. However the instrument noise is uncorrelated. Since we ignore the background noise, S nij becomes diagonal.

Proposal distribution
A combination of six proposal distributions q( y| x) is used. The first makes use of the Fisher Information Matrix approximation to the posterior distribution. The Fisher matrix indicates the level of correlation between the parameters, and the diagonal elements of its inverse give a rough approximation of the error expected in the estimation of each parameter. The Fisher matrix is the expectation value of the negative Hessian of the log posterior evaluated at the posterior mode: In the current setting the prior only contributes to the diagonal elements of the Fisher matrix, adding a term 1/σ 2 i to the elements representing the pulsars distances. The eigenvectors of the Fisher matrix define a new set of uncorrelated parameters. The eigenvalues indicate the curvature of the likelihood surface along each eigenvector. When the curvature is high, the likelihood changes a lot for a small variation of the "eigen-parameter", and a big jump is unlikely to get accepted. To effectively explore the likelihood surface, jumps along those eigenvectors are proposed, which are scaled by their eigenvalues. The second proposal distribution is similar, but with a bigger scaling. Since the jumps are bigger they are less likely to be accepted, but when accepted they explore the parameter space faster. The third proposal consists of drawing a new parameter set from the prior distributions. The fourth proposal pick selects one of the pulsars and draws a new pulsar distance from the prior distribution. The fifth proposal distribution is similar to the fourth, but uses a proposal centered around the true value. It prevents the MCMC from searching exclusively around the values predicted by the prior. Finally, tiny jumps are sometimes proposed along each parameter. These tiny jumps are very likely to be accepted, and this helps prevent the chain from getting stuck in a location where the Fisher matrix estimates are particularly poor approximations to the posterior distribution.

Parallel tempering
A parallel tempering scheme (Swendsen & Wang 1986) is implemented to improve mixing and convergence of the Markov Chains. It consists of running a number of chains in parallel, each of them with a "temperature" T = 1/β which modifies the likelihood: The temperature effectively "smoothes" the likelihood map. The higher the temperature, the more likely a jump is going to be accepted. The chains then communicate by swapping with each other. The swaps have a probability of being accepted given by a Hasting ratio: The indices i and j refer to the individual chains. Here 10 chains are used, with temperatures exponentially spaced between T = 1 and T = 10.

RESULTS
The addition of the pulsar distances to the parameter space allows us to use the pulsar signals in the analysis. It follows that information about the evolution of the orbital frequency over a long period of time and the relative phases between the Earth signal and the pulsar signals can be extracted. This information is enough to independently determine the distance to the binary and the chirp mass.
We use a simulated PTA comprised of N = 20 randomly chosen pulsars drawn uniformly in sky location and with distances in the range 0.5 − 1.5 kpc. The parameters describing the array are listed in Table 1. With 20 uniformly distributed pulsars the array has a fairly uniform antenna pattern. Increasing the size of the array to 40 pulsars would further improve the sky coverage, but the effect is not very significant. To investigate these effects we studied the the spread in SNR across the sky for a particular source, by considering 3072 different sky locations using 50 randomly drawn arrays of pulsars. In each case the SNR corresponding to the sky location was calculated, and normalized by the average SNR to produce the histograms seen in Figure 3. The variation in SNR across the sky is smaller for the larger PTA, but not by a significant amount. In either case, we do no expect to see a significant correlation between the sky location and black hole distance parameters, and this expectation is borne out in our analysis. The distance and sky location of the 20 pulsars used in our analysis are listed in Table 1  The distance to the binary is only present in the amplitude of the signal. It makes its determination very dependent on the inclination angle ι. For values of the inclination angle close to 0 or π, the determination of the distance to the black hole binary system is very poor. At ι = 0 and ι = π, the Fisher matrix becomes singular. For an ideal value of π/2 for the inclination and a SNR of 20, our MCMC predicted an error of ∼ 7% in the distance estimation, which is in agreement with the Fisher prediction. The error on the chirp mass was ∼ 2%. The orbital frequency was extremely well determined (∼ 0.3%). Figure 4 shows the marginalized posterior distribution for the black hole distance and the chirp mass for three binaries with different chirp masses, 10 8 M ⊙ ,5 × 10 8 M ⊙ and 10 9 M ⊙ respectively (Sources 1, 2 and 3 in Table 2). The marginalized posterior distributions are represented by the boxed histograms while the smooth line represents the Fisher matrix estimates. The distances were chosen in order to ensure a SNR of 20 for each case. The heaviest source is sufficiently relativistic that higher order post-Newtonian effects may be detectable, but we defer this analysis to a future study.
The Fisher information matrix is seen to provide a good approximation to the posterior distribution for the black hole parameters. The differences can in part be attributed to imperfect convergence in the MCMC runs, which suffer from the high dimensionality of the parameter space and strong correlations between many of the model parameters. In some cases the posterior distribution peaks are shifted from their injected values. This is caused by the priors for the distances to the pulsars, which are not always peaked close to their true values, as we will show below.
Unfortunately, most black hole binaries will not have an inclination of ι = π/2. For a more realistic error prediction, we perform the same analysis for similar binaries whose inclinations are this time chosen to be π/4. We otherwise use the same sets of parameters (Sources 4, 5 and 6 in Table 2). The distances D change slightly in order to conserve an SNR of 20. The results are given in Figure 4.
The error for the distance D is predictably bigger. It rises from less than 10% to about 15% The Fisher matrix estimates the error to be as large as 30%. Again one has to take into consideration the Fisher matrix gives only a rough approximation to the posterior distribution. The posterior distributions obtained for the three different binaries are consistent, which indicates the MCMCs have reasonably converged. The measurements of the frequency and chirp mass were not significantly affected by the change in inclination, which confirms they are weakly correlated.
Source D (10 3 kpc) M (10 8 M⊙) ωo (10 −7 s −1 ) ι (rad) φ (rad) cos θ θn (rad) φn (  are considering. The merger times tc can be computed from these parameters: Sources 1,4 tc = 4.39 × 10 4 years; Sources 2,5 tc = 3.0 × 10 3 years; Sources 3,6 tc = 9.46 × 10 2 years. In addition to the decoupling of the binary distance and chirp mass from the amplitude, the addition of the pulsar terms increase considerably the precision of the determination of the binary position. The pulsar terms are evaluated at t p , which is the time at which the disturbance from the gravitational wave occurred. It is given by t p = t − d(1 − cos(µ)), where µ is the angle between the line of sight to the pulsar and the line of sight to the binary. It is therefore a function of the position of the binary. The pulsar signals give previously non-existent information on the chirp mass and distances to the pulsars, but also help refine the measurement of the binary sky location. To illustrate this, Figure 7 compare the posterior distribution with the Fisher estimation for the two position parameters, for a case in which the full signal was used and a case in which the signal from the disturbance at the pulsar was omitted. When the pulsar signals are added, the SNR naturally increases. Here the distance to the binary was normalized each time to get a SNR of 20 for both cases. The effect from the information encoded in the new term in the signal can then be dissociated from the effect due to the increase in the SNR. A mid-range chirp mass and frequency were used (M = 5 × 10 8 M ⊙ and ω o = 2π/1.5 years), and an inclination of ι = π/4. To compare our results to Sesana & Vecchio (2010b), we calculate the pulsar timing array angular resolution given by where C φ cos θ is a off-diagonal term of the covariance matrix (the inverse of the Fisher information matrix). truncated signal we find ∆Ω = 41.3 deg 2 , which is consistent with Sesana & Vecchio (2010b), while the full signal (with the distance changed to preserve the same SNR) yields ∆Ω = 6.5 deg 2 . The measurement is therefore improved by a factor of 6.4. Keeping the distance fixed and accounting for the increase in the SNR when the pulsar terms is included, the angular resolution goes from ∆Ω = 41.3 deg 2 to ∆Ω = 2.6 deg 2 . This is a considerable improvement (over an order of magnitude), which highlights the importance of utilizing the full signal.
It was previously mentioned that the full signal also gives information about the distance to the pulsars. In the simulations described above we assumed a 10% error in each of the pulsar distances, which correspond to the high end of today's accuracy in measurements using parallax and other methods. We expect the pulsar distances to be further constrained by the gravitational wave analysis. The Fisher information matrix predicts that for most pulsars, the error in the distance measurement will be constrained to a few percent. The level of improvement depends on the location of the pulsar with respect to the line of sight to the binary. If the Earth , pulsar and binary are aligned, then t p = t, and no new information is given by the pulsar term in the signal. Figure 8 compares the Fisher matrix estimates to the MCMC derived posterior distribution and to the prior distribution, for a few relevant pulsars: A few things are clear at first sight. First, when the pulsar's sky location is close to the line of sight to the binary (cos µ ≈ ±1), the prior is recovered from the posterior distribution, which means that no new information was acquired from the gravitational wave signal, as expected. Then, for the pulsars that are not close to the line of sight, the peak of the posterior distribution can be shifted from the true value of the distance. This occurs when the true value (value at which the Gaussian extracted from the Fisher information matrix is centered) is located a few sigmas away from the prior-predicted value. As mentioned earlier, these shifts will induce a shift in the posterior distribution of the binary distance, chirp mass and orbital frequency with respect to their true values. As a sanity test, the priors were centered to the right values for all the pulsars' distance. As anticipated, the posterior distribution for the binary parameters are in this case centered on their right values as well. Finally, and maybe most importantly, the posterior distribution from the MCMC is consistently much broader than the error predicted by the Fisher information matrix. For most pulsars, the posterior distribution is as wide as the prior, which means that only limited information concerning the distances could be extracted from the gravitational wave signal. To explain the discrepancy, the pulsar term of the residuals is rewritten as: with t p = t − d(1 − cos µ). If one varies the distance to the pulsar d such that then only the amplitude and frequency are slightly changed. This results in a series of secondary maxima in the likelihood, which for this particular pulsar are spaced by ∆d ∼ 0.017 kpc, which correspond to 1.7% of the distance. The change in frequency and amplitude between adjacent maxima is small compared to the measurement uncertainty in these quantities, and it is not until multiple secondary maxima have been traversed that the likelihood drops significantly. The separation of the secondary maxima is comparable to the Fisher matrix prediction for the error in d, which means that where the Fisher matrix predicts the posterior distribution to drop, the MCMC will find another maximum, almost as good as the primary. The error in the detection of each local maximum blends with the error in the detection of its neighbor. They form an "error envelop" which is limited in its width by the change in the frequency and amplitude of the pulsar signal. Even though the gain in the precision of the measurement of the distances to the pulsars is not as significant as predicted by the Fisher matrix analysis, it is still noticeable for a few pulsars.
To explore the limitation of the determination of the distances due to the periodicity of the residuals, we set the priors for five pulsars to be Gaussians with standard deviations randomly drawn from the range α = [0.005, 0.03]. For ten pulsars, the standard deviation is drawn from the interval α = [0.009, 0.15], and for the remaining five pulsars, the prior is chosen to be less constraining, α = [0.20, 0.25]. Table 3 lists the estimated distances to the pulsars d i EM , their true distances d i , and the estimated error in the existing measurement represented by the standard deviation of the prior distribution σ prior .  The estimation of the pulsar distance is improved significantly for pulsars 7, 17, 18, 19, 20. The improvement is largest for pulsars that were poorly constrained by electromagnetic measurements, and did not lie close to the line of sight to the black hole (cos µ ∼ 1). When the prior distance is far from the real value, the gravitational wave data picks up on the discrepancy, and the posterior distribution becomes double peaked (pulsar 10). The posterior distribution of pulsar 7 is identical whether the five first pulsars have a tight prior or not. This seems to indicate that the improvement on the determination of the distances is still limited by the periodicity of the strength of the residuals with respect to the pulsars distances. For this reason, the posterior distribution remains broader than the Fisher estimation. Figure 9 display the posterior distribution for the distances to a few relevant pulsars against the Fisher estimations and the priors. Pulsar 19 (kpc), cos(µ) = 0.18 Fig. 9.-Marginalized posterior distributions for the distances to 8 of the 20 pulsars in the array (boxes) compared to the prior distributions (dotted lines) and the Fisher matrix estimates (dashed line). Pulsars 1 → 5 were assumed to have distances that were well determined by electromagnetic observations. As a consequence, the measurement of the distances to the some of the remaining pulsars can be significantly improved by folding in the gravitational wave analysis of the timing residuals.
The errors on the binary parameters (D, M, ω, φ, cos θ) were not significantly affected by the change in the pulsars priors.

CONCLUSIONS
We have presented a novel method of analyzing binary black hole signals using pulsar timing data. By including the distances to the pulsars as model parameters we are able to incorporate the "pulsar term" in the gravitational wave signal, which allows us to detect the decay of the orbit, and hence the chirp mass. This in turn allows us to convert the amplitude of the signal into a measurement of the distance to the black hole binary. Including the pulsar terms doubles the signal power and reduces the pointing error by an order of magnitude. For detections with a network SNR = 20, it should be possible to measure the distance to < 20%, the chirp mass to < 5%, and the sky location to ∆Ω < 3 deg 2 . In something of a role reversal, the gravitational wave observations can improve the distance estimates to pulsars in the array. The improvement can be significant for pulsars whose distances are originally poorly estimated. It also follows that the more MBHBs detected, the more trustworthy the estimations for the distances to the pulsars are, which in turns allow for stronger constraints on the MBHBs detected.
Topics for future research include the study of systems with eccentric orbits, and the possibility of detecting higher order post-Newtonian effects (which encode information about the mass ratio and spin of the black holes) for higher frequency or more massive systems. It would be interedting to see how including the effects of wavefront curvature (Deng & Finn 2010) improve the distance estimates. Future studies could also consider the effect of the confusion noise from the unresolved MBHB background, which will ultimately determine the number of individual systems that can be resolved.