Skip to content

Commit d390288

Browse files
committed
added analysis code for fig 2 (quiet/spontaneous)
1 parent 89ecfc6 commit d390288

File tree

2 files changed

+692
-22
lines changed

2 files changed

+692
-22
lines changed

analysis/fig_quiet.py

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def fig_quiet():
2121
# ---------------------------------------------------------------------------------------------------------------
2222
# Config
2323

24-
raster = 1
25-
histogram = 1
26-
traces = 1
24+
raster = 0
25+
histogram = 0
26+
traces = 0
2727
stats_boxplot = 1 # boxplot of rates
2828

2929
fontsiz = 16
@@ -166,24 +166,6 @@ def fig_quiet():
166166
timeRange = [2000, 4000]
167167

168168

169-
# plot all cells recorded
170-
'''
171-
include = list(range(10073))
172-
timeRange = [2000, 4000]
173-
recordStep = 0.1
174-
t = np.arange(timeRange[0], timeRange[1]+recordStep, recordStep)
175-
for gid in include:
176-
fullTrace = sim.allSimData['V_soma']['cell_'+str(gid)]
177-
vtrace = np.array(fullTrace[int(timeRange[0]/recordStep):int(timeRange[1]/recordStep)])
178-
plt.figure(figsize=(12, 4))
179-
plt.plot(t[:len(vtrace)], vtrace, linewidth=1, color='black')
180-
plt.ylim(-100,40)
181-
plt.xlabel('time (ms)')
182-
plt.ylabel('mV')
183-
plt.savefig('%s/V_traces/v56_batch23_V_soma_time_%d_%d_cell_%d' % (root, timeRange[0], timeRange[1], gid))
184-
'''
185-
186-
187169
# plot subset of cells with the correct format
188170
from netpyne.support.scalebar import add_scalebar
189171

@@ -214,7 +196,7 @@ def addScaleBar(timeRange=timeRange, loc=1):
214196
ax = plt.gca()
215197
plt.title('')
216198
plt.tight_layout()
217-
plt.savefig('%s/V_traces/%s_V_soma_cell_%d_%d_%d_x1.5_axis.png' % (root, simLabel, gid, timeRange[0], timeRange[1]), dpi=200)
199+
plt.savefig('%s/%s_V_soma_cell_%d_%d_%d_x1.5_axis.png' % (root, simLabel, gid, timeRange[0], timeRange[1]), dpi=200)
218200

219201

220202
# ---------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)