nipy / heudiconv

Flexible DICOM conversion into structured directory layouts
https://heudiconv.readthedocs.io
Other
232 stars 125 forks source link

Add dianne tutorials #734

Closed asmacdo closed 6 months ago

asmacdo commented 7 months ago

This PR adds some tutorials from Dianne Patterson at University of Arizona: https://neuroimaging-core-docs.readthedocs.io/en/latest/index.html (with permission, thanks Dianne!)

I've moved some things around so the left bar didn't get so cluttered.

Screenshot from 2024-01-18 12-12-57

Remaining TODOs:

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (81f0d2f) 81.97% compared to head (e0f9ce2) 81.97%. Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #734 +/- ## ======================================= Coverage 81.97% 81.97% ======================================= Files 41 41 Lines 4149 4149 ======================================= Hits 3401 3401 Misses 748 748 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

TheChymera commented 7 months ago

Looks good to me, other than failing lint/spell.

One thing though, I don't think “Heuristic File Reference” makes it any clearer. If anything it's more confusing....

As per the discussion on Monday, you did mention heuristic is a bit vague. I would say — and it might be some professional jargon I picked up — that “heuristic” is a pretty clear concept in parsing/reformatting things. If you feel clarification is needed, perhaps “Heuristic Specification File” would be clearer, i.e. the file which specifies the heuristic.

yarikoptic commented 7 months ago

I would not abuse "specification" word here: if used explicitly it usually refers to some formalized semantic description (e.g. recipe as amounts of each incredient, not really the cooking instructions per se). Heuristic ATM is Python code to provide desired organization (directories) and names to the files given DICOMs metadata.

yarikoptic commented 7 months ago

FWIW -- pushed 2 little commits to clarify provenance of the docs. Did Dianne state the license?

asmacdo commented 7 months ago

No but Dianne gave me permission to use her materials upstream.

asmacdo commented 7 months ago

Goal: make the example dataset minimal (delete extra files)

I tried deleting all sequences except DTI_30_DIRs_AP_15, but it failed

    Traceback (most recent call last):
      File "/home/austin/miniconda3/bin/heudiconv", line 8, in <module>
        sys.exit(main())
                 ^^^^^^
      File "/home/austin/miniconda3/lib/python3.11/site-packages/heudiconv/cli/run.py", line 30, in main
        workflow(**kwargs)
      File "/home/austin/miniconda3/lib/python3.11/site-packages/heudiconv/main.py", line 479, in workflow
        prep_conversion(
      File "/home/austin/miniconda3/lib/python3.11/site-packages/heudiconv/convert.py", line 237, in prep_conversion
        info = heuristic.infotodict(seqinfo_list)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/austin/datasets/sub-219_dicom/MRIS/Nifti/code/heuristic1.py", line 106, in infotodict
        raise ValueError('\n'.join(msg))
    ValueError: WARNING: Missing correct number of T1w runs
    WARNING: Missing correct number of RPE runs
    WARNING: Missing correct number of magnitude runs
    WARNING: Missing correct number of phasediff runs
    WARNING: Missing correct number of resting_state runs
    WARNING: Missing correct number of resting_state_post runs
yarikoptic commented 7 months ago

I guess you removed too much -- that is the code/logic in their heuristic. Check which files they care about there.

dkp commented 6 months ago

I'm happy to give back to the community. Attribution is lovely (and makes my bosses happier).

yarikoptic commented 6 months ago

don't know yet why RTD does not report back on builds, although it does them for PRs e.g. https://readthedocs.org/projects/heudiconv/builds/23301131/ . I have checked oauth permissions on personal and nipy org levels -- all seems good. I found that there were 2 instead of one webhooks for github , removed one and resynced another. Let's see if may be it would emerge back

edit: actually for this PR 734 the last one from 2 weeks ago. The most recent one was for #735 from a day ago and there it reported fine. So something must be special about this PR :-/

asmacdo commented 6 months ago

pushed your suggested license commit to see if that kicks off a build

github-actions[bot] commented 6 months ago

:rocket: PR was released in v1.0.2 :rocket:

github-actions[bot] commented 6 months ago

:rocket: PR was released in v1.0.2 :rocket: