gaussian2D

Contents

gaussian2D#

class brainpy.state.spatial.gaussian2D(x=None, y=None, mean_x=0.0, mean_y=0.0, std_x=1.0, std_y=1.0, rho=0.0)[source]#

Bivariate-Gaussian connection probability on the (x, y) displacements (NEST gaussian2D).

p = exp(-(u^2 - 2\rho u v + v^2)/(2(1-\rho^2))) with u=(x-mean_x)/std_x, v=(y-mean_y)/std_y. The x / y inputs default to distance.x / distance.y.

Parameters:
  • x (object, optional) – Per-axis expressions for the x / y displacement. Default distance.x / distance.y.

  • y (object, optional) – Per-axis expressions for the x / y displacement. Default distance.x / distance.y.

  • mean_x (float or Quantity, optional) – Means (length). Default 0.

  • mean_y (float or Quantity, optional) – Means (length). Default 0.

  • std_x (float or Quantity, optional) – Standard deviations (length). Default 1.

  • std_y (float or Quantity, optional) – Standard deviations (length). Default 1.

  • rho (float, optional) – Correlation in (-1, 1). Default 0.

Returns:

A kernel with _eval_pair(pre, post) returning the (n_pre, n_post) probability grid.

Return type:

callable

Examples

>>> from brainpy import state as bp
>>> k = bp.spatial.gaussian2D(std_x=0.5, std_y=1.0, rho=0.3)