summaryrefslogtreecommitdiff
path: root/pyspike/isi_distance.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyspike/isi_distance.py')
-rw-r--r--pyspike/isi_distance.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/pyspike/isi_distance.py b/pyspike/isi_distance.py
index a85028f..122e11d 100644
--- a/pyspike/isi_distance.py
+++ b/pyspike/isi_distance.py
@@ -14,7 +14,7 @@ from pyspike.generic import _generic_profile_multi, _generic_distance_multi, \
# isi_profile
############################################################
def isi_profile(*args, **kwargs):
- """ Computes the isi-distance profile :math:`I(t)` of the two given
+ """ Computes the isi-distance profile :math:`I(t)` of the given
spike trains. Returns the profile as a PieceWiseConstFunc object. The
ISI-values are defined positive :math:`I(t)>=0`.
@@ -22,8 +22,9 @@ def isi_profile(*args, **kwargs):
isi_profile(st1, st2) # returns the bi-variate profile
isi_profile(st1, st2, st3) # multi-variate profile of 3 spike trains
+
spike_trains = [st1, st2, st3, st4] # list of spike trains
- isi_profile(spike_trains) # return the profile the list of spike trains
+ isi_profile(spike_trains) # profile of the list of spike trains
isi_profile(spike_trains, indices=[0, 1]) # use only the spike trains
# given by the indices
@@ -108,13 +109,23 @@ def isi_profile_multi(spike_trains, indices=None):
# isi_distance
############################################################
def isi_distance(*args, **kwargs):
- # spike_trains, spike_train2, interval=None):
""" Computes the ISI-distance :math:`D_I` of the given spike trains. The
isi-distance is the integral over the isi distance profile
:math:`I(t)`:
.. math:: D_I = \\int_{T_0}^{T_1} I(t) dt.
+
+ Valid call structures::
+
+ isi_distance(st1, st2) # returns the bi-variate distance
+ isi_distance(st1, st2, st3) # multi-variate distance of 3 spike trains
+
+ spike_trains = [st1, st2, st3, st4] # list of spike trains
+ isi_distance(spike_trains) # distance of the list of spike trains
+ isi_distance(spike_trains, indices=[0, 1]) # use only the spike trains
+ # given by the indices
+
:returns: The isi-distance :math:`D_I`.
:rtype: double
"""