-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathanalyze-spike-properties.jl
More file actions
126 lines (89 loc) · 2.41 KB
/
analyze-spike-properties.jl
File metadata and controls
126 lines (89 loc) · 2.41 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
using CSV, DataFrames, Plots, LaTeXStrings, Peaks, Glob
V = DataFrame()
for i ∈ 0:2
v0 = CSV.read("data/fi-curves/vm-$i.000000.txt", delim="\t", header=0, DataFrame)
v0[:,"ID"] .= i
V = [V; v0]
end
pks, vals = findmaxima(V[V.ID .== 0,20])
pks = pks[vals .> 0.0]
ndrs, vals = findminima(V[V.ID .== 0, 20])
v0 = V[V.ID .== 0, :]
plot(v0[:,1], v0[:,20])
scatter!(v0[pks,1], v0[pks,20])
scatter!(v0[ndrs,1], v0[ndrs,20])
"""
find_spikes(v;thresh)
Finds the spike peaks in a voltage tracing. Spikes are defined as those maxima that exceed some value `thresh` where default is that `thresh=0.0`
"""
function find_spikes(v::Vector{Float64};thresh::Float64=0.0)
end
"""
mean_frequency(v)
Mean frequency calculated as number of action potentials during
stimulation divided by time between stimulus onset and last spike in
Hz.
"""
function mean_frequency(v::Vector{Float64})
end
"""
isi_log_slope(v)
Slope of loglog interspike intervals (ISI).
"""
function isi_log_slope(v::Vector{Float64})
end
"""
adaptation_index2(v)
Normalized average difference of two consecutive ISI starting from
second ISI.
"""
function adaptation_index2(v::Vector{Float64})
end
"""
time_to_first_spike(v)
Time from stimulus onset to peak time of first spike in ms.
"""
function time_to_first_spike(v::Vector{Float64})
end
"""
time_to_last_spike(v)
Time from stimulus onset to peak time of last spike in ms.
"""
function time_to_last_spike(v::Vector{Float64})
end
"""
AP_width(v)
Mean of width at -20 mV of action potential (AP) in ms. Mean for all AP.
"""
function AP_width(v::Vector{Float64})
end
"""
AP_height(v)
Height at peak of action potential in mV. Mean for all AP.
"""
function AP_height(v::Vector{Float64})
end
"""
min_voltage_between_spikes(v)
Minimum voltage between two action potentials in mV. Mean for all ISI.
"""
function min_voltage_between_spikes(v::Vector{Float64})
end
"""
steady_state_voltage_stimend(v)
The average voltage during the last 90% of the stimulus duration in mV.
"""
function steady_state_voltage_stimend(v::Vector{Float64})
end
"""
voltage_base(v)
The average voltage during the last 90% before stimulus onset in mV.
"""
function voltage_base(v::Vector{Float64})
end
"""
voltage_after_stim(v)
The average voltage between 25% and 75% between end of stimulus and end of recording in mV.
"""
function voltage_after_stim(v::Vector{Float64})
end