neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
77 stars 7 forks source link

Remove extra validation step when calling kinematics methods through the accessor #203

Closed niksirbi closed 3 weeks ago

niksirbi commented 3 weeks ago

This was brought up by @vigji during this discusssion on zulip.

When computing a kinematic variable, e.g. via movement.analysis.kinematics.compute_velocity(), only the time dimensions should be validated, I think that was the intention behind the _validate_time_dimension utility created by @lochhh.

However, when calling the same function via the accessor, i.e ds.move.compute_velocity, the underlying code contains a call to the .move.validate() method, which validates all dimensions. So it seems like we get different behaviour if we use the accessor vs directly using the functions from the kinematics module.

We haven't yet decided how we'll address the issues raised in the aforementioned zulip discussion, but I think we should remove that validator call regardless. Or is it playing some integral role I've missed?