-
Notifications
You must be signed in to change notification settings - Fork 532
[FIX] #2435 Error creating gradients in DTIRecon #2460
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
Conversation
The bvecs file was read assuming that directions followed YZX order, which created a gradients_matrix.txt with swapped directions. The new order is XYZ.
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.
Thanks for this. If it's not too much trouble, I have a suggestion for additional cleanup.
val for val in re.split('\s+', | ||
fbvecs.readline().strip()) | ||
] | ||
bvecs_x = [ | ||
bvecs_z = [ | ||
val for val in re.split('\s+', | ||
fbvecs.readline().strip()) | ||
] |
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.
Let's just go ahead and simplify this while we're here:
with open(bvecs_file) as fbvecs:
bvecs_x = fbvecs.readline().split()
bvecs_y = fbvecs.readline().split()
bvecs_z = fbvecs.readline().split()
Great, thanks. Can you verify that this still produces the output you need? |
I did verify it before committing. |
Codecov Report
@@ Coverage Diff @@
## master #2460 +/- ##
=======================================
Coverage 66.62% 66.62%
=======================================
Files 328 328
Lines 42508 42508
Branches 5280 5277 -3
=======================================
Hits 28321 28321
Misses 13505 13505
Partials 682 682
Continue to review full report at Codecov.
|
I'll merge this in a batch with some others soon. Do you want to add yourself to the .zenodo.json? You'll be listed as a contributor in the Zenodo entry for the next release. |
Merging. Please update Zenodo in another PR, if you would like to be listed as a contributor. |
The bvecs file was read assuming that directions followed YZX order, which created a gradients_matrix.txt with swapped directions. The new order is XYZ.
Closes #2435.