BrainSpace is an open-access toolbox that allows for the identification and analysis of gradients from neuroimaging and connectomics datasets | available in both Python and Matlab |
What are you trying to do?
I am using Brainspace to run PCA with Alignment on set of subjects in different sessions, I want to use Schaefer 1000 parcellation, As @OualidBenkarim describe previously in closed issue 17, I Download the relevant files Schaefer parcellation in fsa5.
If you've tried running this with BrainSpace code already, how did you do so and what went wrong?
I am trying to visualizing the Brains in separate hemi and views,
The labels that I have (That are not Zero ) = 18741
The fsaverage5 data lh/rh.inflated are 18715(9354 +9361)
This is the code that I used using Brain space:
Here is an example of the plot that I am trying to create and the output:
surf_labels_lh = nib.freesurfer.read_annot('parcellation/lh.Schaefer2018_1000Parcels_7Networks_order.annot')[0] surf_labels_rh = nib.freesurfer.read_annot('parcellation/rh.Schaefer2018_1000Parcels_7Networks_order.annot')[0] surf_labels_rh[surf_labels_rh != 0] += 500 # different labels for lh and rh surf_labels = np.concatenate([surf_labels_lh, surf_labels_rh])
mask = surf_labels != 0 # discard medial wall cort_lh = nib.freesurfer.read_label('parcellation/lh.cortex.label') cort_rh = nib.freesurfer.read_label('parcellation/rh.cortex.label') surf_lh_loc = nib.freesurfer.read_geometry('parcellation/lh.inflated') surf_rh_loc = nib.freesurfer.read_geometry('parcellation/rh.inflated') cort = np.concatenate((cort_lh, cort_rh + 10242)) """ # Visualize group-level average components # """ for v,se in enumerate(ses): for k, s in enumerate(subjs): n_comps = 5 n_views = 4 # number of brains to show per component fig_width = 10 eigenVal = [] from nilearn.plotting import plot_surf_stat_map
I am trying to understand why I am getting these "NAN" values in the plot, and how can I fix it , Is there something in the files I am using wring or the flow is not correct?
Hey Team,
What are you trying to do? I am using Brainspace to run PCA with Alignment on set of subjects in different sessions, I want to use Schaefer 1000 parcellation, As @OualidBenkarim describe previously in closed issue 17, I Download the relevant files Schaefer parcellation in fsa5.
If you've tried running this with BrainSpace code already, how did you do so and what went wrong? I am trying to visualizing the Brains in separate hemi and views,
The labels that I have (That are not Zero ) = 18741 The fsaverage5 data lh/rh.inflated are 18715(9354 +9361)
This is the code that I used using Brain space:
Here is an example of the plot that I am trying to create and the output:
This is the output:
I am trying to understand why I am getting these "NAN" values in the plot, and how can I fix it , Is there something in the files I am using wring or the flow is not correct?
Thanks In advance , and Appreciate any help
Yvonne Serhan
Fixed Thanks