Spatial distribution functions

Functions to help create distributions based on the position of the nodes.

Syntax:

nest.spatial_distributions.gamma(x, kappa, theta)
nest.spatial_distributions.hl_api_spatial_distributions.exponential(x, beta=1.0)

Applies an exponential distribution on a Parameter.

Parameters:
  • x (Parameter) – Input Parameter.

  • beta (float, optional) – Scale parameter. Default is 1.0.

Returns:

Object yielding values drawn from the distribution.

Return type:

Parameter

nest.spatial_distributions.hl_api_spatial_distributions.gabor(x, y, theta=0.0, gamma=1.0, std=1.0, lam=1.0, psi=0.0)

Applies a rectified Gabor function on two Parameters, representing displacements in the x and y direction.

\[\begin{split}p(x) = \big[\cos(360^{\circ} \frac{y^{\prime}}{\lambda} + \psi)\big]^{+} e^{-\frac{\gamma^{2}x^{\prime 2}+y^{\prime 2}}{2\text{std}^{2}}} \\ x^{\prime} = x\cos\theta + y\sin\theta \\ y^{\prime} = -x\sin\theta + y\cos\theta\end{split}\]
Parameters:
  • x (Parameter) – Input Parameter for the x-direction.

  • y (Parameter) – Input Parameter for the y-direction.

  • theta (float, optional) – Orientation of profile in degree. Default is 0.0.

  • gamma (float, optional) – Spatial aspect ratio. Controls ratio of major and minor axis. Default is 1.0.

  • std (float, optional) – Standard deviation of the distribution. Default is 1.0.

  • lam (float, optional) – Wavelength of spatial oscillations. Default is 1.0.

  • psi (float, optional) – Phase of spatial oscillations in degree. Default is 0.0

Returns:

Object yielding values drawn from the distribution.

Return type:

Parameter

nest.spatial_distributions.hl_api_spatial_distributions.gamma(x, kappa=1.0, theta=1.0)

Applies a gamma distribution on a Parameter.

This function requires SciPy, and will raise an error if SciPy cannot be imported.

Parameters:
  • x (Parameter) – Input Parameter.

  • kappa (float, optional) – Shape parameter. Default is 1.0.

  • theta (float, optional) – Scale parameter. Default is 1.0.

Returns:

Object yielding values drawn from the distribution.

Return type:

Parameter

nest.spatial_distributions.hl_api_spatial_distributions.gaussian(x, mean=0.0, std=1.0)

Applies a gaussian distribution on a Parameter.

Parameters:
  • x (Parameter) – Input Parameter.

  • mean (float, optional) – Mean of the distribution. Default is 0.0.

  • std (float, optional) – Standard deviation of the distribution. Default is 1.0.

Returns:

Object yielding values drawn from the distribution.

Return type:

Parameter

nest.spatial_distributions.hl_api_spatial_distributions.gaussian2D(x, y, mean_x=0.0, mean_y=0.0, std_x=1.0, std_y=1.0, rho=0.0)

Applies a bivariate gaussian distribution on two Parameters, representing values in the x and y direction.

Parameters:
  • x (Parameter) – Input Parameter for the x-direction.

  • y (Parameter) – Input Parameter for the y-direction.

  • mean_x (float, optional) – Mean of the distribution in the x-direction. Default is 0.0.

  • mean_y (float, optional) – Mean of the distribution in the y-direction. Default is 0.0.

  • std_x (float, optional) – Standard deviation of the distribution in the x-direction. Default is 1.0.

  • std_y (float, optional) – Standard deviation of the distribution in the y-direction. Default is 1.0.

  • rho (float, optional) – Correlation of x and y. Default is 0.0

Returns:

Object yielding values drawn from the distribution.

Return type:

Parameter