Improve flexibility and robustness of Acoustics Module#433
Open
jmcvey3 wants to merge 6 commits intoMHKiT-Software:developfrom
Open
Improve flexibility and robustness of Acoustics Module#433jmcvey3 wants to merge 6 commits intoMHKiT-Software:developfrom
jmcvey3 wants to merge 6 commits intoMHKiT-Software:developfrom
Conversation
…PSDs are calculated
Contributor
Author
|
Looks like some remaining dependency issues related to timestamps |
akeeste
reviewed
Feb 3, 2026
| raise TypeError("'fn' must be a numeric type (int or float).") | ||
| if not isinstance(fmax, (int, float, np.ndarray)): | ||
| raise TypeError("'fmax' must be a numeric type (int or float).") | ||
|
|
Contributor
There was a problem hiding this comment.
Add call to _check_numeric in place of the removed error check
Suggested change
| _check_numeric(fn, "fn") | |
| _check_numeric(fmax, "fmax") |
Comment on lines
+519
to
+522
| if not hasattr(pressure, "sensitivity"): | ||
| _check_numeric(pressure.sensitivity, "pressure.sensitivity") | ||
| if not hasattr(pressure, "fs"): | ||
| _check_numeric(pressure.fs, "pressure.fs") |
Contributor
There was a problem hiding this comment.
We should only check that the values are numeric if they exist. If the values are given then the type is not checked:
Suggested change
| if not hasattr(pressure, "sensitivity"): | |
| _check_numeric(pressure.sensitivity, "pressure.sensitivity") | |
| if not hasattr(pressure, "fs"): | |
| _check_numeric(pressure.fs, "pressure.fs") | |
| if hasattr(pressure, "sensitivity"): | |
| _check_numeric(pressure.sensitivity, "pressure.sensitivity") | |
| else | |
| raise TypeError("'pressure.sensitivity' not provided.") | |
| if hasattr(pressure, "fs"): | |
| _check_numeric(pressure.fs, "pressure.fs") | |
| else | |
| raise TypeError("'pressure.fs' not provided.") |
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.
There are three main changes in this pull request:
Minor changes are refactoring some of the argument type checks to clean them up.