MNT,DOC clean up notebooks and improve FIR notebook#44
Merged
mvdoc merged 4 commits intogallantlab:mainfrom Mar 31, 2025
Merged
MNT,DOC clean up notebooks and improve FIR notebook#44mvdoc merged 4 commits intogallantlab:mainfrom
mvdoc merged 4 commits intogallantlab:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR focuses on cleaning up notebooks and improving the FIR notebook by introducing a new helper function for run‐based z-scoring and updating test cases and notebook examples to use it. Key changes include:
- Adding the new function zscore_runs to voxelwise_tutorials/utils.py to simplify z-scoring operations.
- Updating tests and notebooks to replace manual splitting and concatenation with zscore_runs.
- Refining markdown text and correcting terminology (e.g., “mamma” to “mammal”) for consistency.
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| voxelwise_tutorials/utils.py | Introduced zscore_runs to standardize run-level z-scoring. |
| voxelwise_tutorials/tests/test_utils.py | Added tests for the new zscore_runs function. |
| voxelwise_tutorials/tests/test_delays_toy.py | Unchanged functionality; tests updated to accommodate new routines. |
| voxelwise_tutorials/delays_toy.py | No code changes; context for FIR simulation. |
| All Notebooks in tutorials/shortclips/ | Replaced manual zscore operations with calls to zscore_runs and updated text for clarity. |
Files not reviewed (1)
- tutorials/Makefile: Language not supported
Comments suppressed due to low confidence (1)
voxelwise_tutorials/utils.py:101
- [nitpick] Preserving the original data type by casting the z-scored data back to the input type may lead to loss of precision, especially when the input is an integer array. Consider keeping the result as a float to retain the statistical properties of the z-score computation.
orig_dtype = data.dtype
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.
No description provided.