Skip to content

Trim filtered table to original time range in TabOpLowPassFilter#3969

Merged
nickbianco merged 5 commits intomainfrom
trim_filtered_table_fix
Nov 19, 2024
Merged

Trim filtered table to original time range in TabOpLowPassFilter#3969
nickbianco merged 5 commits intomainfrom
trim_filtered_table_fix

Conversation

@nickbianco
Copy link
Member

@nickbianco nickbianco commented Nov 16, 2024

Fixes issue #3287

Brief summary of changes

Updates TabOpLowPassFilter to trim the table back to the original time range.

Testing I've completed

Added a unit test to testTableProcessor.cpp.

Looking for feedback on...

CHANGELOG.md (choose one)

  • updated.

This change is Reviewable

CHECK(out.getNumRows() == 6);
CHECK(out.getIndependentColumn().front() == 1);
CHECK(out.getIndependentColumn().back() == 6);
} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: missing newline at eof

@nickbianco nickbianco requested a review from tkuchida November 18, 2024 20:01
Copy link
Member Author

@nickbianco nickbianco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tkuchida! Requesting a quick re-review since I made some additional changes on top of the requested fix.

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @tkuchida)

Copy link
Member

@tkuchida tkuchida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One optional suggestion 👇

TabOpLowPassFilter() { constructProperty_cutoff_frequency(-1); }
OpenSim_DECLARE_PROPERTY(trim_to_original_time_range, bool,
"Trim the rows of the output table to match the original table's "
"time range after padding and filtering (default: true).");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps delete "after padding" as I don't think the user-facing documentation explains padding (what/why).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member Author

@nickbianco nickbianco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @tkuchida)

TabOpLowPassFilter() { constructProperty_cutoff_frequency(-1); }
OpenSim_DECLARE_PROPERTY(trim_to_original_time_range, bool,
"Trim the rows of the output table to match the original table's "
"time range after padding and filtering (default: true).");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@nickbianco
Copy link
Member Author

Merging this. Thanks @tkuchida!

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

Successfully merging this pull request may close these issues.

2 participants