elephant.spade.concept_output_to_patterns¶

elephant.spade.
concept_output_to_patterns
(concepts, winlen, bin_size, pv_spec=None, spectrum='#', t_start=array(0.) * ms)[source]¶ Construction of dictionaries containing all the information about a pattern starting from a list of concepts and its associated pvalue_spectrum.
Parameters:  conceptstuple
Each element of the tuple corresponds to a pattern which it turn is a tuple of (spikes in the pattern, occurrences of the patterns)
 winlenint
Length (in bins) of the sliding window used for the analysis.
 bin_sizepq.Quantity
The time precision used to discretize the spiketrains (binning).
 pv_specNone or tuple
Contains a tuple of signatures and the corresponding pvalue. If equal to None all pvalues are set to 1.
 spectrum{‘#’, ‘3d#’}
 ‘#’: pattern spectrum using the as signature the pair:
(number of spikes, number of occurrences)
 ‘3d#’: pattern spectrum using the as signature the triplets:
(number of spikes, number of occurrence, difference between last and first spike of the pattern)
Default: ‘#’
 t_startpq.Quantity
t_start of the analyzed spike trains
Returns:  outputlist
List of dictionaries. Each dictionary corresponds to a pattern and has the following entries:
 ‘itemset’:
A list of the spikes in the pattern, expressed in theform of itemset, each spike is encoded by spiketrain_id * winlen + bin_id.
 ‘windows_ids’:
The ids of the windows in which the pattern occurred in discretized time (given byt the binning).
 ‘neurons’:
An array containing the idx of the neurons of the pattern.
 ‘lags’:
An array containing the lags (integers corresponding to the number of bins) between the spikes of the patterns. The first lag is always assumed to be 0 and corresponds to the first spike.
 ‘times’:
An array containing the times (integers corresponding to the bin idx) of the occurrences of the patterns.
 ‘signature’:
A tuple containing two integers (number of spikes of the patterns, number of occurrences of the pattern).
 ‘pvalue’:
The pvalue corresponding to the pattern. If n_surr==0, all pvalues are set to 1.