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

[ENH] - extra bval parsing for number of shells #73

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

edickie
Copy link
Contributor

@edickie edickie commented Feb 3, 2020

In response to issue #64 and discussion during the hack here is a little addition to the vectors utility that can determine and report on the number of the shells (as well as masks for each shell).

Currently, it is outside of DiffusionTable because I'm unsure if we want all the methods integrated..

@welcome
Copy link

welcome bot commented Feb 3, 2020

Thanks for opening this pull request! We have detected this is the first time for you to contribute to dMRIPrep. Please check out our contributing guidelines.
We invite you to list yourself as a dMRIPrep contributor, so if your name is not already mentioned, please modify the .zenodo.json file and insert your data last in the contributors list. Example:

{
   "name": "Contributor, New dMRIPrep",
   "affiliation": "Department of dMRI prep'ing, Open Science Made-Up University",
   "orcid": "<your id>",
   "type": "Researcher"
}

Of course, if you want to opt-out this time there is no problem at all with adding your name later. You will be always welcome to add it in the future whenever you feel it should be listed.

@pull-assistant
Copy link

pull-assistant bot commented Feb 3, 2020

Score: 0.93

Best reviewed: commit by commit


Optimal code review plan (4 warnings)

     adding first version of bval parser

added one smoke test for bvals

...ep/utils/tests/test_vectors.py 56% changes removed in changed bval parsing...

now with a fiew passing tets

...ep/utils/tests/test_vectors.py 55% changes removed in changed bval parsing...

Merge pull request #1 from nipreps/master

dmriprep/utils/vectors.py 46% changes removed in changed bval parsing...

dmriprep/utils/images.py 41% changes removed in Merge pull request #...

docs/requirements.txt 80% changes removed in Merge pull request #...

setup.cfg 50% changes removed in Merge pull request #...

dmriprep/workflows/base.py 47% changes removed in Merge pull request #...

dmriprep/workflows/dwi/base.py 57% changes removed in Merge pull request #...

dmriprep/cli/run.py 45% changes removed in Merge pull request #...

Merge pull request #2 from nipreps/master

dmriprep/interfaces/images.py 50% changes removed in Merge pull request #...

     Merge pull request #3 from edickie/master

     changed bval parsing class to function as per suggestion

Powered by Pull Assistant. Last update 76a4202 ... b39447e. Read the comment docs.

@pep8speaks
Copy link

pep8speaks commented Feb 3, 2020

Hello @edickie, Thank you for updating!

Cheers! There are no style issues detected in this Pull Request. 🍻 To test for issues locally, pip install flake8 and then run flake8 dmriprep.

Comment last updated at 2020-04-07 22:57:59 UTC

Copy link
Member

@oesteban oesteban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd reduce boilerplate and just use a function for this, but that's just an opinion :)

@@ -177,6 +179,105 @@ def to_filename(self, filename, filetype='rasb'):
else:
raise ValueError('Unknown filetype "%s"' % filetype)

class BVALScheme:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably go with a single function that accepts a DiffusionGradientTable object for this.

The function would return only a list of nonzero shell centers and the number of shells would be just the len() of that (which can be easily calculated by the user).

WDYT?

@oesteban
Copy link
Member

Do you think you can give this a little bump for tomorrow's meeting?

Merging in updates from nipreps
Merging in updates from upstream master
@codecov
Copy link

codecov bot commented Apr 7, 2020

Codecov Report

Merging #73 into master will decrease coverage by 0.01%.
The diff coverage is 21.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
- Coverage   51.06%   51.05%   -0.02%     
==========================================
  Files          21       21              
  Lines        1218     1232      +14     
  Branches      161      164       +3     
==========================================
+ Hits          622      629       +7     
- Misses        581      590       +9     
+ Partials       15       13       -2     
Impacted Files Coverage Δ
dmriprep/utils/vectors.py 87.07% <21.42%> (-3.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d83d50...b39447e. Read the comment docs.

@edickie edickie marked this pull request as ready for review April 7, 2020 23:00
@oesteban
Copy link
Member

oesteban commented Apr 28, 2020

I believe this from #29 is highly related to this PR.

EDIT: I'll go through this PR tomorrow. Thanks for updating Erin!

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

Successfully merging this pull request may close these issues.

3 participants