Skip to content

Fix longitudinal functional template#331

Open
kaitj wants to merge 12 commits into
mainfrom
maint/long-func-template
Open

Fix longitudinal functional template#331
kaitj wants to merge 12 commits into
mainfrom
maint/long-func-template

Conversation

@kaitj
Copy link
Copy Markdown
Contributor

@kaitj kaitj commented May 8, 2026

Generate a longitudinal template with bold resolution after the initial creation from anatomical data. This will be used as the reference image in downstream longitudinal functional processing.

This makes use of the first bold image found to extract the resolution. Another possibility is to resample it to a fixed resolution (potentially user provided), but this can be a downstream feature and will not be included in this PR.

Closes #330

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Coverage

Tests Skipped Failures Errors Time
791 0 💤 0 ❌ 0 🔥 12.043s ⏱️

@kaitj kaitj force-pushed the maint/long-func-template branch 5 times, most recently from 82e1663 to fd58e3f Compare May 8, 2026 18:28
@kaitj kaitj force-pushed the maint/long-func-template branch from fd58e3f to 06929ef Compare May 8, 2026 18:32
@kaitj kaitj force-pushed the maint/long-func-template branch from 2217809 to 11b7722 Compare May 8, 2026 20:07
@kaitj kaitj changed the title Maint/long func template Fix longitudinal functional template May 8, 2026
@kaitj kaitj marked this pull request as ready for review May 8, 2026 20:17
@kaitj kaitj requested review from jpillai00 and nx10 May 8, 2026 20:17
Comment thread src/rbc/bids/longitudinal/template.py Outdated
Comment thread src/rbc/workflows/longitudinal/template.py Outdated
Comment thread src/rbc/bids/longitudinal/template.py Outdated
Comment thread src/rbc/core/longitudinal/resampling.py Outdated
Comment thread src/rbc/core/longitudinal/resampling.py Outdated
Comment thread src/rbc/bids/longitudinal/template.py Outdated
Comment thread src/rbc/core/longitudinal/resampling.py Outdated
@kaitj kaitj force-pushed the maint/long-func-template branch 2 times, most recently from a864f0b to 318ae42 Compare May 11, 2026 19:38
@kaitj kaitj marked this pull request as draft May 11, 2026 19:38
@kaitj kaitj force-pushed the maint/long-func-template branch from 318ae42 to da9e13b Compare May 11, 2026 19:52
Templates for different takss _could_ be different resolutions. This refactors the resampling such that a template is generated per task for the longitudinal workflow.
@kaitj kaitj force-pushed the maint/long-func-template branch from da9e13b to 6608565 Compare May 11, 2026 20:05
@kaitj kaitj marked this pull request as ready for review May 11, 2026 20:18
@kaitj kaitj requested a review from nx10 May 11, 2026 20:18
Comment thread src/rbc/orchestration/longitudinal/qc.py Outdated
Comment thread src/rbc/bids/longitudinal/functional.py Outdated
Comment thread src/rbc/bids/longitudinal/template.py Outdated
Comment thread src/rbc/workflows/longitudinal/template.py Outdated
- Update stale docstring
- Use "ents['task']" instead of filtering for
- Address de-duping via assertion of grid for unique file paths
- Fix resampling order for mask
@kaitj kaitj requested a review from nx10 May 12, 2026 14:43
@kaitj kaitj marked this pull request as draft May 15, 2026 20:19
@kaitj kaitj force-pushed the maint/long-func-template branch 2 times, most recently from 7d1c2d2 to b051f13 Compare May 18, 2026 15:52
@kaitj kaitj force-pushed the maint/long-func-template branch from b051f13 to 35ad7b1 Compare May 18, 2026 16:07
@kaitj kaitj marked this pull request as ready for review May 18, 2026 19:17
Comment thread src/rbc/bids/longitudinal/template.py Outdated
Comment thread src/rbc/bids/longitudinal/template.py Outdated
Comment thread src/rbc/bids/longitudinal/template.py Outdated
Comment thread src/rbc/bids/longitudinal/template.py Outdated
Comment thread src/rbc/core/longitudinal/resampling.py Outdated
@kaitj kaitj force-pushed the maint/long-func-template branch from 9a9a9d8 to 6a3ef8d Compare May 19, 2026 17:11
- Removed check for uniqueness of bold dataframe
- Update stale docstring: `bold_ref` -> `bold_files`
- Wrap task with `bids_safe_label` when calling `tpl.save`
- Compare affines using `np.allclose` due to floating point precision
- Use a BoldKey NamedTuple as key to unique bold files
@kaitj kaitj force-pushed the maint/long-func-template branch from 6a3ef8d to 0cdaed6 Compare May 19, 2026 20:54
@kaitj kaitj requested a review from nx10 May 26, 2026 15:46
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.

Bug: Longitudinal functional transformation

2 participants