Repository navigation
[ENH] Add SS3T CSD (single-shell 3-tissue) via cs_dmri - #235
Open
chiuhoward wants to merge 4 commits into
Open
chiuhoward wants to merge 4 commits into
chiuhoward wants to merge 4 commits into
Conversation
Adds ss3t_params (odf_model="SS3TCSD"): Dhollander responses, SS3T-CSD and mtnormalise from cs_dmri on pyAFQ's data, gtab and brain mask. The WM fODF is projected from cs_dmri's tournier07 basis onto descoteaux07; GM and CSF signal fractions are written alongside. Optional extra pyAFQ[ss3t]. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace the end-to-end SS3T vs CSD peak-agreement test in test_api.py with a unit test in test_csd.py that checks the projection against cs_dmri's own export of an SS3T fit to DIPY's descoteaux07 basis. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
arokem
reviewed
Nov 19, 2026
arokem
left a comment
Member
There was a problem hiding this comment.
Overall looks good but I'm not sure about that conversion.
| ] | ||
|
|
||
|
|
||
| def _tournier07_to_descoteaux07(sh): |
Member
There was a problem hiding this comment.
I'm not sure this is the best way to do this. @36000 : I think you have some code that does this without the projection to a sphere? Could you please share?
This branch has not been deployed
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.
Addresses #233. Independent of #234 (either merge order works); the HBN comparison below was run with it.
ss3t_paramsinAFQ/tasks/data.py, next torumba_params: SS3T CSD via cs_dmri on pyAFQ'sdata,gtabandbrain_mask(so b=0 + one shell via the existingmin_bval/max_bval). Writes_model-ss3tcsd_param-{wm,gm,csf}_dwimap.nii.gz. One kwarg,ss3t_sh_order_max(default 8), named like the CSD/OPDT/CSA ones.odf_model="SS3TCSD"tracks from it with no change to tracking.tournier07basis;_tournier07_to_descoteaux07projects the WM fODF onto the legacydescoteaux07basis pyAFQ reads.pip install "pyAFQ[cs_dmri]"(also inall). Citation:dhollander2016novel.Test:
test_tournier07_to_descoteaux07intest_csd.pychecks the conversion exactly against cs_dmri's own.pam5export (descoteaux07 legacy). It fails for each of the wrong conversions we tried (none; legacytournier07; non-legacydescoteaux07).Validation: full pyAFQ run, SS3T vs plain CSD (
odf_model="CSD"), pyAFQ defaults otherwise; both runs of each dataset share registration, masks and tissue maps, so they differ only in the fODF model. One subject each, 40 bundles:The lowest agreement is in SLF I/II in all three datasets.
Per-bundle tables and figures are in the attached HTML (zipped).
pyafq_ss3t_e2e.html.zip
HBN is run with #234, without which the HBN brain mask is fractional and CSD (not SS3T: cs_dmri treats the mask as
m > 0) leaves about 9% of white matter with all-zero coefficients.Side note, separate from SS3T: HBN (b=0/1000/2000) reduced to one shell with
min_bval/max_bvalcrashes at the profiles step withValueError: MSDKI requires at least 3 b-values.get_data_planpicks the defaultscalarsfrom the unfiltered bvals, somsdki_msd/msdki_mskare added and MSDKI is then fitted on b=0 + one shell. We passedscalars=["dti_fa", "dti_md", "t1w_over_b0"]. Happy to open a separate PR that counts shells after the filter.🤖 Generated with Claude Code