New EOP file format header

Issue #33 new
Anonymous created an issue

Dear Sirs,

I am Giovanni Ceribella, a PhD student in the MAGIC Cherenkov Telescopes group at the Max-Planck-Istitut in Munich, Germany. Pulsars are my primary research interest and I use tempo2 to apply barycenter corrections and obtain phases from our very high energy gamma ray TOAs.

I found out that the newest eopc04_IAU2000.62-now files that can be updated through the update_eop.sh script in T2runtime/earth have a different format specification from the one they used to be.

The old format specification (still used in the eop file in the tempo2 cvs, but updated to july 2016) is:

FORMAT(3(I4),I7,2(F11.6),2(F12.7),2(F11.6),2(F11.6),2(F11.7),2F12.6)

The new specification (as in a file uploaded with update_eop.sh) is:

FORMAT(3(I4),I7,2(F11.6),2(F12.7),2(F11.6),2(F11.6),2(F11.7),2(F12.6))

(Notice the parenthesis in 2F12.6). Since tempo2/eop.C uses this string to recognize which format to parse, with newest versions of eopc04_IAU2000.62-now the program does not go through the file with the correct format (it is using by default the oldest one), it reads random values into the EOPSample object and applies them in the barycentric corrections, possibly ending with segmentation fault upon trying to acess sample[isamp-1] where isamp==0.

To fix this I just had to duplicate the code parsing format==1 in eop.C with the new string as a format specifier. Maybe it could be a good idea to let the program exit with an error code if none of the known format specifiers string is found.

I hope that this information is useful. I also want to thank you for the constant development on tempo2.

Best regards,

Giovanni Ceribella

Max-Planck-Insitut fuer Physik Foehringer Ring 6 80805 Muenchen Germany 0049 (0)89 32354 259 ceribell@mpp.mpg.de