Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] raise error when parcellating volumetric data defined as array #125

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

justinehansen
Copy link
Contributor

Input data to be parcellated can be array-like but the neuromaps Parcellater will assume it's surface data.
I've modified the code such that an error is thrown when MNI152 data is provided as an np.ndarray. Volumetric data should instead be provided as a Nifti1Image. We don't convert the array to a Nifti1Image because the affine should be defined too. This PR was prompted by issue #122

@codecov-commenter
Copy link

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (07b03f0) 41.15% compared to head (ae72001) 41.11%.

Files Patch % Lines
neuromaps/parcellate.py 0.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
- Coverage   41.15%   41.11%   -0.04%     
==========================================
  Files          40       40              
  Lines        2481     2483       +2     
==========================================
  Hits         1021     1021              
- Misses       1460     1462       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justinehansen justinehansen merged commit 5a69c29 into netneurolab:main Nov 29, 2023
9 checks passed
@justinehansen justinehansen deleted the issue-122 branch November 29, 2023 15:20
github-actions bot pushed a commit that referenced this pull request Nov 29, 2023
[FIX] raise error when parcellating volumetric data defined as array 5a69c29
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.

2 participants