scottransom/presto — pull request #24 by paulray (2013-07-31 13:57:54+00:00)
Title: Fix psrfits frequency determinations

Scott, this patch changes one significant line in psrfits.c that improves the precision of the channel frequency determinations for PSRFITS files. Unfortunately, the DAT_FREQ columns of a PSRFITS format file uses single precision floats. In psrfits.c, it computed chan_wid by freq[1]-freq[0]. The low precision of floats causes this to be in error enough that it was messing up DM determinations from LWA1 data! So, I converted the computation to (double) and also used (freq[N-1]-freq[0])/(N-1) to improve the precision. Thankfully, all of your code already handles frequencies as doubles, so this is the only fix that was needed. I'm also going to request the PSRFITS format be updated to use doubles for the frequency table.

The other change just makes get_TOAs accept either LWA or LWA1 as a telescope name.