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

Improve component plots #1045

Merged
merged 21 commits into from
Feb 29, 2024
Merged

Improve component plots #1045

merged 21 commits into from
Feb 29, 2024

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Feb 21, 2024

Closes #1042.

Changes proposed in this pull request:

  • Use plot_stat_map instead of identifying and plotting individual slices. This should address the potential orientation issues from Check orientation of brain/acquisition in figures #1042. It will also select the "best" slices for each component independently, so different components will have different slices rendered.

@tsalo tsalo added enhancement issues describing possible enhancements to the project reports issues related to boilerplate generation or visual reports labels Feb 21, 2024
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.34%. Comparing base (1f1845b) to head (71992f5).
Report is 41 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1045   +/-   ##
=======================================
  Coverage   89.34%   89.34%           
=======================================
  Files          26       26           
  Lines        3444     3444           
  Branches      622      616    -6     
=======================================
  Hits         3077     3077           
  Misses        213      213           
  Partials      154      154           

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

@tsalo
Copy link
Member Author

tsalo commented Feb 21, 2024

Argh, tight_layout doesn't help the line plots, but using plot_stat_map should fix any orientation issues.

Basically, I just need to fix up the spacing between the different axes in the figure.

@tsalo
Copy link
Member Author

tsalo commented Feb 27, 2024

Here's what an example component figure looks like:

image

@tsalo tsalo marked this pull request as ready for review February 27, 2024 14:09
Copy link
Member

@handwerkerd handwerkerd left a comment

Choose a reason for hiding this comment

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

This looks much better. One thing I noticed is that the presented slices vary by component. For example, for the three-echo integration test, here are the images for components 15 & 51. The axial slice numbers are different. This is not great because we really want to compare the component maps between components, but I don't see an obvious way to fix this within plot_stat_map. Thoughts?
image
image

@tsalo
Copy link
Member Author

tsalo commented Feb 28, 2024

plot_stat_map will identify the "best" slices to present (probably the ones with the highest values, given a certain amount of space between slices). I think that would be better for getting a sense of the component's spatial pattern than being able to directly compare across components.

Copy link
Member

@handwerkerd handwerkerd left a comment

Choose a reason for hiding this comment

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

LGTM

So that we remember this change, note that the presented slices may be different for each component in the opening comment for this PR.

@tsalo
Copy link
Member Author

tsalo commented Feb 28, 2024

Done!

Copy link
Collaborator

@dowdlelt dowdlelt left a comment

Choose a reason for hiding this comment

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

I'm sad to see the originals go - but happy with similarly oriented brains.

I'm of two minds about the "best slices" approach - because it is nice to flip between components and see how the structure changes in the same area....but I'm convinced enough that it is better to have a better grasp of the individual components.

I think, based on what I've seen, that there is still enough information there to identify good/bad components, and perhaps it can do even better. Not worth holding up the overall fix, and potentially it could even improve that process.

@tsalo tsalo merged commit 7c0b91f into ME-ICA:main Feb 29, 2024
16 checks passed
@tsalo tsalo deleted the improve-comp-plots branch February 29, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues describing possible enhancements to the project reports issues related to boilerplate generation or visual reports
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check orientation of brain/acquisition in figures
3 participants