Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Commit de33eff

Browse files
author
Antonio Ulloa
committed
Added script with analysis of functional connectivity matrices using graph theory
1 parent 912209c commit de33eff

File tree

131 files changed

+2032
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+2032
-318
lines changed

analysis/avg_FC_TVB_ROIs_across_subjects.py

Lines changed: 368 additions & 162 deletions
Large diffs are not rendered by default.

analysis/avg_FC_TVB_ROIs_across_subjects.py.old

Lines changed: 1207 additions & 0 deletions
Large diffs are not rendered by default.

analysis/compare_TVB_998_vs_Emp_FC.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@
244244

245245

246246
# now, convert back to from Z to R correlation coefficients
247-
empirical_fc_lowres = empirical_fc_lowres_Z
248-
tvb_rs_fc_lowres = tvb_rs_fc_lowres_Z
247+
empirical_fc_lowres = np.tanh(empirical_fc_lowres_Z)
248+
tvb_rs_fc_lowres = np.tanh(tvb_rs_fc_lowres_Z)
249249

250250
# save the simulated FCs to a file
251251
np.save(tvb_fc_file, tvb_rs_fc_lowres)
@@ -361,7 +361,7 @@
361361
ax.set_xticklabels(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'])
362362
ax.set_yticklabels(['.0042', '.0142', '.0242', '.0342', '.0442',
363363
'.0542', '.0642', '.0742', '.0842', '.0942'])
364-
plt.xlabel('White matter speed')
364+
plt.xlabel('Conduction speed')
365365
plt.ylabel('Global coupling strength')
366366
color_bar=plt.colorbar(cax)
367367

@@ -424,9 +424,10 @@
424424
cc = np.corrcoef(flat_sc, flat_fc)[1,0]
425425
plt.text(0.9, -0.3, 'r=' + '{:.2f}'.format(cc))
426426

427-
# scatter plot of empirical FC vs best matched simulated FC
427+
#################################################################
428+
# scatter plot of lo-res (66 ROI) empirical FC vs best matched simulated FC
428429
# initialize figure to plot correlations between empirical and simulated FC
429-
fig=plt.figure('Empirical vs Simulated FC')
430+
fig=plt.figure('Empirical vs Simulated FC (66 ROIs)')
430431
flat_sim_fc_m = np.ma.array(flat_sim_rs_fc[max_r], mask=sc_mask) # mask where struct. connections absent
431432
flat_sim_fc = np.ma.compressed(flat_sim_fc_m) # remove masked elements
432433
plt.scatter(flat_emp_fc, flat_sim_fc)

simulation/sim_without_LSNM.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def dfun(self, state_variables, coupling, local_coupling=0.0):
126126
speed = 1.0
127127

128128
# define length of simulation in ms
129-
simulation_length = 5.0
129+
simulation_length = 198000.0
130130

131131
# define the simulation time in total number of timesteps
132132
# Each timestep is roughly equivalent to 5ms
55.4 KB
6.05 KB

visual_model/corr_RS_PV_DMS.png

-10.8 KB
-10 KB
92.8 KB
92.2 KB

0 commit comments

Comments
 (0)