Skip to content

Add downsampling to demo notebooks#131

Open
ebrahimebrahim wants to merge 2 commits intomainfrom
add-downsampling-to-demo-notebooks
Open

Add downsampling to demo notebooks#131
ebrahimebrahim wants to merge 2 commits intomainfrom
add-downsampling-to-demo-notebooks

Conversation

@ebrahimebrahim
Copy link
Copy Markdown
Collaborator

AI generated PR description

Summary

  • Adds a SUBSAMPLE = True toggle to example-pipeline.py and example-group-template.py so users can quickly run through the notebooks at lower spatial resolution
  • Adds subsample_volume() in util.py (stride-based, takes every Nth voxel) and subsample_dwi() in dwi.py
  • Adds openneuro-py to the [notebooks] dependency group (the old pip-install-on-import pattern doesn't work with uv)
  • Cleans up notebooks/README.md

How subsampling works

Stride-based: arr[::factor, ::factor, ::factor] on the 3 spatial dims, affine scaled to match. Not interpolated resampling — just a quick way to shrink data for trying things out.

Closes #124

@ebrahimebrahim ebrahimebrahim requested a review from sadhana-r April 5, 2026 21:25
ebrahimebrahim and others added 2 commits April 5, 2026 23:19
Adds subsample_volume() to util.py and subsample_dwi() to dwi.py so that
example notebooks can toggle quick low-resolution runs via SUBSAMPLE=True.
Also removes misleading "open .py directly" section from notebooks README.

Closes #124

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The install-on-import pattern using pip doesn't work with uv-managed
venvs. Declare the dependency properly and just import it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ebrahimebrahim ebrahimebrahim force-pushed the add-downsampling-to-demo-notebooks branch from 8ce1025 to 5699b96 Compare April 6, 2026 03:19
@ebrahimebrahim ebrahimebrahim mentioned this pull request Apr 8, 2026
2 tasks
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.

Add optional subsampling to example notebooks

2 participants