Started addressing comments from meeting in Tuebingen

This commit is contained in:
nkoch1
2022-10-02 20:02:27 +02:00
parent 80f1d1cd8f
commit ad3a5c9945
6 changed files with 94 additions and 75 deletions

Binary file not shown.

View File

@@ -184,8 +184,8 @@ add_scalebar(ax12_spikes, matchx=False, matchy=False, hidex=True, hidey=True, si
bbox_transform=ax12_spikes.transAxes)
# add subplot labels
for i in range(0,len(models)):
spike_axs[i].text(-0.18, 1.08, string.ascii_uppercase[i], transform=spike_axs[i].transAxes, size=10, weight='bold')
# spike_axs[i].text(-0.18, 1.08, string.ascii_uppercase[i], transform=spike_axs[i].transAxes, size=10, weight='bold')
spike_axs[i].text(-0.18, 1.2, string.ascii_uppercase[i], transform=spike_axs[i].transAxes, size=10, weight='bold')
# save
fig.set_size_inches(cm2inch(17.6,20))
fig.savefig('./Figures/diversity_in_firing.pdf', dpi=fig.dpi) #pdf # eps

View File

@@ -41,14 +41,20 @@ def correlation_plot(ax, df='AUC', title='', cbar=False):
# array for names
cmap = sns.diverging_palette(220, 10, as_cmap=True)
models = ['RS_pyramidal', 'RS_inhib', 'FS', 'Cb_stellate', 'Cb_stellate_Kv', 'Cb_stellate_Kv_only', 'STN',
'STN_Kv', 'STN_Kv_only']
model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'Cb stellate',
'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN',
'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']
# model_letter_names = ['Model H', 'Model E', 'Model G', 'Model A', 'Model F', 'Model J', 'Model L', 'Model I', 'Model K']
model_letter_names = ['H', 'E', 'G', 'A', 'F', 'J', 'L', 'I', 'K']
# models = ['RS_pyramidal', 'RS_inhib', 'FS', 'Cb_stellate', 'Cb_stellate_Kv', 'Cb_stellate_Kv_only', 'STN',
# 'STN_Kv', 'STN_Kv_only']
# model_names = ['RS pyramidal', 'RS inhibitory', 'FS', 'Cb stellate',
# 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
# 'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN',
# 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']
# model_letter_names = ['H', 'E', 'G', 'A', 'F', 'J', 'L', 'I', 'K']
models =['Cb_stellate','RS_inhib','Cb_stellate_Kv','FS', 'RS_pyramidal','STN_Kv', 'Cb_stellate_Kv_only','STN_Kv_only', 'STN']
model_names = ['Cb stellate','RS inhibitory', 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'FS',
'RS pyramidal', 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$','STN']
model_letter_names = ['A', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L']
col_dict = {}
for m in range(len(models)):
col_dict[model_names[m]] = model_letter_names[m]
@@ -65,18 +71,26 @@ def correlation_plot(ax, df='AUC', title='', cbar=False):
np.fill_diagonal(mask, False)
# models and renaming of tau
models = ['RS pyramidal', 'RS inhibitory', 'FS', 'Cb stellate',
'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN',
'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']
model_names = ['RS pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'RS inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'Cb stellate', 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN',
'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']
# model_letter_names = ['Model H', 'Model E', 'Model G', 'Model A', 'Model F', 'Model J', 'Model L', 'Model I', 'Model K']
model_letter_names = ['H', 'E', 'G', 'A', 'F', 'J', 'L', 'I', 'K']
# models = ['RS pyramidal', 'RS inhibitory', 'FS', 'Cb stellate',
# 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
# 'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN',
# 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']
# model_names = ['RS pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
# 'RS inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
# 'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
# 'Cb stellate', 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
# 'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN',
# 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$']
# # model_letter_names = ['Model H', 'Model E', 'Model G', 'Model A', 'Model F', 'Model J', 'Model L', 'Model I', 'Model K']
# model_letter_names = ['H', 'E', 'G', 'A', 'F', 'J', 'L', 'I', 'K']
models = ['Cb_stellate', 'RS_inhib', 'Cb_stellate_Kv', 'FS', 'RS_pyramidal', 'STN_Kv', 'Cb_stellate_Kv_only',
'STN_Kv_only', 'STN']
model_names = ['Cb stellate', 'RS inhibitory', 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'FS',
'RS pyramidal', 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN']
model_letter_names = ['A', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L']
col_dict = {}
for m in range(len(models)):
col_dict[model_names[m]] = model_letter_names[m]
@@ -206,18 +220,17 @@ sim_style()
fig = plt.figure()
gs0 = fig.add_gridspec(1, 6, wspace=-0.2)
gsl = gs0[0:3].subgridspec(3, 3, wspace=0.9, hspace=0.8)
gsr = gs0[4:6].subgridspec(7, 1, wspace=0.6, hspace=0.8)
ax00 = fig.add_subplot(gsl[0,0])
ax01 = fig.add_subplot(gsl[0,1])
ax02 = fig.add_subplot(gsl[0,2])
ax10 = fig.add_subplot(gsl[1,0])
ax11 = fig.add_subplot(gsl[1,1])
ax12 = fig.add_subplot(gsl[1,2])
ax20 = fig.add_subplot(gsl[2,0])
ax21 = fig.add_subplot(gsl[2,1])
ax22 = fig.add_subplot(gsl[2,2])
gsr = gs0[4:6].subgridspec(7, 1, wspace=0.6, hspace=3.8)
ax00 = fig.add_subplot(gsl[1,1]) #model H
ax01 = fig.add_subplot(gsl[0,1]) # model E
ax02 = fig.add_subplot(gsl[1,0]) # model G
ax10 = fig.add_subplot(gsl[0,0]) # model A
ax11 = fig.add_subplot(gsl[0,2]) # model F
ax12 = fig.add_subplot(gsl[2,0]) # model J
ax20 = fig.add_subplot(gsl[2,2]) # model L
ax21 = fig.add_subplot(gsl[1,2]) # model I
ax22 = fig.add_subplot(gsl[2,1]) # model K
axr0 = fig.add_subplot(gsr[0:3,0])
axr1 = fig.add_subplot(gsr[4:,0])
@@ -235,21 +248,24 @@ ax22 = mutation_plot(ax22, model='STN_Kv_only')
marker_s_leg = 4
pos = (0.425, -0.7)
ncol = 5
mutation_legend(ax21, marker_s_leg, pos, ncol)
mutation_legend(ax22, marker_s_leg, pos, ncol)
# plot correlation matrices
correlation_plot(axr1,df = 'AUC', title='Normalized $\Delta$AUC', cbar=False)
correlation_plot(axr0,df = 'rheo', title='$\Delta$Rheobase', cbar=True)
# add subplot labels
axs = [ax00, ax01,ax02, ax10, ax11, ax12, ax20, ax21, ax22]
# axs = [ax00, ax01,ax02, ax10, ax11, ax12, ax20, ax21, ax22]
axs = [ax10, ax01, ax11, ax02, ax00, ax21, ax12, ax22, ax20]
j=0
for i in range(0,9):
# axs[i].text(-0.48, 1.175, string.ascii_uppercase[i], transform=axs[i].transAxes, size=10, weight='bold')
axs[i].text(-0.625, 1.25, string.ascii_uppercase[i], transform=axs[i].transAxes, size=10, weight='bold')
j +=1
axr0.text(-0.77, 1.1, string.ascii_uppercase[j], transform=axr0.transAxes, size=10, weight='bold')
axr1.text(-0.77, 1.1, string.ascii_uppercase[j+1], transform=axr1.transAxes, size=10, weight='bold')
axr0.text(-0.27, 1.075, string.ascii_uppercase[j], transform=axr0.transAxes, size=10, weight='bold')
axr1.text(-0.27, 1.075, string.ascii_uppercase[j+1], transform=axr1.transAxes, size=10, weight='bold')
# save
fig.set_size_inches(cm2inch(22.2,15))