-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CO] get_along and units #77
Comments
Hello, I agree that the original units should be returned. I will have a look at what is going on. Concerning requiring a specific unit for axes, the syntax is the following: Best regards, |
... here is some code to reproduce this issue more easily.
|
So the units argument is somehow needless?! |
It is used for the field itself, e.g. if you want to change the unit of your current. |
Hello @helene-t thank you for your quick response. This was very helpful. Still I don't get the data exported, no matter what the axes orientation is, e.g.
or
What am I doing wrong??? Best regards, Sebastian |
The problem comes from the shape of the axes arrays ((10,1) or (1,10)). Data1D.values expects 1D arrays or lists, but accepts (n,1) shapes. I should add a "squeeze" in the export_along" method to avoid problems. In the meantime, you can squeeze your data before creating the Data1D object, or use |
Hello,
I got some DataND objects with 'Speed' and 'Torque' axis and e.g. 'Current' array data. I wanted to 'export_along' this data but had an issue that is due to some unit issue with get_along method, I think.
If I use 'get_along' without any unit argument, the returned axis will have 'SI' as their units while the original units where 'rpm' and 'Nm'. My expactation would be to get the original units by default. At least the returned axis units shouldn't be 'SI'.
On the other hand, I don't know how to explicitly set the desired unit with more than one axis. In the tutorials there is only the 1D case meantioned (e.g. unit="Speed{rpm}").
So any help on this issue is greatly appreciated.
Best regards, Sebastian
The text was updated successfully, but these errors were encountered: