Exception thrown when a function in spykeutils encounters a problem that is not covered by standard exceptions.
When using Spyke Viewer, these exceptions will be caught and shown in the GUI, while general exceptions will not be caught (and therefore be visible in the console) for easier debugging.
Return a list of analog signals for an analog signal array.
If signal_array is attached to a recording channel group with exactly is many channels as there are channels in signal_array, each created signal will be assigned the corresponding channel. If the attached recording channel group has only one recording channel, all created signals will be assigned to this channel. In all other cases, the created signal will not have a reference to a recording channel.
Note that while the created signals may have references to a segment and channels, the relationships in the other direction are not automatically created (the signals are not attached to the recording channel or segment). Other properties like annotations are not copied or referenced in the created analog signals.
Parameters:  signal_array (neo.core.AnalogSignalArray) – An analog signal array from which the neo.core.AnalogSignal objects are constructed. 

Returns:  A list of analog signals, one for every channel in signal_array. 
Return type:  list 
Return a list of epochs for an epoch array.
Note that while the created epochs may have references to a segment, the relationships in the other direction are not automatically created (the events are not attached to the segment). Other properties like annotations are not copied or referenced in the created epochs.
Parameters:  epoch_array (neo.core.EpochArray) – A period array from which the Epoch objects are constructed. 

Returns:  A list of events, one for of the events in epoch_array. 
Return type:  list 
Return a list of events for an event array.
Note that while the created events may have references to a segment, the relationships in the other direction are not automatically created (the events are not attached to the segment). Other properties like annotations are not copied or referenced in the created events.
Parameters:  event_array (neo.core.EventArray) – An event array from which the Event objects are constructed. 

Returns:  A list of events, one for of the events in event_array. 
Return type:  list 
Return a list of spikes for a spike train.
Note that while the created spikes have references to the same segment and unit as the spike train, the relationships in the other direction are not automatically created (the spikes are not attached to the unit or segment). Other properties like annotations are not copied or referenced in the created spikes.
Parameters: 


Returns:  A list of neo.core.Spike objects, one for every spike in spike_train. 
Return type:  list 
Return a spike train for a list of spikes.
All spikes must have an identical left sweep, the same unit and the same segment, otherwise a SpykeException is raised.
Note that while the created spike train has references to the same segment and unit as the spikes, the relationships in the other direction are not automatically created (the spike train is not attached to the unit or segment). Other properties like annotations are not copied or referenced in the created spike train.
Parameters: 


Returns:  All elements of spikes as spike train. 
Return type: 
Return (cross)correlograms from a dictionary of spike train lists for different units.
Parameters: 


Returns:  Two values:

Return type:  dict, Quantity 1D 
Bases: exceptions.Exception
This is raised when a user cancels a progress process. It is used by ProgressIndicator and its descendants.
Bases: object
Base class for classes indicating progress of a long operation.
This class does not implement any of the methods and can be used as a dummy if no progress indication is needed.
Signal that the operation starts.
Parameters:  title (string) – The name of the whole operation. 

Set status description.
Parameters:  new_status (string) – A description of the current status. 

Decorator for functions that should ignore a raised CancelException and just return nothing in this case
Return dictionary of binned rates for a dictionary of spike train lists.
Parameters: 


Returns:  A dictionary (with the same indices as trains) of lists of spike train counts and the bin borders. 
Return type:  dict, Quantity 1D 
Return dictionary of peri stimulus time histograms for a dictionary of spike train lists.
Parameters: 


Returns:  A dictionary (with the same indices as trains) of arrays containing counts (or rates if rate_correction is True) and the bin borders. 
Return type:  dict, Quantity 1D 
Create a spike density estimation from a dictionary of lists of spike trains.
The spike density estimations give an estimate of the instantaneous rate. The density estimation is evaluated at 1024 equally spaced points covering the range of the input spike trains. Optionally finds optimal kernel size for given data using the algorithm from (Shimazaki, Shinomoto. Journal of Computational Neuroscience. 2010).
Parameters: 


Returns:  Three values:

Return type:  dict, dict, Quantity 1D 
Return a list of spike trains aligned to an event (the event will be time 0 on the returned trains).
Parameters: 


Return a superposition of a list of spike trains.
Parameters:  trains (iterable) – A list of neo.core.SpikeTrain objects 

Returns:  A spike train object containing all spikes of the given spike trains. 
Return type:  neo.core.SpikeTrain 
Computes the minimum starting time and maximum end time that all given spike trains share.
Parameters:  trains (dict) – A dictionary of sequences of neo.core.SpikeTrain objects. 

Returns:  Maximum shared start time and minimum shared stop time. 
Return type:  Quantity scalar, Quantity scalar 
Return the optimal kernel size for a spike density estimation of a spike train for a gaussian kernel. This function takes a single spike train, which can be a superposition of multiple spike trains (created with collapsed_spike_trains()) that should be included in a spike density estimation.
Implements the algorithm from (Shimazaki, Shinomoto. Journal of Computational Neuroscience. 2010).
Parameters: 


Returns:  Best of the given kernel sizes 
Return type:  Quantity scalar 
Functions for estimating the quality of spike sorting results. These functions estimate false positive and false negative fractions.
Return a dict of tuples (False positive rate, false negative rate) indexed by unit.
Deprecated since version 0.2.1.
Use overlap_fp_fn() instead.
Details for the calculation can be found in (Hill et al. The Journal of Neuroscience. 2011). This function works on prewhitened data, which means it assumes that all clusters have a uniform normal distribution. Data can be prewhitened using the noise covariance matrix.
The calculation for total false positive and false negative rates does not follow (Hill et al. The Journal of Neuroscience. 2011), where a simple addition of pairwise probabilities is proposed. Instead, the total error probabilities are estimated using all clusters at once.
Parameters: 


Returns:  Two values:

Return type:  dict, dict 
Return the rate of false positives calculated from refractory period calculations for each unit. The equation used is described in (Hill et al. The Journal of Neuroscience. 2011).
Parameters: 


Returns:  A dictionary of false positive rates indexed by unit. Note that values above 0.5 can not be directly interpreted as a false positive rate! These very high values can e.g. indicate that the generating processes are not independent. 
Return the refractory period violations in the given spike trains for the specified refractory period.
Parameters: 


Returns:  Two values:

Return type:  int, dict 
Return dicts of tuples (False positive rate, false negative rate) indexed by unit. This function needs sklearn if covariances is not set to 'white'.
This function estimates the pairwise and total false positive and false negative rates for a number of waveform clusters. The results can be interpreted as follows: False positives are the fraction of spikes in a cluster that is estimated to belong to a different cluster (a specific cluster for pairwise results or any other cluster for total results). False negatives are the number spikes from other clusters that are estimated to belong to a given cluster (also expressed as fraction, this number can be larger than 1 in extreme cases).
Details for the calculation can be found in (Hill et al. The Journal of Neuroscience. 2011). The calculation for total false positive and false negative rates does not follow Hill et al., who propose a simple addition of pairwise probabilities. Instead, the total error probabilities are estimated using all clusters at once.
Parameters: 


Returns:  Two values:

Return type:  dict, dict 
Return a spike amplitude histogram.
The resulting is useful to assess the drift in spike amplitude over a longer recording. It shows histograms (one for each trains entry, e.g. segment) of maximum and minimum spike amplitudes.
Parameters: 


Returns:  A tuple with three values:

Return type:  (ndarray, list, list) 