<div dir="ltr"><br><div>oops! I forgot to thank Dick Manchester for doing the detective work that led to the discovery of the bug!</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 22 Aug 2018 at 11:55, Willem van Straten <<a href="mailto:vanstraten.willem@gmail.com">vanstraten.willem@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<br><br>To date, PSRCHIVE has been loading the centre frequencies associated with each frequency channel (as stored in the DAT_FREQ column of the SUBINT table of PSRFITS files) using only single-precision floating point numbers. The fix for this bug was checked in about half an hour ago. For details, see<br><br><a href="https://sourceforge.net/p/psrchive/bugs/418/" target="_blank">https://sourceforge.net/p/psrchive/bugs/418/</a><br><br>As a consquence of this bug, errors of the order of 1 part in 10^8 would have crept into reference frequencies, which in turn would have led to errors in applied phase shifts and derived arrival times. For example, in the case of the file provided at the above link, data could be dedispersed to a reference frequency of "exactly" 704.062 MHz (double-precision floating point), unloaded to a PSRFITS file, and then loaded from that file with an erroneous reference frequency of 704.06201171875. If these data were then dedispersed to a different reference frequency (e.g. the centre frequency of the band), the error of 11.71875 Hz in the erroneous reference frequency of that channel would lead to a frequency-and-DM-dependent error in the phase shift applied to that channel. In this example, a DM of ~100 would correspond to an error of ~30 ns.<div><br></div><div>Of course, this bug would lead to greater errors at higher DMs and lower frequencies. It's surprising that the bug has gone undetected since 2004, and serves as a excellent argument for greater code testing.</div><div><br></div><div>Please let me know if you detect any gravitational waves after updating pipelines that use the psrchive tools.</div><div><br></div><div>Cheers,</div><div>Willem</div><div><br></div></div>
</blockquote></div>