You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/opt/anaconda3/lib/python3.8/site-packages/tess_ephem/ephem.py in init(self, target, start, stop, step, location, id_type)
41 """
42 log.info(f"Started querying JPL/Horizons for for ephemeris (id='{target}')")
---> 43 eph = _get_horizons_ephem(
44 id=target,
45 id_type=id_type,
/opt/anaconda3/lib/python3.8/site-packages/tess_ephem/ephem.py in _get_horizons_ephem(id, start, stop, step, id_type, location, quantities)
127 )
128 t = Horizons(id=id, id_type=id_type, location=location, epochs=epochs)
--> 129 result = t.ephemerides(quantities=quantities)
130 log.debug(f"Received {len(result)} ephemeris results")
131 return result
/opt/anaconda3/lib/python3.8/site-packages/astroquery/utils/class_or_instance.py in f(*args, **kwds)
23 def f(*args, **kwds):
24 if obj is not None:
---> 25 return self.fn(obj, *args, **kwds)
26 else:
27 return self.fn(cls, *args, **kwds)
/opt/anaconda3/lib/python3.8/site-packages/astroquery/utils/process_asyncs.py in newmethod(self, *args, **kwargs)
27 if kwargs.get('get_query_payload') or kwargs.get('field_help'):
28 return response
---> 29 result = self._parse_result(response, verbose=verbose)
30 self.table = result
31 return result
/opt/anaconda3/lib/python3.8/site-packages/astroquery/jplhorizons/core.py in _parse_result(self, response, verbose)
1294 return None
1295 else:
-> 1296 data = self._parse_horizons(response.text)
1297
1298 return data
/opt/anaconda3/lib/python3.8/site-packages/astroquery/jplhorizons/core.py in _parse_horizons(self, src)
1153 end_idx = i
1154 break
-> 1155 raise ValueError(('Ambiguous target name; provide '
1156 'unique id:\n%s' %
1157 '\n'.join(src[idx + 2:end_idx])))
I have a list of more that generate this error if that would be useful. It looks like maybe Horizons considers different apparitions of comets as different objects? (Maybe the non-gravitational effects on their orbits is why horizons does this? If so, maybe we always want the most recent epoch. But I'm not quite sure how to specify that...)
When using tess_ephem to check on a comet, sometimes a ValueError is raised due to an ambiguous target name. For example:
tt = ephem("C/1995 O1", verbose=True)
Results in:
ValueError Traceback (most recent call last)
in
----> 1 tt = ephem("C/1995 O1", verbose=True)
/opt/anaconda3/lib/python3.8/site-packages/tess_ephem/ephem.py in ephem(target, time, verbose, id_type, interpolation_step)
175 start = time[0] - 7
176 stop = time[-1] + 7
--> 177 te = TessEphem(
178 target, start=start, stop=stop, step=interpolation_step, id_type=id_type
179 )
/opt/anaconda3/lib/python3.8/site-packages/tess_ephem/ephem.py in init(self, target, start, stop, step, location, id_type)
41 """
42 log.info(f"Started querying JPL/Horizons for for ephemeris (id='{target}')")
---> 43 eph = _get_horizons_ephem(
44 id=target,
45 id_type=id_type,
/opt/anaconda3/lib/python3.8/site-packages/tess_ephem/ephem.py in _get_horizons_ephem(id, start, stop, step, id_type, location, quantities)
127 )
128 t = Horizons(id=id, id_type=id_type, location=location, epochs=epochs)
--> 129 result = t.ephemerides(quantities=quantities)
130 log.debug(f"Received {len(result)} ephemeris results")
131 return result
/opt/anaconda3/lib/python3.8/site-packages/astroquery/utils/class_or_instance.py in f(*args, **kwds)
23 def f(*args, **kwds):
24 if obj is not None:
---> 25 return self.fn(obj, *args, **kwds)
26 else:
27 return self.fn(cls, *args, **kwds)
/opt/anaconda3/lib/python3.8/site-packages/astroquery/utils/process_asyncs.py in newmethod(self, *args, **kwargs)
27 if kwargs.get('get_query_payload') or kwargs.get('field_help'):
28 return response
---> 29 result = self._parse_result(response, verbose=verbose)
30 self.table = result
31 return result
/opt/anaconda3/lib/python3.8/site-packages/astroquery/jplhorizons/core.py in _parse_result(self, response, verbose)
1294 return None
1295 else:
-> 1296 data = self._parse_horizons(response.text)
1297
1298 return data
/opt/anaconda3/lib/python3.8/site-packages/astroquery/jplhorizons/core.py in _parse_horizons(self, src)
1153 end_idx = i
1154 break
-> 1155 raise ValueError(('Ambiguous target name; provide '
1156 'unique id:\n%s' %
1157 '\n'.join(src[idx + 2:end_idx])))
ValueError: Ambiguous target name; provide unique id:
Record # Epoch-yr >MATCH DESIG< Primary Desig Name
-------- -------- ------------- ------------- -------------------------
90002087 1996 C/1995 O1 C/1995 O1 Hale-Bopp
90002088 2008 C/1995 O1 C/1995 O1 Hale-Bopp
The text was updated successfully, but these errors were encountered: