Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
+ Coverage 61.14% 63.82% +2.67%
==========================================
Files 17 17
Lines 1045 1150 +105
Branches 170 207 +37
==========================================
+ Hits 639 734 +95
- Misses 360 362 +2
- Partials 46 54 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds support for parcellated CIFTI file types so ModelArrayIO can ingest and emit .pscalar.nii and .pconn.nii in addition to existing .dscalar.nii behavior (closes #38).
Changes:
- Extend
extract_cifti_scalar_datato handleParcelsAxis(pscalar) andParcelsAxis+ParcelsAxis(pconn, flattened) inputs. - Update
h5_to_ciftito preserve output CIFTI type/extension and reshape outputs appropriately for pconn matrices. - Add/expand unit tests covering dscalar/pscalar/pconn roundtrips and error cases.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/modelarrayio/utils/cifti.py |
Adds parsing/validation logic for pscalar and pconn axes in extract_cifti_scalar_data. |
src/modelarrayio/cli/h5_to_cifti.py |
Infers output extension from template axes and reshapes output data for pconn vs scalar-like outputs. |
test/test_cifti_utils.py |
Adds unit tests for pscalar/pconn behavior in extract_cifti_scalar_data. |
test/test_cifti_cli_comprehensive.py |
New comprehensive CLI coverage for cifti↔h5 conversions across dscalar/pscalar/pconn. |
.github/workflows/tox.yml |
Changes CI push trigger filtering (now only runs on pushes to main). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/PennLINC/ModelArrayIO/sessions/0c2a8a88-c40b-4df1-80c4-d56a959932f8 Co-authored-by: tsalo <8228902+tsalo@users.noreply.github.com>
| cifti_scalar_data: :obj:`numpy.ndarray` | ||
| The scalar data from the cifti file | ||
| The scalar data from the cifti file, always 1-D. For pconn files | ||
| this is the row-major flattened connectivity matrix. |
There was a problem hiding this comment.
Does cifti already have the data flattened in row-major order or does this happen in nibabel?
There was a problem hiding this comment.
It should be done by ModelArrayIO. It'll be 2D (parcels x parcels) in both the CIFTI and the loaded nibabel data array.
Closes #38.