mattpitkin / psrqpy

A python module to query the ATNF pulsar catalogue
MIT License
41 stars 26 forks source link

Getting an unexpected error from derived_binary #67

Closed respiewak closed 2 years ago

respiewak commented 4 years ago

I've produced a psrcat-style db_file from some ephemerides for my project, which have been verified to work with tools like tempo2 and psrchive, but I get an error when trying to read in the db_file with psrqpy. This is the relevant part of the traceback.

  File "/fred/oz002/users/rspiewak/code/psrqpy/psrqpy/search.py", line 198, in __init__
    update=checkupdate)
  File "/fred/oz002/users/rspiewak/code/psrqpy/psrqpy/search.py", line 347, in get_catalogue
    self.set_derived()
  File "/fred/oz002/users/rspiewak/code/psrqpy/psrqpy/search.py", line 1111, in set_derived
    self.derived_binary()      # derived binary parameters
  File "/fred/oz002/users/rspiewak/code/psrqpy/psrqpy/search.py", line 1554, in derived_binary
    self.update(ECCnew, name='ECC')
  File "/fred/oz002/users/rspiewak/code/psrqpy/psrqpy/search.py", line 394, in update
    raise ValueError("Could not update table with "
ValueError: Could not update table with supplied column

It seems as if it would be due to EPS1/2 parameters being incorrectly converted. Some of the ephemerides have one or both of those parameters set to 0, but I tried changing them to, eg, 1e-9 with no luck. Any ideas?

mattpitkin commented 4 years ago

Hi @respiewak, I'm afraid I'm not sure what the problem could be either. Could you add some print statements before line 1554 in search.py to output idx and ECCnew, or attach a problematic db file?