elephant.asset.asset.synchronous_events_intersection(sse1, sse2, intersection='linkwise')[source]

Given two sequences of synchronous events (SSEs) sse1 and sse2, each consisting of a pool of positions (iK, jK) of matrix entries and associated synchronous events SK, finds the intersection among them.

The intersection can be performed ‘pixelwise’ or ‘linkwise’.

  • if ‘pixelwise’, it yields a new SSE which retains only events in sse1 whose pixel position matches a pixel position in sse2. This operation is not symmetric: intersection(sse1, sse2) != intersection(sse2, sse1).

  • if ‘linkwise’, an additional step is performed where each retained synchronous event SK in sse1 is intersected with the corresponding event in sse2. This yields a symmetric operation: intersection(sse1, sse2) = intersection(sse2, sse1).

Both sse1 and sse2 must be provided as dictionaries of the type

{(i1, j1): S1, (i2, j2): S2, …, (iK, jK): SK},

where each i, j is an integer and each S is a set of neuron IDs.

sse1, sse2dict

Each is a dictionary of pixel positions (i, j) as keys and sets S of synchronous events as values (see above).

intersection{‘pixelwise’, ‘linkwise’}, optional

The type of intersection to perform among the two SSEs (see above). Default: ‘linkwise’


A new SSE (same structure as sse1 and sse2) which retains only the events of sse1 associated to keys present both in sse1 and sse2. If intersection = ‘linkwise’, such events are additionally intersected with the associated events in sse2.

See also


extract SSEs from given spike trains