Skip to content

Commit

Permalink
added warn notes to fanofactor (NeuralEnsemble#357)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Denker <[email protected]>
  • Loading branch information
dizcza and mdenker authored Oct 19, 2020
1 parent 11a9e12 commit daa6f2d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion elephant/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ def fanofactor(spiketrains, warn_tolerance=0.1 * pq.ms):
spike times for which to compute the Fano factor of spike counts.
warn_tolerance : pq.Quantity
In case of a list of input neo.SpikeTrains, if their durations vary by
more than `warn_tolerence` in their absolute values, throw a waring.
more than `warn_tolerence` in their absolute values, throw a warning
(see Notes).
Default: 0.1 ms.
Returns
Expand All @@ -277,6 +278,11 @@ def fanofactor(spiketrains, warn_tolerance=0.1 * pq.ms):
If the input spiketrains are neo.SpikeTrain objects, but
`warn_tolerance` is not a quantity.
Notes
-----
The check for the equal duration of the input spike trains is performed
only if the input is of type`neo.SpikeTrain`: if you pass a numpy array,
please make sure that they all have the same duration manually.
"""
# Build array of spike counts (one per spike train)
spike_counts = np.array([len(st) for st in spiketrains])
Expand Down

0 comments on commit daa6f2d

Please sign in to comment.