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))withx' = x\cos\theta + y\sin\theta,y' = -x\sin\theta + y\cos\theta(\theta,\psiin degrees). Thex/yinputs default todistance.x/distance.y(the absolute per-axis displacements), matching NEST.- Parameters:
x (
object, optional) – Per-axis expressions for the x / y displacement. Defaultdistance.x/distance.y.y (
object, optional) – Per-axis expressions for the x / y displacement. Defaultdistance.x/distance.y.theta (
float, optional) – Orientation of the profile in degrees. Default0.gamma (
float, optional) – Spatial aspect ratio (major/minor axis). Default1.std (
floatorQuantity, optional) – Envelope standard deviation (length). Default1.lam (
floatorQuantity, optional) – Wavelength of the carrier (length). Default1.psi (
float, optional) – Carrier phase in degrees. Default0.
- 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)