Synchrony in the ensemble

Is it possible to calculate synchrony in the ensemble over time? If yes, can anyone share the nengo code.
I have been trying to use Pinsky & Rinzel (1995) method to calculate synchrony in the ensemble but didn’t succeed. Thanks in advance.

Yes this is definitely possible, although that method has not been natively implemented in Nengo (in general we don’t implement analysis methods because there are so many, and some good packages already available that cover lots of them). To get spikes out of the ensemble you want to perform the calculation for, you can either save the data in the gui, or add a prob_spikes = nengo.Probe(ensemble.neurons) to your model. Then you can process that with your analysis code.

I already tried what you said, but what I needed was real-time calculation of synchrony in the network while running nengo code.

Ah, sorry i misunderstood the question. To do that, you can set up a node and then put whatever analysis algorithm you want in it … e.g.

def analyzer(x):
    <analyzer code here>

node = nengo.Node(analyzer, size_in=N)
nengo.Connection(a.neurons, node, synapse=None)

(a is an ensemble with N neurons)

This will give you x[0]-x[N-1] where each element is one neuron, so you can compute whatever you’d like there.