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.


Each element of the tuple corresponds to a pattern which it turn is a tuple of (spikes in the pattern, occurrences of the patterns)


Length (in bins) of the sliding window used for the analysis.


The time precision used to discretize the spiketrains (binning).

pv_specNone or tuple

Contains a tuple of signatures and the corresponding p-value. If equal to None all p-values 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_start of the analyzed spike trains


List of dictionaries. Each dictionary corresponds to a pattern and has the following entries:


A list of the spikes in the pattern, expressed in theform of itemset, each spike is encoded by spiketrain_id * winlen + bin_id.


The ids of the windows in which the pattern occurred in discretized time (given byt the binning).


An array containing the idx of the neurons of the pattern.


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.


An array containing the times (integers corresponding to the bin idx) of the occurrences of the patterns.


A tuple containing two integers (number of spikes of the patterns, number of occurrences of the pattern).


The p-value corresponding to the pattern. If n_surr==0, all p-values are set to -1.