import pylab as plt
import numpy as np
import seaborn as sns
sns.set(font_scale=2.0)
Tsim=5000
VmsDBC0 = np.loadtxt('VmsDBC0.txt', dtype=float)
ts_mul_DBC0 = np.loadtxt('ts_mul_DBC0.txt', dtype=float)
evsDBC0 = np.loadtxt('evsDBC0.txt', dtype=float)
tsDBC0 = np.loadtxt('tsDBC0.txt', dtype=float)
spikesDBC0 = np.loadtxt('spikesDBC0.txt', dtype=float)
evsPYR0 = np.loadtxt('evsPYR0.txt', dtype=float)
tsPYR0 = np.loadtxt('tsPYR0.txt', dtype=float)
spikesPYR0 = np.loadtxt('spikesPYR0.txt', dtype=float)
evsBS_HC0 = np.loadtxt('evsBS_HC0.txt', dtype=float)
tsBS_HC0 = np.loadtxt('tsBS_HC0.txt', dtype=float)
spikesPYR1 = np.loadtxt('spikesPYR1.txt', dtype=float)
evsDBC1 = np.loadtxt('evsDBC1.txt', dtype=float)
tsDBC1 = np.loadtxt('tsDBC1.txt', dtype=float)
evsPYR1 = np.loadtxt('evsPYR1.txt', dtype=float)
tsPYR1 = np.loadtxt('tsPYR1.txt', dtype=float)
evsDBC2 = np.loadtxt('evsDBC2.txt', dtype=float)
tsDBC2 = np.loadtxt('tsDBC2.txt', dtype=float)
evsPYR2 = np.loadtxt('evsPYR2.txt', dtype=float)
tsPYR2 = np.loadtxt('tsPYR2.txt', dtype=float)
evsBS_HC1 = np.loadtxt('evsBS_HC1.txt', dtype=float)
tsBS_HC1 = np.loadtxt('tsBS_HC1.txt', dtype=float)
evsDBC3 = np.loadtxt('evsDBC3.txt', dtype=float)
tsDBC3 = np.loadtxt('tsDBC3.txt', dtype=float)
evsPYR3 = np.loadtxt('evsPYR3.txt', dtype=float)
tsPYR3 = np.loadtxt('tsPYR3.txt', dtype=float)
sns.set_style("darkgrid")
plt.figure(1)
plt.figure(figsize=(12,10))
plt.title('Spike raster of neurons in HC0')
sns.regplot(x=tsDBC0, y=evsDBC0,fit_reg=False,scatter_kws={"s": 12},color='limegreen')
sns.regplot(x=tsPYR0, y=evsPYR0,fit_reg=False,scatter_kws={"s": 15},color='tomato')
sns.regplot(x=tsBS_HC0, y=evsBS_HC0,fit_reg=False,scatter_kws={"s": 12})
sns.regplot(x=tsDBC1, y=evsDBC1,fit_reg=False,scatter_kws={"s": 12},color='limegreen')
sns.regplot(x=tsPYR1, y=evsPYR1,fit_reg=False,scatter_kws={"s": 15},color='tomato')
plt.xlabel('time [ms]')
plt.ylabel('Neuron ID')
plt.savefig('Fig.3A.png')
plt.show()
params = {'mathtext.default': 'regular' }
plt.rcParams.update(params)
plt.figure(2)
plt.figure(figsize=(12,7))
plt.plot(ts_mul_DBC0,VmsDBC0,color = "g")
plt.ylabel("$V_m$ $(DBC_{MC0}^{HC0})$ [mV]")
plt.xlabel("time [ms]")
plt.title("Membrane voltage of a stimulated DBC")
plt.savefig('Fig.1C.png')
plt.show()