Receptive fields¶
Prfpy contains a set of simple functions that define receptive field structures. These are used by Gridder objects to calculate the receptive fields.
- prfpy.rf.gauss1D_cart(x, mu=0.0, sigma=1.0)[source]¶
gauss1D_cart takes a 1D array x, a mean and standard deviation, and produces a gaussian with given parameters, with a peak of height 1.
- xnumpy.ndarray (1D)
space on which to calculate the gauss
- mufloat, optional
mean/mode of gaussian (the default is 0.0)
- sigmafloat, optional
standard deviation of gaussian (the default is 1.0)
- numpy.ndarray
gaussian values at x
- prfpy.rf.gauss1D_log(x, mu=0.0, sigma=1.0)[source]¶
gauss1D_log takes a 1D array x, a mean and standard deviation, and produces a pRF with given parameters with the distance between mean and x log-scaled
- xnumpy.ndarray (1D)
space on which to calculate the gauss
- mufloat, optional
mean/mode of gaussian (the default is 0.0)
- sigmafloat, optional
standard deviation of gaussian (the default is 1.0)
- numpy.ndarray
gaussian values at log(x)
- prfpy.rf.gauss2D_iso_cart(x, y, mu=(0.0, 0.0), sigma=1.0, normalize_RFs=False)[source]¶
gauss2D_iso_cart takes two-dimensional arrays x and y, containing the x and y coordinates at which to evaluate the 2D isotropic gaussian function, with a given sigma, and returns a 2D array of Z values.
- xnumpy.ndarray, 2D or flattened by masking
2D, containing x coordinates
- ynumpy.ndarray, 2D or flattened by masking
2D, containing y coordinates
- mutuple, optional
mean, 2D coordinates of mean/mode of gauss (the default is (0.0,0.0))
- sigmafloat, optional
standard deviation of gauss (the default is 1.0)
- numpy.ndarray, 2D or flattened by masking
gaussian values evaluated at (x,y)
- prfpy.rf.gauss2D_logpolar(ecc, polar, mu=(1.0, 0.0), sigma=1.0, kappa=1.0)[source]¶
gauss2D_logpolar takes two-dimensional arrays ecc and polar, containing the eccentricity and polar angle coordinates at which to evaluate the 2D gaussian, which in this case is a von Mises in the polar angle direction, and a log gauss in the eccentricity dimension, and returns a 2D array of Z values. We recommend entering the ecc and polar angles ordered as x and y for easy visualization.
- eccnumpy.ndarray, 2D or flattened by masking
2D, containing eccentricity
- polarnumpy.ndarray, 2D or flattened by masking
2D, containing polar angle coordinates (0, 2*np.pi)
- mutuple, optional
mean, 2D coordinates of mean/mode of gauss (ecc) and von Mises (polar) (the default is (0.0,0.0))
- sigmafloat, optional
standard deviation of gauss (the default is 1.0)
- kappafloat, optional
dispersion coefficient of the von Mises, akin to inverse of standard deviation of gaussian (the default is 1.0)
- numpy.ndarray, 2D or flattened by masking
values evaluated at (ecc, polar), peak has y-value of 1.
- prfpy.rf.gauss2D_rot_cart(x, y, mu=(0.0, 0.0), sigma=1.0, theta=0.0, ar=1.0)[source]¶
gauss2D_rot_cart takes two-dimensional arrays x and y, containing the x and y coordinates at which to evaluate the 2D non-isotropic gaussian function, with a given sigma, angle of rotation theta, and aspect ratio ar. it returns a 2D array of Z values. Default is an isotropic gauss.
- xnumpy.ndarray, 2D
2D, containing x coordinates or flattened by masking
- ynumpy.ndarray, 2D
2D, containing y coordinates or flattened by masking
- mutuple, optional
mean, 2D coordinates of mean/mode of gauss (the default is (0.0,0.0))
- sigmafloat, optional
standard deviation of gauss (the default is 1.0)
- thetafloat, optional
angle of rotation of gauss (the default is 0.0)
- arfloat, optional
aspect ratio of gauss, multiplies the rotated y parameters (the default is 1.0)
- numpy.ndarray, 2D or flattened by masking
gaussian values evaluated at (x,y)
- prfpy.rf.vonMises1D(x, mu=0.0, kappa=1.0)[source]¶
vonMises1D takes a 1D array x, a mean and kappa (inverse of standard deviation), and produces a von Mises pRF with given parameters. This shape can be thought of as a circular gaussian shape. Used for orientation or motion direction pRFs, for instance.
- xnumpy.ndarray (1D)
space on which to calculate the von Mises. Assumed to be in the range (0, 2*np.pi)
- mufloat, optional
mean/mode of von Mises (the default is 0.0)
- kappafloat, optional
dispersion coefficient of the von Mises, akin to invers of standard deviation of gaussian (the default is 1.0)
- numpy.ndarray
von Mises values at x, peak has y-value of 1