keenon / AddBiomechanics

A tool to automatically process and share biomechanics data
https://addbiomechanics.org/
Other
27 stars 5 forks source link

Support data trimming to user-provided time ranges #154

Closed nickbianco closed 1 year ago

nickbianco commented 1 year ago

This PR updates the data trimming logic to support trimming based on user-provided time ranges. The time ranges can be specified for each trial individually by providing a dictionary in subjectJson whose keys are the trial names and the values are a two-element arrays specifying the initial and final times.

We still always check to see if the time range between the markers and ground reaction forces are consistent. If not, we trim the markers and forces to the intersection of both time ranges. The remaining trimming logic, if enabled, comes after that.

We also now issue warnings if the either 1) we had to trim the markers/GRFs to be consistent or 2) if trial trimming/segmentation was not enabled, but probably should be.