Menu

#418 channel frequency precision lost in PSRFITS files

next release
closed
None
5
2018-08-21
2018-08-21
No

Preamble: By default, when integrating in time (tscrunch) or frequency (fscrunch), psrchive truncates the weighted centre frequency of the result down to the nearest integer kHz. This is done because frequencies associated with arrival times are read by tempo with only kHz precision.

It was recently observed by Dick that the truncated result is not accurate; that is, noise creeps in around at around 10Hz. This can be seen with the attached example; running

pam -TeTT example.rf
psredit -c int:freq example.rf example.TT

yields

example.rf int:freq=704.0625,704.0625,704.0625
example.TT int:freq=704.06201171875

The last bit (11.71875 Hz) shouldn't be there if frequencies are everywhere represented as double-precision floating point numbers.

1 Attachments

Discussion

  • Willem van Straten

    • status: open --> closed
     
  • Willem van Straten

    The PSRFITS-related code in psrchive that loads and unload channel frequencies was treating them as single-precision floats. This bug has been fixed and checked in

    commit 907da9b2168694678b4ee62a1ec778a894f3b92b

     

Log in to post a comment.

Auth0 Logo