Repository navigation
Conversation
`eegnb/analysis/analysis_utils.py` was a copy of `utils.py` added in NeuroTechX#263, and its `plot_conditions` drifted away from the one in `utils.py`. NeuroTechX#330 and NeuroTechX#329 then fixed each copy separately, so the two still differ in what they accept. 1a5b387 pointed the N170 example at `eegnb.analysis.utils` and noted that "these should be merged into the same file in a future PR". This does that, keeping `utils.py`. - Keeps the NeuroTechX#329 implementation and moves it into `eegnb/analysis/utils.py`. It accepts marker numbers, event names or condition keys for both `conditions` and `diff_waveform`, and an unknown event name raises `ValueError` instead of plotting nothing. - Deletes `eegnb/analysis/analysis_utils.py`. It has nothing that isn't already in `utils.py`. The examples, `pipelines.py` and the tests now import from `eegnb.analysis.utils`. Code outside the repository that imports `eegnb.analysis.analysis_utils` must switch to `eegnb.analysis.utils`. - Fixes `channel_count` of 1 or 2, which raised `IndexError` because `plt.subplots` returned a one-dimensional axes array. It now passes `squeeze=False`. Both plotting test files are kept and now test the one function. The N170, P300 and cueing gallery figures render within their microvolt limits.
This branch has not been deployed
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.
eegnb/analysis/analysis_utils.pywas a copy ofutils.pyadded in #263, and itsplot_conditionsdrifted away from the one inutils.py. #330 and #329 then fixed each copy separately, so the two still differ in what they accept. 1a5b387 pointed the N170 example ateegnb.analysis.utilsand noted that "these should be merged into the same file in a future PR". This does that, keepingutils.py.eegnb/analysis/utils.py. It accepts marker numbers, event names or condition keys for bothconditionsanddiff_waveform, and an unknown event name raisesValueErrorinstead of plotting nothing.eegnb/analysis/analysis_utils.py. It has nothing that isn't already inutils.py. The examples,pipelines.pyand the tests now import fromeegnb.analysis.utils. Code outside the repository that importseegnb.analysis.analysis_utilsmust switch toeegnb.analysis.utils.channel_countof 1 or 2, which raisedIndexErrorbecauseplt.subplotsreturned a one-dimensional axes array. It now passessqueeze=False.Both plotting test files are kept and now test the one function. The N170, P300 and cueing gallery figures render within their microvolt limits.