-
Notifications
You must be signed in to change notification settings - Fork 19
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
ENH: Add gradient plot method #96
Conversation
Cross reference nipreps/mriqc#1292 (comment). Missing:
|
We could use bids examples or openneuro data. We probably don't want to keep cloning and getting these files with git, so perhaps we can add in test/data:
I'm fine adding dipy as a dependency, but I think here we want to assume the b-table comes in a particular format (e.g., FSL format, or RAS+b or IKJ+b). The user should just adapt their data before calling this.
As we only plot one sphere, this is not a concern as far as I understand. That said, the previous apply -- let's define an API, as opposed to taking whatever comes and adapt it to work. |
I've given a gentle push to the testing side of things - let me know what you think @jhlegarreta |
7d85b24
to
33bb75d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
==========================================
+ Coverage 57.36% 58.27% +0.91%
==========================================
Files 22 22
Lines 2024 2085 +61
Branches 359 321 -38
==========================================
+ Hits 1161 1215 +54
- Misses 782 787 +5
- Partials 81 83 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Tests are running, but the plots are weird: https://output.circle-artifacts.com/output/job/3d4b105c-09b1-492d-8ac4-4e95ea419715/artifacts/0/tmp/tests/output/ds000114_singleshell.svg |
Thanks for having added these.
OK, I see what you did to read them.
OK. Not sure what you have in mind for the API, but I'd first go with one case (FSL format) see that things work, merge it, then deal with other cases that you think we should consider (RAS+b or IKJ+b).
Looks good. Thanks for doing this.
I had tried with a pair of bval/bvec files from HCP (multi-shell), used the DIPY reader and provided the plots I had posted in nipreps/mriqc#1292, so maybe this whole thing had not been tested with single-shell and DSI when it was added to |
Add gradient plot method. Add the accompanying test data.
6b055a1
to
9f561d1
Compare
Found out the issue:
creates a RAS+b table, whereas the
(Also found another issue with single shell data: fixed with the I fixed the plot method to accept the RAS+b (honoring the docstring). Squashed all commits: sorry Óscar 🙏, looks like the squashed commit does not honor your co-authorship Defining other possible layouts for the gradients (or a gradient API for the whole package) should be left for a separate PR. |
OMG, MY PRECIOUS COMMIT :_D
Good catch! Thanks for this - I've enabled the tests (I'm also adding you as a maintainer) |
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.
Looks good -- just a few cosmetic changes. I'll merge
Add gradient plot method.