Skip to content

Commit

Permalink
Merge 1dd28ec into b09dacd
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Nov 24, 2020
2 parents b09dacd + 1dd28ec commit 8b0c7e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 10 additions & 2 deletions brian2/equations/equations.py
Expand Up @@ -579,10 +579,18 @@ def __init__(self, eqns, **kwds):
raise EquationError(('The equation defining %s contains the '
'symbol "xi" but is not a differential '
'equation.') % eq.varname)
elif not uses_xi is None:
elif uses_xi is not None:
raise EquationError(('The equation defining %s contains the '
'symbol "xi", but it is already used '
'in the equation defining %s.') %
'in the equation defining %s. Rename '
'the variables to "xi_..." to make '
'clear whether they are the same or '
'independent random variables. Using '
'the same name twice will lead to '
'identical noise realizations '
'whereas using different names will '
'lead to independent noise '
'realizations.') %
(eq.varname, uses_xi))
else:
uses_xi = eq.varname
Expand Down
5 changes: 5 additions & 0 deletions docs_sphinx/user/models.rst
Expand Up @@ -74,6 +74,11 @@ You don't necessarily need to understand why this is, but it is
possible to get a reasonably simple intuition for it by thinking
about numerical integration: :ref:`see below <time_scaling_of_noise>`.

.. note::
If you want to use noise in more than one equation of a
`NeuronGroup` or `Synapses`, you will have to use suffixed names (see
:ref:`equation_strings` for details).

Threshold and reset
-------------------
To emit spikes, neurons need a *threshold*. Threshold and reset are given
Expand Down

0 comments on commit 8b0c7e0

Please sign in to comment.