elephant.spike_train_synchrony.Synchrotool¶
-
class
elephant.spike_train_synchrony.
Synchrotool
(spiketrains, sampling_rate, bin_size=None, binary=True, spread=0, tolerance=1e-08)[source]¶ Tool class to find, remove and/or annotate the presence of synchronous spiking events across multiple spike trains.
The complexity is used to characterize synchronous events within the same spike train and across different spike trains in the spiketrains list. This way synchronous events can be found both in multi-unit and single-unit spike trains.
This class inherits from
elephant.statistics.Complexity
, see its documentation for more details and input parameters description.See also
Methods
__init__
(spiketrains, sampling_rate[, …])Initialize self. annotate_synchrofacts
()Annotate the complexity of each spike in the self.epoch.array_annotations
in-place.delete_synchrofacts
(threshold[, in_place, mode])Delete or extract synchronous spiking events. pdf
()Probability density computed from the complexity histogram. -
annotate_synchrofacts
()[source]¶ Annotate the complexity of each spike in the
self.epoch.array_annotations
in-place.
-
delete_synchrofacts
(threshold, in_place=False, mode='delete')[source]¶ Delete or extract synchronous spiking events.
Parameters: - thresholdint
Threshold value for the deletion of spikes engaged in synchronous activity.
- deletion_threshold >= 2 leads to all spikes with a larger or equal complexity value to be deleted/extracted.
- deletion_threshold <= 1 leads to a ValueError, since this
would delete/extract all spikes and there are definitely more efficient ways of doing so.
- in_placebool, optional
Determines whether the modification are made in place on
self.input_spiketrains
. Default: False- mode{‘delete’, ‘extract’}, optional
- Inversion of the mask for deletion of synchronous events.
'delete'
leads to the deletion of all spikes with complexity >= threshold, i.e. deletes synchronous spikes.'extract'
leads to the deletion of all spikes with complexity < threshold, i.e. extracts synchronous spikes.
Default: ‘delete’
Returns: - list of neo.SpikeTrain
List of spiketrains where the spikes with
complexity >= threshold
have been deleted/extracted.- If
in_place
is True, the returned list is the same asself.input_spiketrains
. - If
in_place
is False, the returned list is a deepcopy ofself.input_spiketrains
.
- If
Raises: - ValueError
If mode is not one in {‘delete’, ‘extract’}.
If threshold <= 1.
-
pdf
()¶ Probability density computed from the complexity histogram.
Returns: - pdfneo.AnalogSignal
A neo.AnalogSignal object containing the pdf values. neo.AnalogSignal[j] is the histogram computed between t_start + j * binsize and t_start + (j + 1) * binsize.
-