Future exciting change to TimeSeries() that may potentially break some code (+ very easy fix) #202
felixchenier
announced in
Announcements
Replies: 1 comment 4 replies
-
Hi Felix, I want to ask question regarding file-writing. Since, I use OpenSim quite a lot, is there any possibilities to write .trc or .mot file? because if we want to use marker data in OpenSim we need .trc or .mot file or is this outside of the scope of the package? Regards, |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the next release (0.14), the TimeSeries constructor will change slightly in a way that could break your code if you initialized a TimeSeries using a list of arguments. I don't think many people will be affected because such TimeSeries initialization has never been used in examples or tutorials.
More precisely, if your code creates a TimeSeries from scratch (in opposition to reading a file, e.g., ktk.read_c3d):
Still working
Creating an empty TimeSeries
Creating a TimeSeries with time and data as keyword arguments
Won't work anymore
Creating a TimeSeries with time and data as a list of arguments
If you happen to have such TimeSeries initialization in your code, it is highly recommended to change for an initialization using keyword arguments (which is generally a better coding practice anyway) before updating to the upcoming 0.14 version.
This is related to new feature #199 which will bring a very exciting way to create a TimeSeries directly from many types of variables, by directly casting these variables to TimeSeries. For instance:
Beta Was this translation helpful? Give feedback.
All reactions