-
Notifications
You must be signed in to change notification settings - Fork 318
ENH: Add optional warpkit MEDIC support for multi-echo BOLD distortion correction #3645
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
Open
DVSneuro
wants to merge
16
commits into
nipreps:master
Choose a base branch
from
DVSneuro:warpkit-medic
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a3660c8
Add optional warpkit MEDIC support for multiecho BOLD
DVSneuro 2e2ad29
Fix PIXI_LOCK_FLAGS scope in Docker build
DVSneuro 3933446
Add missing warpkit interface files
DVSneuro 41769d6
Add warpkit MEDIC reportlets and citation boilerplate
DVSneuro eff7d66
Polish warpkit MEDIC reporting and boilerplate
DVSneuro 43eecd2
MAINT: Add David V. Smith to contributors
DVSneuro 66baf82
[DATALAD RUNCMD] bash -c '! pixi lock --check || git chec...
nipreps-bot 4eb308f
ENH: Expose warpkit MEDIC noise-frame trimming
DVSneuro 89f431d
FIX: feed undistorted MEDIC fieldmap (`fmap`) to the resampler
vanandrew 6c59000
FIX: feed 3D temporal-mean field to FieldmapReportlet
vanandrew 81ca35b
FIX: scale warpkit_medic mem_gb by echo count
vanandrew 197bc44
FIX: stop silently disabling SBRef when MEDIC is enabled
vanandrew 53d8fc7
FIX: assert echo ordering matches between magnitude and phase
vanandrew a12f7fb
Merge pull request #1 from vanandrew/medic-fixes
DVSneuro 7c10531
Merge upstream/master into warpkit-medic
DVSneuro a57f163
FIX: Avoid assert in MEDIC echo-order check
DVSneuro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import numpy as np | ||
|
|
||
| from fmriprep.interfaces.resampling import resample_series | ||
|
|
||
|
|
||
| def test_resample_series_uses_volume_specific_fieldmaps(): | ||
| data = np.zeros((3, 1, 1, 2), dtype='f4') | ||
| data[:, 0, 0, 0] = [10.0, 20.0, 30.0] | ||
| data[:, 0, 0, 1] = [100.0, 200.0, 300.0] | ||
|
|
||
| coordinates = np.zeros((3, 1, 1, 1), dtype='f4') | ||
| pe_info = [(0, 1.0), (0, 1.0)] | ||
| fmap_hz = np.zeros((1, 1, 1, 2), dtype='f4') | ||
| fmap_hz[..., 1] = 1.0 | ||
|
|
||
| resampled = resample_series( | ||
| data=data, | ||
| coordinates=coordinates, | ||
| pe_info=pe_info, | ||
| jacobian=False, | ||
| hmc_xfms=None, | ||
| fmap_hz=fmap_hz, | ||
| output_dtype='f4', | ||
| order=0, | ||
| mode='nearest', | ||
| prefilter=False, | ||
| ) | ||
|
|
||
| assert np.allclose(resampled[0, 0, 0, 0], 10.0) | ||
| assert np.allclose(resampled[0, 0, 0, 1], 200.0) |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need the inline if/else since line 382 raises an error if
fmap_is_seriesanddata.ndim == 3. So this should only befmap_hz.