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

why the n_conns in LabelConnectivity becomes 0 while in VertexConnectivity is not? #8

Open
Zhouyu0206 opened this issue Oct 4, 2022 · 5 comments

Comments

@Zhouyu0206
Copy link

Hi,
Thanks a lot for creating such a handy package!
I got a VertexConnectivity object 'con_clust' which shows that '<VertexConnectivity | n_sources=3331, n_conns=329, subject=fsaverage>', when I tried to parcel it using 'con_parc = con_clust.parcellate(labels, summary='degree', weight_by_degree=False)', the info of con_parc shows that: <LabelConnectivity | n_sources=68, n_conns=0, subject=fsaverage>.
I'm wondering why the n_conns in LabelConnectivity becomes 0 while in VertexConnectivity is not?

@wmvanvliet
Copy link
Collaborator

Good question... could you share your VertexConnectivity file somehow? (Feel free to send me an email: marijn.vanvliet@aalto.fi). This sounds like something that should never happen.

@Zhouyu0206
Copy link
Author

Hi! Marijn,
I've already sent it to your email. Thank you so much!

@wmvanvliet
Copy link
Collaborator

Ah... it's because the connection strength for every connection in your VertexConnectivity object is 0. Double-check your connectivity metric. If you don't care about connection strength, try setting it to all ones:

con.data = np.ones_likes(con.data)

@wmvanvliet
Copy link
Collaborator

A connection with a strength of 0 is actually treated by conpy as no connection at all

@Zhouyu0206
Copy link
Author

I see, thank you very much! But if the strength of every connection in my VertexConnectivity object is 0, why they existed in the first place? I mean if the strength of a connection is 0, why this connection would exist in the VertexConnectivity object?

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

No branches or pull requests

2 participants