Skip to content

MNT,DOC clean up notebooks and improve FIR notebook #44

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

Merged
merged 4 commits into from
Mar 31, 2025

Conversation

mvdoc
Copy link
Collaborator

@mvdoc mvdoc commented Mar 31, 2025

No description provided.

@mvdoc mvdoc requested a review from Copilot March 31, 2025 21:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mvdoc mvdoc merged commit 6992ba8 into gallantlab:main Mar 31, 2025
12 checks passed
@mvdoc mvdoc deleted the mnt/cleanup branch March 31, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant