Skip to content
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

Time vectors for raw_force and cds.enc.kin are sometimes not aligned (handleForceFromRaw.m) #14

Open
raeedcho opened this issue Feb 3, 2017 · 2 comments

Comments

@raeedcho
Copy link
Contributor

raeedcho commented Feb 3, 2017

Temporary fix by rounding time vectors to sample rate precision.

@mattperich
Copy link
Contributor

handleForceFromRaw is still broken... the number of inputs defined in commonDataStructure and passed in during forceFromNSx is different from the inputs defined in the header of handleForceFromRaw, and in the subsequent code. Clearly someone had a plan there, but I don't think it got implemented properly...

The temporary fix Raeed implemented breaks on the file I'm trying to convert right now. The force actually seems to align properly with the time vector of the kinematics, and the rounding fix breaks that...

@tuckertomlinson
Copy link
Collaborator

this is persistent. The essential problem is that we occasionally get a timestamp that, due to machine precision, is included in one timeseries but not the other. We have addressed this on an ad-hoc basis by fiddling with the roundTime function, but that's obviously just pushing the problem around.

I think the 'correct' solution is to do something like:
-detect the error
-identify which series has the extra point
-confirm no duplicate time points
-confirm no missed timepoints in shorter series
-identify whether extra point is at beginning or at end of series
-truncate series

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants