Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Matrix size wrong for tracking.utils.connectivity_matrix #361
Apologies if this would be better on a mailing list instead of github, but I spotted something funny in the tracking.utils.connectivity_matrix function.
I kept getting a smaller connectivity matrix than I expected for one given tractography set. This particular dataset it turns out was lacking any tracts with endpoints for the final ROI in the labels image. As the function sizes the matrix from the intersection of the labels and the endpoints it then outputs too small a matrix when this is passed to ndbincount.
as far as I can tell this can by fixed as follows (line 213 in _utils.py):
In my test code this gives the correct output, but I'm very new to github so have no idea how to set up the fork/pull request to do this.
Could a dev test this and fix?
Good catch Andrew. This is obviously a pretty easy fix, but it's a good opportunity to get familiar with git, github and our workflow if you're interested in contributing more to dipy (or other projects) in the future.
If you're interested I'll assign this issue to you, and you can start by reading these pages.