gabor

Contents

gabor#

class brainpy.state.spatial.gabor(x=None, y=None, theta=0.0, gamma=1.0, std=1.0, lam=1.0, psi=0.0)[source]#

Rectified-Gabor connection probability on the (x, y) displacements (NEST gabor).

p = [cos(2\pi y'/\lambda + \psi)]^+ \exp(-(\gamma^2 x'^2 + y'^2)/(2\,\mathrm{std}^2)) with x' = x\cos\theta + y\sin\theta, y' = -x\sin\theta + y\cos\theta (\theta, \psi in degrees). The x / y inputs default to distance.x / distance.y (the absolute per-axis displacements), matching NEST.

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.

  • theta (float, optional) – Orientation of the profile in degrees. Default 0.

  • gamma (float, optional) – Spatial aspect ratio (major/minor axis). Default 1.

  • std (float or Quantity, optional) – Envelope standard deviation (length). Default 1.

  • lam (float or Quantity, optional) – Wavelength of the carrier (length). Default 1.

  • psi (float, optional) – Carrier phase in degrees. 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.gabor(bp.spatial.distance.x, bp.spatial.distance.y, theta=45.0, lam=2.0)