noise_generator – Generate a Gaussian white noise current ========================================================= Description +++++++++++ The `noise_generator` can be used to inject a Gaussian "white" noise current into a node. The current is not truly white, but a piecewise constant current with a Gaussian distributed amplitude with mean :math:`\mu` and standard deviation :math:`\sigma`. The current changes at a user-defined interval :math:`\delta` and is given by .. math:: I(t) = \mu + N_j \sigma \quad \text{for} \quad t_0 + j \delta < t \leq t_0 + (j+1) \delta \;, where :math:`N_j` are Gaussian random numbers with unit standard deviation and :math:`t_0` is the device onset time. Additionally a sinusodially modulated term can be added to the standard deviation of the noise: .. math:: I(t) = \mu + N_j \sqrt{\sigma^2 + \sigma_{\text{mod}}^2 \sin(\omega t + \phi)} \quad \text{for} \quad t_0 + j \delta < t \leq t_0 + (j+1) \delta \;. The effect of the noise current on a neuron depends on the switching interval :math:`\delta`. For a leaky integrate-and-fire neuron with time constant :math:`\tau_m` and capacitance :math:`C_m`, the variance of the membrane potential is given by .. math:: \Sigma^2 = \frac{\delta \tau_m \sigma^2}{2 C_m^2} for :math:`\delta \ll \tau_m`. For details, see the `noise generator notebook <../model_details/noise_generator.ipynb>`_. All targets of a noise generator receive different currents, but the currents for all targets change at the same points in time. The interval :math:`\delta` between changes must be a multiple of the time step. .. admonition:: Recording the generated current You can use a :doc:`multimeter ` to record the average current sent to all targets for each time step if simulating on a single thread; multiple MPI processes with one thread each also work. In this case, the recording interval of the multimeter should be the equal to the simulation resolution to avoid confusing effects due to offset or drift between the recording times of the multimeter and the switching times of the noise generator. In multi-threaded mode, recording of noise currents is prohibited for technical reasons. .. include:: ../models/stimulation_device.rst mean The mean value :math:`\mu` of the noise current (pA) std The standard deviation :math:`\sigma` of the noise current (pA) dt The interval :math:`\delta` between changes in current (ms; default: 10 * resolution) std_mod The modulation :math:`\sigma_{\text{mod}}` of the standard deviation of the noise current (pA) frequency The frequency of the sine modulation (Hz) phase The phase of sine modulation (0–360 deg) Setting parameters from a stimulation backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The parameters in this stimulation device can be updated with input coming from a stimulation backend. The data structure used for the update holds one value for each of the parameters mentioned above. The indexing is as follows: 0. mean 1. std 2. std_mod 3. frequency 4. phase Sends +++++ CurrentEvent See also ++++++++ :doc:`Device `, :doc:`Generator `