Skip to content

Add DESIGNER adaptive MP-PCA preprocessing option - #339

Draft
gonzoBlackMamba wants to merge 1 commit into
masterfrom
feature/adaptive-mppca-v2
Draft

gonzoBlackMamba wants to merge 1 commit into
masterfrom
feature/adaptive-mppca-v2

Conversation

@gonzoBlackMamba

Copy link
Copy Markdown
Collaborator

Adds DESIGNER-v2 adaptive MP-PCA as a selectable denoising backend to the pyDKE 2.0.0 preprocessing pipeline. Existing --denoise and --standard behavior continues to use MRtrix MP-PCA by default.

Use --denoise-method adaptive --extent 7,7,7 --denoise-patch-size 274 --nthreads 3 to select adaptive patches with Frobenius shrinkage and Cordero-Grande noise estimation. The backend preserves gradients/acquisition metadata, produces the existing noise-map output, limits nested BLAS threads, and records parameters to prevent incompatible resume reuse. No fitting or eddy changes are included.

The implementation is pinned to NYU-DiffusionMRI/DESIGNER-v2 commit 8588f44c46dc4662ba9b477ac0b5893320d1e863 with the original copyright and non-commercial research license retained. Documented adapter changes cover constant patches, deterministic SVD failure, and worker control. Real magnitude data only; DESIGNER wrap padding is retained.

Validation:

  • 20 targeted tests passed: 12 new adaptive/metadata/resume tests plus 8 existing denoising tests.
  • Exact signal/sigma/rank agreement with upstream on all 64 voxels of a synthetic volume; committed reference values provide regression coverage.
  • Real MRtrix conversion verified gradients, phase-encoding property, affine and signal values.
  • CLI help exposes both new options; git diff whitespace check passed.

Review limitations:

  • Tests ran in the installed Python 3.12 environment, not the declared Python 3.14 environment. Full clinical-data validation has not been run.
  • Local wheel build is blocked by the installed older setuptools rejecting the baseline's SPDX-string project.license declaration.
  • The existing uv.lock still refers to pydesigner-dwi and does not match the current pydke project metadata; lock regeneration needs review in the supported build environment, including the new explicit threadpoolctl dependency.

Branch starts from current master d9e71bd (version 2.0.0), which includes the pyDKE rename after the v2.0.0 tag. The active study pipeline and its frozen implementation were not changed.

This branch has not been deployed

No deployments
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