-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpoincare.py
37 lines (25 loc) · 863 Bytes
/
poincare.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from imports import *
c = constants()
xarr = np.load("1.npy")
yarr = np.load("2.npy")
print(len(xarr))
plot_array = []
for i in range(len(xarr)):
plot_array.append(
xarr[i][np.where(np.logical_and(yarr[i] < -2.4999, yarr[i] > -2.5001))])
# print(plot_array)
plt.figure()
plt.plot(np.arange(0, c.ms, c.scale), xarr[4])
# for i in range(len(plot_array)):
# # print(float(i/len(average_y1)))
# temp_vec = np.zeros(len(plot_array[i]))
# temp_vec = temp_vec + i * 0.1 + 1
# plt.scatter(temp_vec, plot_array[i], s=0.5, color="black")
# plt.plot(temp_vec, plot_array, linewidth=0.5, color="black", label = "neuron 1")
# plt.legend()
plt.title("Bifurcation of Membrane Potential (Poincare section at y = −2.5)")
plt.ylabel("membrane potential")
plt.xlabel("conductance")
plt.savefig("poincare", dpi=300)
# print("HI")
plt.show()