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

Add distance summary plots #48

Merged
merged 9 commits into from
Dec 6, 2023
Merged

Commits on Dec 6, 2023

  1. Fix README spelling

    kaitj committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    7097d88 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    105783e View commit details
    Browse the repository at this point in the history
  3. Add connectome summary plotting functionality

    This commit adds the functionality to generate a summary plot of AFID
    distances on a connectome using nilearn.plotting to do so. In doing so,
    a complete set of AfidSet distances are provided as an argument, and
    coloured based on their distance from "expected" (ground-truth).
    
    Approporiate unit tests are also added in to make sure plots are generated
    and of the correct type. During development, generated plots were visually
    assessed to ensure generated plots are as expected.
    
    Note: a `pyright: ignore` has been temporarily added to line 230 in
    plotting.py until other plot_types are implemented in order to bypass
    the pyright error being thrown.
    kaitj committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    98b6746 View commit details
    Browse the repository at this point in the history
  4. Add histogram summary plotting functionality

    This commit adds the functionality to generate a summary histogram plot
    of AFID distances using `plotly`. In doing so, an optional argument has
    been added - `afid_labels` for labelling the histogram. If not provided,
    `afid_labels`, indices are used to label the histogram.
    
    Appropriate unit tests are also added. During development, generated
    plots were visually assessed.
    
    Note: `pyright: ignore` have been added where `afid_labels` is not
    expected to be None.
    
    Also added type stubs for plotly.
    kaitj committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    2054a52 View commit details
    Browse the repository at this point in the history
  5. Take actual value of distances (instead of abs)

    Knowing if the "distance" is negative can provide some insight - this is
    mostly for plotting distances along specific spatial components (e.g. x,
    y, z).
    
    These distances will be automatically set in the histogram and upcoming
    scatter plots. For the connectome plot, the minimum node value is set by
    either taking the smallest value (if negative) or 0 (if positive).
    kaitj committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    c7d31b2 View commit details
    Browse the repository at this point in the history
  6. Add scatter summary plotting functionality

    This commit adds functionality to generate a summary scatter plot of
    AFID distances using `plotly`. Similar to generating a histogram plot,
    this also makes use of the new `afid_labels` argument to label the
    markers. If not porvided, indices are used to label the scatter plot.
    
    Appropriate unit tests are alos added, with generated plots visually
    assessed during development.
    kaitj committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    3eba625 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    85860cf View commit details
    Browse the repository at this point in the history
  8. Add callable helper for slow data generation

    Some tests may fail a HealthCheck due to slow data generation - namely
    any tests that try to generate an entire AfidSet. This commit adds a
    function to the helpers that disables this check.
    kaitj committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    4bcfe06 View commit details
    Browse the repository at this point in the history
  9. Fix test errors

    This commit adds the slow_generation decorator where appropriate to
    disable the health checks for tests where data generation is slow.
    Additionally, delete the view that is created from plot_ortho for memory
    considerations (`close()` is not a valid command for these views).
    kaitj committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    7c8cc94 View commit details
    Browse the repository at this point in the history