LinkedEarth / pylipd

Development repository for Python LiPD utilities
https://pylipd.readthedocs.io/en/latest/
Apache License 2.0
2 stars 0 forks source link

Error on get_timeseries #26

Closed khider closed 1 year ago

khider commented 1 year ago

For this particular record, there is an error when trying to get the timeseries, which seems related to Uncertainty.

To reproduce:

from pylipd.lipd import LiPD

L = LiPD()
data = ['https://lipdverse.org/data/TjhHrDv0LQ4aazHolZkR/1_0_0//Ocn-WEqPacific.Stott.2007.lpd']
L.load(data)

ts_list = L.get_timeseries(L.get_all_dataset_names())
varunratnakar commented 1 year ago

Uncertainty is a string in this one, whereas we expect a dictionary

"uncertainty": "ANA2003: Mg/Ca=0.38exp(0.09SST), multiple species; Mg/Ca =0.449exp(0.09SST), G ruber, (Anand et al., (2003); sediment trap; error ±1.2°C)"

Does this need to be parsed ? What's the Uncertainty id here ?

varunratnakar commented 1 year ago

Fixed with https://github.com/LinkedEarth/pylipd/commit/c881028a13f711ed31005d63898f8fe5d91e6624 https://github.com/LinkedEarth/pylipd/commit/5586db7c971536e8905434eff4f46e0ecc2108d4

khider commented 1 year ago

Apparently uncertainty can be both float or string