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

Easy tests reconst #982

Merged
merged 4 commits into from
Apr 26, 2024
Merged

Conversation

EmmaRenauld
Copy link
Contributor

@EmmaRenauld EmmaRenauld commented Apr 22, 2024

Quick description

Took a few minutes today to prepare some unit test in the reconst module.

Coverage of unit test changes (only; no script tests) are:
reconst.fodf: from 0% to 36%
reconst.frf: from 0% to 49%

Unchanged reconst files:
reconst.aodf = 0% (@CHrlS98 if you want to contribute)!
reconst.bingham = 88% (Thanks Charles)
reconst.divide, reconst.mti, reconst.sh = 0% (@karanphil if you want to contribute!?)
reconst.utils: 36%

Type of change

Check the relevant options.

  • Unit tests

Checklist

  • My code follows the style guidelines of this project (run autopep8)
  • I added relevant citations to scripts, modules and functions docstrings and descriptions
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I moved all functions from the script file (except the argparser and main) to scilpy modules
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 68.04%. Comparing base (deb254a) to head (3c87ad3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #982      +/-   ##
==========================================
+ Coverage   68.00%   68.04%   +0.03%     
==========================================
  Files         419      419              
  Lines       21569    21574       +5     
  Branches     3242     3244       +2     
==========================================
+ Hits        14668    14679      +11     
+ Misses       5609     5605       -4     
+ Partials     1292     1290       -2     
Components Coverage Δ
Scripts 68.95% <ø> (-0.02%) ⬇️
Library 66.65% <80.00%> (+0.11%) ⬆️

Copy link
Contributor

@karanphil karanphil left a comment

Choose a reason for hiding this comment

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

Two small comments and it's GTG!

# 1000 works well at 2x2x2 = 8 mm3
# Hence, we multiply by the volume of a voxel
vol = (zoom[0] * zoom[1] * zoom[2])
if vol != 0:
max_number_of_voxels = 1000 * 8 // vol
else:
max_number_of_voxels = 1000
logging.debug("We will search ventricle voxels, up to a maximum of {} "
Copy link
Contributor

Choose a reason for hiding this comment

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

"Searching for ventricle voxels" perhaps? Not a fan of "we will"

containing a single fiber population are found using either a threshold on
the FA, inside a white matter mask.

Requires
Copy link
Contributor

Choose a reason for hiding this comment

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

Requires what?

Copy link
Contributor

@arnaudbore arnaudbore left a comment

Choose a reason for hiding this comment

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

GTG

@arnaudbore arnaudbore merged commit 35b40e1 into scilus:master Apr 26, 2024
2 checks passed
@EmmaRenauld EmmaRenauld deleted the easy_tests_reconst branch April 26, 2024 14:31
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