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

Cleaning reconst scripts part1 #908

Merged
merged 11 commits into from
Feb 23, 2024

Conversation

EmmaRenauld
Copy link
Contributor

@EmmaRenauld EmmaRenauld commented Feb 19, 2024

Quick description

Encapsulating some parts of the main() in a few scripts in the column "reconst"

  • scil_aodf_metrics: was clean
  • scil_btensor_metrics: was clean
  • scil_dki_compute_metrics:
    - encapsulated the residuals
    - encapsulated the smooth_to_fwhm
    - changed the residuals computation: removed the norm. Discussed with Maxime.
    - added many del variable, like is done in dti_metrics
    - Added the residual computation in the script testing. It created a fail at line data_p = dkifit.predict(gtab, S0). With the way dipy does thing, we needed to send the keywords, data_p = dkifit.predict(gtab=gtab, S0=S0)
  • scil_dti_metrics:
    • encapsulated the residuals
    • made it clearer that FA is computed for both FA and RGB options.

Type of change

Check the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Cleaning scripts.

Provide data, screenshots, command line to test (if relevant)

...

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

@pep8speaks
Copy link

pep8speaks commented Feb 19, 2024

Hello @EmmaRenauld, Thank you for updating !

Line 150:80: E501 line too long (80 > 79 characters)

Comment last updated at 2024-02-22 22:48:19 UTC

@EmmaRenauld EmmaRenauld force-pushed the cleaning_reconst_scripts_part1 branch from 5197255 to 8db132a Compare February 20, 2024 19:12
@EmmaRenauld EmmaRenauld marked this pull request as ready for review February 20, 2024 19:12
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

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

Project coverage is 68.53%. Comparing base (9412961) to head (d0697aa).
Report is 100 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #908      +/-   ##
==========================================
+ Coverage   68.12%   68.53%   +0.41%     
==========================================
  Files         386      388       +2     
  Lines       20678    20924     +246     
  Branches     3160     3219      +59     
==========================================
+ Hits        14087    14341     +254     
+ Misses       5326     5293      -33     
- Partials     1265     1290      +25     
Components Coverage Δ
Scripts 71.34% <69.76%> (+0.66%) ⬆️
Library 63.72% <62.50%> (-0.05%) ⬇️

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.

a quick fix and GTG !

scilpy/dwi/operations.py Show resolved Hide resolved
@EmmaRenauld
Copy link
Contributor Author

EmmaRenauld commented Feb 22, 2024

I created again a new function in operations.

I also added a mask in the test of dti_metrics to have more coverage of residuals things.

Please see new line # 183. There were a lot of questions there. Can we delete that?

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 6ee5419 into scilus:master Feb 23, 2024
2 checks passed
@EmmaRenauld EmmaRenauld deleted the cleaning_reconst_scripts_part1 branch February 23, 2024 23:58
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