-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
Description
I have downloaded an SPK kernel of data type 1 form JPL horizons http://ssd.jpl.nasa.gov/x/spk.html in binary and ascii format. The kernel can be loaded using jplephem.spk.SPK but I get an error when I compute the position of an object.
In [22]: kernel[10,1000012].compute(2457400)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/home/mdevalbo/.local/lib/python3.5/site-packages/jplephem/spk.py in generate(self, tdb, tdb2)
151 try:
--> 152 initial_epoch, interval_length, coefficients = self._data
153 except AttributeError:
AttributeError: 'Segment' object has no attribute '_data'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-22-5dbf5fd43a50> in <module>()
----> 1 kernel[10,1000012].compute(2457400)
/home/mdevalbo/.local/lib/python3.5/site-packages/jplephem/spk.py in compute(self, tdb, tdb2)
104 def compute(self, tdb, tdb2=0.0):
105 """Compute the component values for the time `tdb` plus `tdb2`."""
--> 106 for position in self.generate(tdb, tdb2):
107 return position
108
/home/mdevalbo/.local/lib/python3.5/site-packages/jplephem/spk.py in generate(self, tdb, tdb2)
152 initial_epoch, interval_length, coefficients = self._data
153 except AttributeError:
--> 154 self._data = self._load()
155 initial_epoch, interval_length, coefficients = self._data
156
/home/mdevalbo/.local/lib/python3.5/site-packages/jplephem/spk.py in _load(self)
120 component_count = 6
121 else:
--> 122 raise ValueError('only SPK data types 2 and 3 are supported')
123
124 init, intlen, rsize, n = self.daf.map_array(self.end_i - 3, self.end_i)
ValueError: only SPK data types 2 and 3 are supported
Is there any way to get an SPK kernel from Horizons that is supported by jplephem?
Reactions are currently unavailable