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

Trim filtered table to original time range in TabOpLowPassFilter #3969

Merged
merged 5 commits into from
Nov 19, 2024

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);
}
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

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!

@nickbianco nickbianco merged commit a5bb517 into main Nov 19, 2024
12 of 13 checks passed
@nickbianco nickbianco deleted the trim_filtered_table_fix branch November 19, 2024 17:59
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