Update TableUtilities::filterLowpass to apply padding after resampling#4020
Update TableUtilities::filterLowpass to apply padding after resampling#4020nickbianco merged 4 commits intomainfrom
TableUtilities::filterLowpass to apply padding after resampling#4020Conversation
…g to preserve initial time points
aymanhab
left a comment
There was a problem hiding this comment.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nickbianco)
OpenSim/Common/TableUtilities.cpp line 151 at r1 (raw file):
const int numRows = (int)table.getNumRows(); OPENSIM_THROW_IF(numRows < 4, Exception,
I think if the numRows was < 4 we probably wouldn't get here? or it depends? maybe it wouldn't hurt anyway
nickbianco
left a comment
There was a problem hiding this comment.
Thanks @aymanhab!
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @aymanhab)
OpenSim/Common/TableUtilities.cpp line 151 at r1 (raw file):
Previously, aymanhab (Ayman Habib) wrote…
I think if the numRows was < 4 we probably wouldn't get here? or it depends? maybe it wouldn't hurt anyway
Neither isUniform or resampleWithInterval make this check, so I think it's worth including. Doesn't hurt to have it.
Fixes issue #4017
Brief summary of changes
This change updates
TableUtilities::filterLowpassto apply padding after resampling, so that the initial time point in an uploaded table is preserved. This does not guarantee that the final time point will be preserved or the number of rows will be preserved as those may need to change based on the resampling frequency.Drive-by: corrected a typo in the change log.
Testing I've completed
Added a unit test to
testTableProcessor.cpp.Looking for feedback on...
CHANGELOG.md (choose one)
This change is