Skip to content

Set minimum dwi_denoise_window to 3#1064

Merged
tsalo merged 3 commits into
mainfrom
fix-dwidenoise
Jun 12, 2026
Merged

Set minimum dwi_denoise_window to 3#1064
tsalo merged 3 commits into
mainfrom
fix-dwidenoise

Conversation

@tsalo

@tsalo tsalo commented Jun 12, 2026

Copy link
Copy Markdown
Member

Closes #1063.

Changes proposed in this pull request

  • Ensure dwi_denoise_window is at least 3, as a value of 1 raises an error in dwidenoise.

@tsalo tsalo added the bug Something isn't working label Jun 12, 2026
@tsalo tsalo requested a review from Copilot June 12, 2026 14:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the DWI merge/denoising workflow to prevent dwidenoise from being invoked with an invalid/unsafe denoising window (specifically avoiding an extent of 1,1,1), addressing the crash described in issue #1063 for low-volume DWI series.

Changes:

  • Clamp the automatically computed dwi_denoise_window to be at least 3 when using dwidenoise.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread qsiprep/workflows/dwi/merge.py Outdated
@codecov-commenter

codecov-commenter commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.33%. Comparing base (0fb1eac) to head (6f74cb4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
qsiprep/cli/parser.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1064   +/-   ##
=======================================
  Coverage   47.33%   47.33%           
=======================================
  Files          66       66           
  Lines        9890     9891    +1     
  Branches     1098     1098           
=======================================
+ Hits         4681     4682    +1     
  Misses       4978     4978           
  Partials      231      231           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread qsiprep/cli/parser.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@tsalo tsalo merged commit 25a5919 into main Jun 12, 2026
23 checks passed
@tsalo tsalo deleted the fix-dwidenoise branch June 12, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dwidenoise using wrong automatic extent, causing qsiprep to crash for DWI data with less than 27 volumes

3 participants