Consider "context" -and perhaps "descriptions"- when reading c3d files #193
Replies: 2 comments 4 replies
-
Hi @jorgomezga This is a great idea, I don't personally use these fields but I understand that many people do. However, we need to figure out a clean way that fits well with the TimeSeries/TimeSeriesEvent classes. Currently, TimeSeries events have only two properties: name and time. This makes it very simple to manage with basic functions such as TimeSeries.add_event(time, name), etc. Adding contexts and descriptions would require to either concatenate everything to the event name, which may work well for context: The alternative would be to add metadata to events, a bit like we already have with TimeSeries.data_info. In this case, events would have To be coherent with this new feature, we would need to adapt some TimeSeries methods, obviously TimeSeries.add_event() which would allow a new argument for metadata, probably TimeSeries.plot() which should take optional arguments to plot not only the event names but also other metadata (e.g., context), and maybe several others. Still, I think this would be pretty clean. Would it be something that fits your need and that makes sense for you? |
Beta Was this translation helpful? Give feedback.
-
Hi @jorgomezga This feature is now available using the "include_event_context" option of ktk.read_c3d(), currently in master. It will be available in the next release. |
Beta Was this translation helpful? Give feedback.
-
First of all, thanks for the toolbox! It contains a bunch of quite useful tools for viewing, exploring and manipulating kinetic data.
However, It would be great if the toolkit would consider the fields "context" (reader["parameters"]["EVENT"]["CONTEXTS"]["value"]) -and perhaps "descriptions" (reader["parameters"]["EVENT"]["DESCRIPTIONS"]["value"])- when reading c3d files, as they contain valuable information for bilateral event identification like toe_off and heel_strike. In these cases, the field "context" usually records the side of which the event occurs (https://www.c3d.org/HTML/default.htm?turl=Documents%2Fthec3dfileformat.htm). I'll be happy to help if necessary.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions