braintools.cogtask.firing_rate#
- braintools.cogtask.firing_rate(base, dt)#
Convert a firing rate to a spike probability per time step.
Deprecated: `braintools.cogtask.utils.firing_rate` is deprecated since 0.4.0 and will be removed in 1.0.0. Use `braintools.cogtask.utils.rate_to_prob` instead.
Computes
base * dt / 1000: the probability that a Poisson neuron firing atbaseHz emits a spike within one step ofdtms. This function was calledfiring_ratebefore braintools 0.4.0; that name remains as a deprecated alias.- Parameters:
- Returns:
Spike probability per time step,
base * dt / 1e3.- Return type:
- Raises:
ValueError – If
base * dt > 1e3, i.e. the probability would exceed 1.
Examples
>>> from braintools.cogtask import rate_to_prob >>> rate_to_prob(100.0, 1.0) 0.1