-
Notifications
You must be signed in to change notification settings - Fork 11
Firwin macro #85
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
Open
SpookyYomo
wants to merge
27
commits into
qsib-cbie:main
Choose a base branch
from
SpookyYomo:firwin_macro
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Firwin macro #85
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
378daa2
Add kaiser_atten
SpookyYomo d2c78ec
Add kaiser_beta
SpookyYomo 7fdef5c
Add kaiserord
SpookyYomo 0025daf
Add signal::windows namespace and helper functions
SpookyYomo 1a2feb6
Add Boxcar window type
SpookyYomo e860413
Add triangle window
SpookyYomo 87384f4
Add general cosine window
SpookyYomo b3b4ff9
Add Blackman window
SpookyYomo e5033da
Add more documentation to signal module
SpookyYomo 35aad91
Add general gaussian window
SpookyYomo 575e428
Add General Hamming
SpookyYomo a052c20
Add Hamming window
SpookyYomo 4696efc
Add kaiser window
SpookyYomo fe309d3
Add library level errors
SpookyYomo ca2a064
Add Nuttall window
SpookyYomo cd9b27d
Add convenience GetWindow impl for Window variants
SpookyYomo df21ea3
Add scipy.signal.windows.get_window function
SpookyYomo fe8c79a
Add firwin
SpookyYomo bff6c9d
Fix lack of use of num_traits::identities
SpookyYomo 6a456de
Fix clippy errors in Triangle
SpookyYomo 7760754
fix: Add zero numtap check in Firwin validation
SpookyYomo 09c93a4
docs: Add macro use in Triangle
SpookyYomo ab8e89f
test: Add get_window macro test in Triangle
SpookyYomo c300bc8
Fix improper error message from window/width both being some
SpookyYomo 50b02ee
feat: Add get_window macro
SpookyYomo 1615277
Hack macro-scoping into crate::signal for `get_window`
SpookyYomo 94a951f
Remove need to import GetWindow trait for users of `get_window`
SpookyYomo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| use core::{error, fmt}; | ||
|
|
||
| /// Errors raised whilst running sci-rs. | ||
| #[derive(Debug, PartialEq, Eq)] | ||
| #[cfg(feature = "alloc")] | ||
| pub enum Error { | ||
| /// Argument parsed into function were invalid. | ||
| InvalidArg { | ||
| /// The invalid arg | ||
| arg: alloc::string::String, | ||
| /// Explaining why arg is invalid. | ||
| reason: alloc::string::String, | ||
| }, | ||
| /// Two or more optional arguments passed into functions conflict. | ||
| ConflictArg { | ||
| /// Explaining what arg is invalid. | ||
| reason: alloc::string::String, | ||
| }, | ||
| } | ||
|
|
||
| impl fmt::Display for Error { | ||
| fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
| todo!() | ||
| } | ||
| } | ||
|
|
||
| impl error::Error for Error {} | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,3 +41,6 @@ pub mod special; | |
| /// Debug plotting | ||
| #[cfg(feature = "plot")] | ||
| pub mod plot; | ||
|
|
||
| /// Errors | ||
| pub mod error; | ||
Oops, something went wrong.
Oops, something went wrong.
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error Display implementation panics with todo!()
The
Displaytrait implementation forErrorcontains atodo!()macro that will panic at runtime if the error is ever formatted. This occurs when using the{}format specifier, calling.to_string(), or using the?operator in functions returningStringerrors. Sincefirwin_dynand other functions returnResult<_, Error>, any code that attempts to display these errors will crash.