-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_output.py
More file actions
35 lines (27 loc) · 842 Bytes
/
plot_output.py
File metadata and controls
35 lines (27 loc) · 842 Bytes
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
import numpy as np
import matplotlib.pyplot as plt
import h5py
from bmtk.analyzer.cell_vars import _get_cell_report, plot_report
import matplotlib.pyplot as plt
import pandas as pd
from scipy.signal import find_peaks
import pdb
# Load data
config_file = "simulation_config.json"
raster_file = './output/spikes.h5'
mem_pot_file = './output/v_report.h5'
cai_file = './output/cai_report.h5'
# load
f = h5py.File(mem_pot_file,'r')
g = h5py.File(cai_file,'r')
mem_potential = f['report']['biophysical']['data']
plt.plot(np.arange(0,mem_potential.shape[0]/10,.1),mem_potential[:,0])
plt.text(200,-80,'tone')
plt.text(700,-80,'tone+shock')
plt.text(1600,-80,'tone+shock')
plt.text(2600,-80,'tone')
plt.xlabel('time (ms)')
plt.ylabel('membrane potential (mV)')
#caiplt = g['report']['biophysical']['data']
#plt.plot(caiplt[:,0])
plt.show()