-
Notifications
You must be signed in to change notification settings - Fork 271
Expand file tree
/
Copy pathplot_igorio.py
More file actions
39 lines (30 loc) · 1.14 KB
/
plot_igorio.py
File metadata and controls
39 lines (30 loc) · 1.14 KB
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
38
39
"""
IgorProIO Demo
=======================
"""
###########################################################
# Import our packages
from urllib.request import urlretrieve
import matplotlib.pyplot as plt
from neo.io import get_io
#############################################################
# Then download some data
# we can try out some data on the NeuralEnsemble ephy testing repo
url_repo = "https://web.gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/"
distantfile = url_repo + "igor/win-version2.ibw"
localfile = "win-version2.ibw"
urlretrieve(distantfile, localfile)
# ######################################################
# Once we have our data we can use `get_io` to find an
# io (Igor in this case). Then we read the analogsignals
# Finally we will make some nice plots
#
# Note: not all IOs have all types of read functionality
# see our documentation for a better understanding of the
# Neo object hierarchy and the functionality of differnt IOs
reader = get_io(localfile)
signal = reader.read_analogsignal()
plt.plot(signal.times, signal)
plt.xlabel(signal.sampling_period.dimensionality)
plt.ylabel(signal.dimensionality)
plt.show()