[ENH] - Add average_reconstructions function#289
Merged
TomDonoghue merged 3 commits intomainfrom Jul 21, 2023
Merged
Conversation
ryanhammonds
approved these changes
Jul 19, 2023
Contributor
ryanhammonds
left a comment
There was a problem hiding this comment.
Looks good! Left a minor comment about duplicate checks that can be ignored
|
|
||
| avg_funcs = {'mean' : np.nanmean, 'median' : np.nanmedian} | ||
| if avg_method not in avg_funcs.keys(): | ||
| raise ValueError("Requested average method not understood.") |
Contributor
There was a problem hiding this comment.
The above checks are duplicated in average_fg and could be moved to a shared check func.
Member
Author
There was a problem hiding this comment.
Yeh, I agree! I didn't go for that here, because there are related changes in #283 that add a general function for averaging data, but I didn't bother trying to backport that, and so the plan is to consolidate this into the 2.0 release and clean up the code here when merging!
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.
Adds a new
average_reconstructionsfunction as a minor helper function - an addition mentioned in #227Note: the last commit is unrelated to the new function - it's just a small update to the aliasing of
plot_spectrumtoplot_spectra- moving this alias to the file means thatfrom fooof.plts.spectra import plot_spectrumshould work now whereas is would fail otherwise.