-
Notifications
You must be signed in to change notification settings - Fork 5
Description
What happened?
When attempting to run the tests in PR #313, it becomes apparent that the gradient data format is not consistent across the code. The data.filtering.dwi_select_shells functionexpects an Nx4 array, the b-values being the last column in:
nifreeze/src/nifreeze/data/filtering.py
Line 257 in e92e725
| bvalues = gradients[:, -1] |
However, the rest of the code handles a 4xN array, the b-values being the last row. Note that the transpose of these arrays does not give the other array.
This is not captured by any test.
This becomes apparent when debugging the tests in PR #313. For the avg model and DTI model tests to pass,
nifreeze/src/nifreeze/data/filtering.py
Line 257 in e92e725
| bvalues = gradients[:, -1] |
needs to be changed to
bvalues = gradients[-1, :]
What command did you use?
pytest test/test_integration.pyWhat version of the software are you running?
How are you running this software?
Local installation ("bare-metal")
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
No
Please copy and paste any relevant log output.
if not shellmask.sum():
> raise RuntimeError(f"Shell corresponding to index {index} (b={bcenter}) is empty.")
E RuntimeError: Shell corresponding to index 3 (b=1000.0) is empty.Additional information / screenshots
No response