How to record xi?

Hi @cclo. I agree that this is not ideal – in particular, you should get an error message when trying to record from xi. The reason why this isn’t possible is that internally, there is no variable named xi, it is directly taken in charge as part of the numerical integration process. As an alternative, you can replace it by a variable that does the same thing manually, and which you can then record in the usual way:

eqs = '''
dv/dt = sigma*noise*tau**-0.5: 1 (unless refractory)
noise = randn()/sqrt(dt) : second**-0.5 (constant over dt)
...
'''

The value of noise might still not quite what you expect, since the values will depend on the dt that is used for the simulation. This is correct, though (see Models and neuron groups — Brian 2 2.6.0 documentation for a short explication). If you are only interested in the values of the random generator you could of course reformulate everything as, for example:

eqs = '''
dv/dt = sigma*noise/sqrt(dt)*tau**-0.5: 1 (unless refractory)
noise = randn() : 1 (constant over dt)
...
'''

You might also be interested in these comments I made in other discussions threads: