NREL / infrasys

Data store for components and time series in support of Python-based modeling packages
https://nrel.github.io/infrasys/
BSD 3-Clause "New" or "Revised" License
5 stars 2 forks source link

Time series drop units of `pint.Quantity`s that do not subclass `infrasys.BaseQuantity` #54

Closed GabrielKS closed 3 days ago

GabrielKS commented 1 week ago

When an infrasys.BaseQuantity is added to a SingleTimeSeries, its units are preserved, but when a non-BaseQuantity pint.Quantity is added, its units are dropped. I believe this is the culprit: https://github.com/NREL/infrasys/blob/169accf25e5be536ef86dd2c078c5d658fcdf3ec/src/infrasys/time_series_models.py#L344 .