Repository navigation
Add a multi-channel FDD example script - #74
Merged
Merged
Conversation
The examples directory had no end-to-end demonstration of `tm.identify_fdd`. The new script follows the issue's list: - `tm.Structure` with three equal stories, printing the analytical frequencies (1.829 / 5.124 / 7.405 Hz). - Three synchronized channels synthesized from those modes with unequal amplitude weights and a fixed `numpy.random.default_rng` seed. - A temporary-directory CSV round trip through `tm.load_multichannel_csv`. - `tm.identify_fdd`, printing recognized frequencies next to the model frequencies, and `tm.modal_assurance_criterion` against the analytical shape of each mode. Verified locally on Python 3.12: - The script identifies all three modes within one resolution bin and reports MAC 1.000 for each (the middle mode is best resolved with `nperseg=2048`; a comment in the script records why). - `python -m pytest` passes: 359 passed, 1 skipped, coverage 92.19%. The new script is executed automatically by `test_examples_run`. - `python -m ruff check .`, `python -m ruff format --check .`, `python -m mypy` and `python -m mkdocs build --strict` pass. docs/numerical-methods.md mentions the example next to the FDD section, and docs/changelog.md has a line under Unreleased/Added.
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #71.
New
examples/multichannel_fdd.py, following the issue's suggested flow:tm.Structurewith three equal stories; its analytical frequencies(1.829 / 5.124 / 7.405 Hz) are printed first.
unequal amplitude weights and a fixed
numpy.random.default_rngseed.tm.load_multichannel_csv.tm.identify_fddprints the identified frequencies next to the modelfrequencies.
tm.modal_assurance_criterioncompares each identified shape with theanalytical model shape.
Output on Python 3.12:
Verified locally:
python -m pytestpasses (359 passed, 1 skipped, coverage 92.19%);the new script runs under
test_examples_runin a couple of seconds.python -m ruff check .,python -m ruff format --check .,python -m mypyandpython -m mkdocs build --strictpass.docs/numerical-methods.mdmentions the example next to the multi-channelFDD section, and
docs/changelog.mdhas a line under Unreleased/Added.