Skip to content
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

Sometimes bvecs aren't unit normal ("The vectors in bvecs should be unit..." errors) #8

Open
bacaron opened this issue Nov 6, 2022 · 0 comments

Comments

@bacaron
Copy link

bacaron commented Nov 6, 2022

Hello,

A user recently ran into an issue when trying to upload data that it was erroring out with a "The vectors in bvecs should be unit (The tolerance can be modified as an input parameter) validation failed" error.

The validator loads the bvecs and bvals files using dipy's gradient_table_from_bvals_bvecs function, which invokes a check to see if the bvectors are normalized (see normalization check.

Specifically, the bvectors need to be constrained between -1 and 1, while some users data might have bvectors with values of 100 or greater.

DMRIPrep has a simple function for normalizing the bvectors (see normalize_vectors. We could potentially implement this upon validation as another check, or we can just better alert users on to how to fix this for their own data prior to upload.

I've written a simple python script to do this and output the normalized bvecs with a '_norm' suffix. See this repository for the script: normalize_bvectors.

This issue is not intended to necessarily be fixed or corrected within the validator, but can serve as a place for people to search for an answer if they run into this issue with their own data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant