-
Notifications
You must be signed in to change notification settings - Fork 95
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] Explicitly strip extensions #115
Conversation
@rmarkello it'd be great to get your review, here ! |
094e4c1
to
6794bf1
Compare
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 think the current set up might not work exactly as intended, but it's almost there! See my comment regarding the if
-else
clause and let me know if you have questions about it
tedana/utils/utils.py
Outdated
return np.atleast_3d(fdata), data[0] | ||
fdata = np.atleast_3d(fdata) | ||
ref_img = check_niimg(data[0]) | ||
else: |
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 this will work as-is for z-concatenated images. The if isinstance(data, list)
will always be triggered because of argparse, so the else
clause here never will. I think we can get rid of this whole if
-else
block and move the code below this else
section up under if len(data) == 1
.
tedana/utils/utils.py
Outdated
# create reference image | ||
ref_img = img.__class__(np.zeros((nx, ny, nz)), affine=img.affine, | ||
header=img.header, extra=img.extra) | ||
ref_img.header.set_sform(ref_img.header.get_sform(), code=1) |
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.
This should probably be moved back next to ref_img.header.extensions = []
so that it triggers regardless of the input data!
7380280
to
3beb3d9
Compare
Codecov Report
@@ Coverage Diff @@
## master #115 +/- ##
==========================================
+ Coverage 49.58% 49.72% +0.14%
==========================================
Files 32 32
Lines 2033 2035 +2
==========================================
+ Hits 1008 1012 +4
+ Misses 1025 1023 -2
Continue to review full report at Codecov.
|
Closes #82.
Changes proposed in this pull request:
load_data
to explicitly strip extensions for both zcat images and listed echo files