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.
noted issues: FA files looked funny after processing with this pipeline, the first two entries in the rotated_bvec files were 0,0,0 when the bvalues of the first two files were 0 and 1000.
Plotting the original bvec against the rotated bvec (X component) showed what appeared to be a single volume offset (see black and red traces in attached plot)
code issue: _rotate_bvec code initialised its output bvec array with the first entry of the input bvec array and then looped through FLIRT matrices starting at 1st position, but used a 0-based index for selecting the input from the bvec array
solution : initialise output array filled with zeros, loop through FLIRT matrices from 0, use 0-based indexing for selecting input from the bvec array, set consecutive elements appropriately
testing : nothing, other than plotting the X component for one subject
I attached the plot, where black = original bvec, red = rotated bvec, green = rotated bvec with my solution. The other thing that you can see in this plot is that there are regularly spaced x=0s in both the original and my version where the b=0 volumes were collected (7 in total).
(This also includes the changes that I made in the previous pull request.)
