presto icon indicating copy to clipboard operation
presto copied to clipboard

ra_dec_from_string() error with pulsars with no arcsecond value

Open NickSwainston opened this issue 5 years ago • 2 comments

I was trying to use prepfold on pulsar J0317+13 using the following commands: psrcat -e J0317+13 > J0317+13.eph prepfold -timing J0317+13.eph <etc> and I get this error Error: can not convert '+13:29' to RA or DEC in ra_dec_from_string() : Success

This is a problem for two reasons. The first is that it should be able to parse this (and perhaps give a reasonable estimate for the arcsecond like 30) as this is the value from the latest psrcat version as shown on the website. The second is that it returns a 0 error code when in my mind it fails.

The function is in src/misc_utils on line 694 and I'll let someone more experienced in C to make the function more robust.

Cheers, Nick

NickSwainston avatar Nov 18 '19 03:11 NickSwainston

I have the same problem for pulsar J2002+30 when using a .par file form the ATNF catalogue

Error:  can not convert '+30:35' to RA or DEC in ra_dec_from_string()

And 10+ more pulsars for which this happens.

alebot avatar Feb 07 '22 10:02 alebot

I'm not convinced this is a bug worth fixing as I would say that this is an error in the parfile and not in the decoding. The ATNF ephemerides are not guaranteed to be valid Tempo/Tempo2 parfiles. That being said, I'd be happy to accept a pull request if you want to fix the routine!

scottransom avatar Feb 10 '22 22:02 scottransom