-
Notifications
You must be signed in to change notification settings - Fork 324
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
[Bug] Low Pass Filtering of Time #3968
Comments
This seems to be related to this issue |
@alexbeattie42 the fix at #3969 has been merged. Let me know if that resolves this issue. |
@nickbianco I have just tested the fix and it seems to have solved it. The only problem I am noticing now is that the first data point is removed from the output. So I think the trimming is chopping one too many elements off the result after filtering. |
@alexbeattie42 thanks for reporting. My guess is that this issue related to how opensim-core/OpenSim/Common/TimeSeriesTable.h Line 467 in db5dcd4
But opensim-core/OpenSim/Common/TimeSeriesTable.h Line 346 in db5dcd4
It would be helpful to take a look at what's happening with your data. Willing to take a look? If not, I could try to give it a shot in the next day or two. |
Thanks for the guidance! It looks like it is a floating point precision issue. The data that I am using starts with uniformly sampled decimal time points every 0.025 seconds. After processing with the I have determined the problem is that the The SimTK docs say "If Real is double (the normal case) then Eps ~= 1e-16". The result of Manually searching for where 0 should be yields that the
The things that I believe would be good to include are:
|
Nice job finding the root issue @alexbeattie42! I largely agree with proposed changes. We will try to prioritize this in our development plans since this likely affects a lot of users. If you're interested in submitting a PR yourself, I'd be happy to review it. |
When using the Low Pass filter
TabOpLowPassFilter
the time column is also filtered/shifted.A simple reproduction is available here in the
LowPassFilterTime
folderThis code is used in the example
When starting with the input data file that contains rows of this form:
After running the above table processor with low-pass filtering it becomes:
If you run the same code and comment out the low-pass filter step, the time remains unchanged as expected. The low-pass filter is filtering or shifting the time column which shouldn't be happening.
Disabling padding by setting this line to false seems to fix the problem. That leads me to believe the issue is caused here where the time column is padded since here (where the padding is done) prepends data (so I suppose it goes backwards in time?)
The text was updated successfully, but these errors were encountered: