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 Nilearn plotting functionality to scona #145

Merged
merged 25 commits into from
Aug 23, 2019

Conversation

wingedRuslan
Copy link
Collaborator

@wingedRuslan wingedRuslan commented Jul 24, 2019

  • I'm ready to merge
  • What's the context for this pull request?
    (this is a good place to reference any issues that this PR addresses)

  • What's new?
    Created visualisation tools for plotting with nilearn
    Added tutorial to show how to use these tools

  • What should a reviewer feedback on?
    Functions Implementation
    Produced plots

  • Does anything need to be updated after merge?
    (e.g the wiki or the WhitakerLab website)

@Islast
Copy link
Collaborator

Islast commented Jul 31, 2019

@KirstieJane
Copy link
Member

KirstieJane commented Aug 14, 2019

Hey @wingedRuslan!

Can we adjust the view_connectome code so that the symmetric colormap works more intuitively? If the threshold is positive can we create a copy of the graph that sets all negative weights to 0 so we don't have to deal with them?

G_pos = G.copy()

for edge in G_pos.edges():
    if G_pos.edges[edge]['weight'] < 0.0:
        G_pos.edges[edge]['weight'] = 0

OR you can just do it from the adjacency matrix as that's what's passed to plotting.view_connectome.

The only slightly fiddly bit is figuring out the threshold - if its a number which is greater than 0 then that's easy, but if it is a percentage as a string you need to detect that its a string, drop the '%' character and then divide by 100 before you pass to np.percentile.

Does that make sense?

Updates to interactive plotting tutorial
@KirstieJane
Copy link
Member

Hey @wingedRuslan - I'd love to get this merged in so that it can be in your final report! Can you fix the merge conflicts and ping me in gitter when you think the tutorials is good to be merged? I think its very close and so I'll try to find time either before or after the meeting to review.

@wingedRuslan
Copy link
Collaborator Author

@KirstieJane, sure, I plan to do this today! It would be great if you would have time after the meeting to review.

Copy link
Member

@KirstieJane KirstieJane left a comment

Choose a reason for hiding this comment

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

Awesome work @wingedRuslan!! Click the merge button!!

@wingedRuslan wingedRuslan merged commit 9642b72 into WhitakerLab:master Aug 23, 2019
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