New feature: include_t_stop flag in Synchrotool class
This pull request introduces a new feature to the Synchrotool class by adding the include_t_stop flag. This allows users to include the end of the spike train (t_stop) in the analysis, ensuring that any spikes close to t_stop are properly annotated.
Summary of changes
added include_t_stop as a new optional boolean parameter to the Synchrotool class constructor. If set to True, the spikes close to t_stop of the spike train are included in the analysis.
added description of the new parameter to the Synchrotool class docstring.
Examples
The following minimal example should not longer raise an index out of bounds error:
import neo
import numpy as np
import quantities as pq
from elephant.spike_train_synchrony import Synchrotool
sampling_rate = 1/pq.ms
st = neo.SpikeTrain(np.arange(0, 11)*pq.ms, t_start=0*pq.ms, t_stop=10*pq.ms)
synchrotool_instance = Synchrotool([st, st], sampling_rate, spread=0, include_t_stop=True)
synchrotool_instance.annotate_synchrofacts()
coverage: 88.278% (-0.1%) from 88.401%
when pulling 1bc87524083acd97260deb42cfe2b715b8052070 on INM-6:fix/index_error_synchrotool_493
into 123ca040b11a5961643c4de080df89af9b1fcd24 on NeuralEnsemble:master.
This PR adresses #493.
New feature:
include_t_stop
flag inSynchrotool
classThis pull request introduces a new feature to the Synchrotool class by adding the
include_t_stop flag
. This allows users to include the end of the spike train (t_stop) in the analysis, ensuring that any spikes close tot_stop
are properly annotated.Summary of changes
include_t_stop
as a new optional boolean parameter to the Synchrotool class constructor. If set to True, the spikes close to t_stop of the spike train are included in the analysis.Examples
The following minimal example should not longer raise an index out of bounds error: