Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

ENH: Allow simulating multi-fiber voxels #245

Closed
wants to merge 5 commits into from

Conversation

jhlegarreta
Copy link
Collaborator

Allow simulating multi-fiber voxels.

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.18%. Comparing base (796c501) to head (2296b88).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #245   +/-   ##
=======================================
  Coverage   66.18%   66.18%           
=======================================
  Files          19       19           
  Lines         905      905           
  Branches      112      112           
=======================================
  Hits          599      599           
  Misses        264      264           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Add a script to plot the signal estimated by the GP as well as the error
data generated by the error analysis script.

Add the necessary helper functions to the signal visualization module to
plot the estimated signal as a surface.

Modify the signal visualization error plotting method to optionally
accept the color the figure size parameters.

Add methods to the the signal simulation module in order to serialize
the dMRI data.

Refactor the the the signal simulation module to:
- Allow the dMRI signal generation method to generate evals randomly if
  not provided.
- Allow reusing the polar random angle generation utility.
- Allow the single tensor method to accept a random generator for the
  sake of reproducibility.
- Set the `zip` function `strict` parameter to `True` as we want all
  iterables to have the same length.
- Create a method to simulate a single-fiber multivoxel signal given the
  gradient table and the rest of the necessary parameters.

Modify the error analysis script to:
- Reuse the `EddyMotionGPR` instance: factor it out from the CV
  function, as the instance does not change across folds and repeats.
- Save the simulated signal and gtab.
- Predict and save the signal of the GP estimation.
- Save the simulated SNR to the CV scores data file. Since `None`
  indicates no noise, modify the `pandas` serialization method arguments
  so that `None` is not considered as a missing value.

Take advantage of the commit to rename the `evals1` argument to `evals`
in the error analysis script.
Rename the error analysis script to honor better its purpose.
Rename the `EddyMotionGPR` instance to honor better its classname.
Add a script to plot the signal estimated by the GP as well as the error
data generated by the error analysis script.

Add the necessary helper functions to the signal visualization module to
plot the estimated signal as a surface.

Modify the signal visualization error plotting method to optionally
accept the color the figure size parameters.

Add methods to the the signal simulation module in order to serialize
the dMRI data.

Refactor the the the signal simulation module to:
- Allow the dMRI signal generation method to generate evals randomly if
  not provided.
- Allow reusing the polar random angle generation utility.
- Allow the single tensor method to accept a random generator for the
  sake of reproducibility.
- Set the `zip` function `strict` parameter to `True` as we want all
  iterables to have the same length.

Modify the error analysis script to:
- Reuse the `EddyMotionGPR` instance: factor it out from the CV
  function, as the instance does not change across folds and repeats.
- Save the simulated signal and gtab.
- Predict and save the signal of the GP estimation.
- Save the simulated SNR to the CV scores data file. Since `None`
  indicates no noise, modify the `pandas` serialization method arguments
  so that `None` is not considered as a missing value.

Take advantage of the commit to rename the `evals1` argument to `evals`
in the error analysis script.
Allow simulating multi-fiber voxels.
@jhlegarreta jhlegarreta force-pushed the AllowMutliFiberVoxels branch from 075fa16 to 2296b88 Compare October 25, 2024 23:27
@jhlegarreta
Copy link
Collaborator Author

Closing in favor of #247.

@jhlegarreta jhlegarreta deleted the AllowMutliFiberVoxels branch October 25, 2024 23:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant