daraghhollman / JUPT

Juno spacecraft plotting tool for Waves, MAG, JADE/JEDI, and Trajectories
MIT License
3 stars 3 forks source link

cdflib: varinq("variable") is not subscriptable in later versions #1

Open daraghhollman opened 1 year ago

daraghhollman commented 1 year ago

Issue in CodeSnippets/cdfExample.py:

unit = cdf_file.varinq("Epoch")["Data_Type_Description"] doesn't work in cdflib 1.0.3.

This is avoidable by using the new syntax unit = cdf_file.varinq("Epoch").Data_Type_Description, however, this conflicts somehow later in the script with astropy throwing an error that the cdf time format doesn't exist:

time = Time(epoch, format="cdf_tt2000")

Temporarily this means we are required to use cdflib==0.4.4 - as adjusted in requirements.txt - although some testing could be carried out to see what is the latest version compatible.