SciDataTool
SciDataTool copied to clipboard
Bug: Units rpm and do not match
Hello @helene-t ,
I got some data object but I'm not able to use plot method due to an error. My object is as follows
from SciDataTool import Data1D, DataND
import numpy as np
spd = np.linspace(0, 1000, 20)
current = np.ones((20,1))
speed = Data1D(name="Speed", unit="rpm", values=spd, is_components=True)
axes = [speed]
kwargs = dict(name="Current RMS", unit="A", symbol="I")
data = DataND(axes=axes, values=current, **kwargs)
data.plot()
What am I doing wrong?
Best regards, Sebastian
Hello @SebGue ,
Sorry for the late reply. Units are initialized from unit_dict, a dict defined in Functions/Plot/init.py The default unit for the speed axis is "rpm", but it uses the name "speed" instead of "Speed". We should improve the code in order to use the unit from the axis itself. In the meantime, you can simply rename your axis "speed".
Best regards, Hélène