brandon-rhodes / python-jplephem

Python version of NASA DE4xx ephemerides, the basis for the Astronomical Alamanac
MIT License
110 stars 29 forks source link

Extract data type 2 raw coefficients #28

Closed ChristopherRabotin closed 5 years ago

ChristopherRabotin commented 5 years ago

What would be the best approach to extract the raw coefficients in a data type 2 BSP file?

Thanks

brandon-rhodes commented 5 years ago

Good question! There's a low-level call to fetch coefficients from a segment, but it deserves something more visible. I've just added a new method and released Skyfield version 2.9:

>>> initial_epoch, interval_length, coefficients = segment.load_array()
>>> print(coefficients.shape)

It's also mentioned in the updated docs:

https://pypi.org/project/jplephem/

Enjoy!

brandon-rhodes commented 5 years ago

(Oh, and, for the record, it was added in:)

7dae84d506edeccf81899ff5417448f4e4895161

ChristopherRabotin commented 5 years ago

Great thanks that was blazing fast!