Skip to content

Commit

Permalink
Merge pull request #71 from didi-hou/fix-fc-plot-area-order
Browse files Browse the repository at this point in the history
Correct the areas order in the plot of functional connectivity
  • Loading branch information
shimoura authored Mar 28, 2024
2 parents 1b1d1c6 + 9702af5 commit c46b0b6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
3 changes: 2 additions & 1 deletion figures/MAM2EBRAINS/M2E_firing_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,5 @@ def plot_firing_rate_over_areas(M, data_path):
ax.set_ylabel('Area', size=13)
ax.set_xlabel('Time (ms)', size=13)

pl.colorbar(im)
cbar = pl.colorbar(im)
cbar.set_label('spikes/s', fontsize=13)
12 changes: 8 additions & 4 deletions figures/MAM2EBRAINS/M2E_visualize_fc.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ def visualize_fc(M, data_path):
"""
Figure layout
"""
fig = pl.figure(figsize=(10, 4))
fig = pl.figure(figsize=(9, 4))
fig.suptitle('Simulated functional connectivity (left) and FC of macaque resting-state fMRI',
fontsize=17, x=0.5, y=1.1)
fontsize=17, x=0.53, y=1.15)
axes = {}
gs1 = gridspec.GridSpec(1, 2)
gs1.update(left=0.05, right=0.95, top=1,
bottom=0, wspace=0.3, hspace=0)
bottom=0.3, wspace=0.3, hspace=0)
axes['A'] = pl.subplot(gs1[:1, :1])
axes['B'] = pl.subplot(gs1[:1, 1:2])

Expand Down Expand Up @@ -188,9 +188,13 @@ def visualize_fc(M, data_path):
ax = axes['B']
matrix_plot(M, ax, zero_diagonal(exp_FC),
part_sim_index, 1., pos=(0, 0))

areas = np.array(M.area_list)[part_sim_index]
area_string = areas[0]
for area in areas[1:]:
area_string += ' '
area_string += area

pl.text(0.00, 0.15, r'Order of cortical areas:', transform=fig.transFigure, fontsize=13, fontweight='bold')
pl.text(0.00, 0.1, area_string,
transform=fig.transFigure, fontsize=11)
3 changes: 2 additions & 1 deletion figures/MAM2EBRAINS/M2E_visualize_time_ave_pop_rates.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def plot_time_averaged_population_rates(M, data_path, area_list=None, **keywords
if masked_matrix.mask[i, j]:
ax.text(j + 0.5, i + 0.5, 'X', va='center', ha='center', color='black', fontsize=23)

plt.colorbar(im)
cbar = plt.colorbar(im)
cbar.set_label('spikes/s', fontsize=13)

if 'output' in keywords:
plt.savefig(os.path.join(M.output_dir, '{}_rates.{}'.format(M.simulation.label,
Expand Down
9 changes: 0 additions & 9 deletions multi-area-model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -657,15 +657,6 @@
"Comparison of area-level functional connectivity (FC) between the down-scaled MAM and macaque experimental data. (A) Simulated FC measured by the zero-time-lag correlation coefficient of synaptic input currents. (B) FC of macaque resting-state fMRI (see Materials and methods)."
]
},
{
"cell_type": "markdown",
"id": "678741b2-6dfa-4f1d-b4d8-ccd84f104767",
"metadata": {},
"source": [
"**Order of cortical areas**: <br>\n",
"V1, V2, VP, V3, V3A, MT, V4t, V4, VOT, MSTd, PIP, PO, DP, MIP, MDP, VIP, LIP, PITv, PITd, MSTl, CITv, CITd, FEF, TF, AITv, FST, 7a, STPp, STPa, 46, AITd, TH"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit c46b0b6

Please sign in to comment.