Short-bus / pilomar

RaspberryPi based miniature observatory
https://shortbus.blog/
GNU General Public License v3.0
63 stars 14 forks source link

Fresh build of system fails to calculate some constellation positions in MarkupPreview #22

Closed Short-bus closed 8 months ago

Short-bus commented 9 months ago

Fresh build from scratch of pilomar on RPi pulls newer version of Skyfield, and potentially different copy of the constellation mappings from the web. Either the pandas data pulled from the web contains some invalid entries, or there is a change in the skyfield Star.from_dataframe(FromRec) method has some other problem with the data.

As a workaround have built in more tolerance of failures into the routine, and star locations are now constructed from RADEC co-ordinates which is accurate enough for our purposes. But underlying cause is not clear yet. Error message was not clear about the cause of the problem but suggested datatype incompatibility on some records.

The new build is using Skyfield 1.46, previous working build used Skyfield 1.39 Need to compare the constellationship data file on old and new builds too for any differences there.

Consider removing Pandas from the application totally and organising the underlying data in a simpler safer form. Pandas inclusion has taken a lot of development and debugging time overall.

Short-bus commented 9 months ago

Constellationship file is taken from Stellarium source.

StellariumUrl = ('https://raw.githubusercontent.com/Stellarium/stellarium/master/skycultures/modern/constellationship.fab')

Imported using Skyfield import routine.

StellariumConstellations = stellarium.parse_constellations(f)

But star locations then come from the Hipparcos catalog.

HipparcosDf = pandas.read_pickle(HipparcosCacheFile)

Short-bus commented 8 months ago

New version seems to be stable. Longterm issue to remove Pandas entirely will be handled separately when time is available.