tools.py¶
In this module, we can find assorted functions that help us with creating neuronal models.
This module consists of some helper functions for creating neuronal networks.
-
neurons.tools.poisson_homogenous(lam, timesteps)¶ Generate a poisson spike train for a single neuron using a homogenous poisson distribution.
Example: The spike train of the image above was generated by following function:
>>> poisson_homogenous(0.4, 200)
Parameters: - lam (Float) – lambda value
- timesteps (Int) – total length of spike train
-
neurons.tools.poisson_inhomogenous(lambdas, timesteps)¶ Generate a poisson spike train for a single neuron using an inhomogenous poisson distribution.
Example: The spike train of the image above was generated by following function:
>>> poisson_inhomogenous((0.5, 0.25, 0, 0, 1, 0.5, 0, 0, 0.25, 0.5), 200)
Parameters: - lambdas (List or Tuple) – Lambda values
- timesteps (Int) – total length of the spike train
-
neurons.tools.sound(timesteps, midpoint, maximum, variance)¶ Generates a spike train with a peak at midpoint.
Example: The spike train of the image above was generated by following function:
>>> sound(280, 150, 0.4, 50)
Parameters: - timesteps –
- midpoint – central peak
- maximum – Lambda value at peak
- variance – Variance around peak
Returns: