Closed
Description
Im trying to generate ephemerides with MPC.get_ephemeris()
The procedure seems to fail for some comets
File "E:\Jure\django-apps\cobs_dev\efemeride_new.py", line 90, in main
eph = MPC.get_ephemeris('0120P',
File "E:\Jure\django-apps\cobs_env\lib\site-packages\astroquery\utils\class_or_instance.py", line 25, in f
return self.fn(obj, *args, **kwds)
File "E:\Jure\django-apps\cobs_env\lib\site-packages\astroquery\utils\process_asyncs.py", line 29, in newmethod
result = self._parse_result(response, verbose=verbose)
File "E:\Jure\django-apps\cobs_env\lib\site-packages\astroquery\mpc\core.py", line 1167, in _parse_result
tab[col].convert_unit_to(self._proper_motion_unit)
File "E:\Jure\django-apps\cobs_env\lib\site-packages\astropy\table\column.py", line 1028, in convert_unit_to
self.data[:] = self.unit.to(new_unit, self.data, equivalencies=equivalencies)
File "E:\Jure\django-apps\cobs_env\lib\site-packages\astropy\units\core.py", line 1195, in to
return self._get_converter(Unit(other), equivalencies)(value)
File "E:\Jure\django-apps\cobs_env\lib\site-packages\astropy\units\core.py", line 1103, in <lambda>
return lambda val: scale * _condition_arg(val)
numpy.core._exceptions._UFuncNoLoopError: ufunc 'multiply' did not contain a loop with signature matching types (dtype('float64'), dtype('<U9')) -> None
Here is my script:
from astroquery.mpc import MPC
eph = MPC.get_ephemeris('0120P',
location='106',
start='2024-06-04 20:00:00',
number=20,
step='30min',
ra_format={'sep': ':', 'unit': 'hourangle', 'precision': 1, 'pad': True},
dec_format={'sep': ':', 'precision': 0, 'alwayssign': True, 'pad': True},
proper_motion='sky',
proper_motion_unit='arcsec/min'
)
The issue seems to get from the arguments
proper_motion='sky',
proper_motion_unit='arcsec/min'
If I remove this from the query I get the results returned.
If I try to generate the ephemeris from the website I get the result for comet 120P.
0120P
Date UT R.A. (J2000) Decl. Delta r El. Ph. m1 Sky Motion Object Sun Moon
h m s "/min "/min Azi. Alt. Alt. Phase Dist. Alt.
2024 06 03 210000 12 13 32.8 -04 21 25 4.808 5.263 111.4 10.3 22.6 -0.013 -0.002 225 +29 -17 0.09 146 -27
2024 06 03 213000 12 13 32.8 -04 21 25 4.808 5.263 111.4 10.3 22.6 -0.012 -0.002 233 +25 -19 0.09 146 -26
2024 06 03 220000 12 13 32.8 -04 21 25 4.808 5.263 111.4 10.3 22.6 -0.012 -0.002 239 +21 -20 0.09 146 -25
How could I resolve this issue?