pulse2percept.topography.retina
RetinalMap,
Curcio1990Map,
Watson2014Map,
Watson2014DisplaceMap
Classes
|
Converts between visual angle and retinal eccentricity [Curcio1990] |
|
Template class for retinal visual field maps, which only have 1 region. |
|
Converts between visual angle and retinal eccentricity using RGC displacement [Watson2014] |
|
Converts between visual angle and retinal eccentricity [Watson2014] |
- class pulse2percept.topography.retina.RetinalMap(**params)[source]
Template class for retinal visual field maps, which only have 1 region.
- from_dva()[source]
Returns a dict containing the region(s) that this visuotopy maps to, and the corresponding mapping function(s).
- to_dva()[source]
Returns a dict containing the region(s) that this visuotopy maps from, and the corresponding inverse mapping function(s). This transform is optional for most models.
- get_param_units()[source]
Return a dict of the units that parameters are stored in
Maps a parameter name to the
Unitthat the implementation assumes it is expressed in. AQuantityassigned to such a parameter is checked against that unit and rescaled to it, so thatFadingTemporal(tau=100) FadingTemporal(tau=100 * ms) FadingTemporal(tau=0.1 * s)
all store the same float. Bare numbers keep their documented meaning and are passed through untouched.
Parameters absent from this dict take plain numbers: they are either dimensionless (
thresh_percept) or empirical fit parameters whose dimension the implementation does not actually commit to. Declaring a unit is a statement about what the equations assume, so a parameter should only appear here when that is documented or unambiguous.This dict is not restricted to the names in
get_default_params: it describes every physical attribute this object normalizes. A constructor argument assigned straight toself–DefaultSizeModeltakesrhothat way – belongs here too, and is converted like any other.Subclasses extend rather than replace it:
def get_param_units(self): return {**super().get_param_units(), 'dt': ms, 'tau': ms}
Added in version 0.10.0.
- class pulse2percept.topography.retina.Curcio1990Map(**params)[source]
Converts between visual angle and retinal eccentricity [Curcio1990]
- dva_to_ret(xdva, ydva)[source]
Convert degrees of visual angle (dva) to retinal eccentricity (um)
Assumes that one degree of visual angle is equal to 280 um on the retina [Curcio1990].
- ret_to_dva(xret, yret)[source]
Convert retinal eccentricity (um) to degrees of visual angle (dva)
Assumes that one degree of visual angle is equal to 280 um on the retina [Curcio1990]
- from_dva()[source]
Returns a dict containing the region(s) that this visuotopy maps to, and the corresponding mapping function(s).
- get_param_units()[source]
Return a dict of the units that parameters are stored in
Maps a parameter name to the
Unitthat the implementation assumes it is expressed in. AQuantityassigned to such a parameter is checked against that unit and rescaled to it, so thatFadingTemporal(tau=100) FadingTemporal(tau=100 * ms) FadingTemporal(tau=0.1 * s)
all store the same float. Bare numbers keep their documented meaning and are passed through untouched.
Parameters absent from this dict take plain numbers: they are either dimensionless (
thresh_percept) or empirical fit parameters whose dimension the implementation does not actually commit to. Declaring a unit is a statement about what the equations assume, so a parameter should only appear here when that is documented or unambiguous.This dict is not restricted to the names in
get_default_params: it describes every physical attribute this object normalizes. A constructor argument assigned straight toself–DefaultSizeModeltakesrhothat way – belongs here too, and is converted like any other.Subclasses extend rather than replace it:
def get_param_units(self): return {**super().get_param_units(), 'dt': ms, 'tau': ms}
Added in version 0.10.0.
- class pulse2percept.topography.retina.Watson2014Map(**params)[source]
Converts between visual angle and retinal eccentricity [Watson2014]
- ret_to_dva(x_um, y_um, coords='cart')[source]
Converts retinal distances (um) to visual angles (deg)
This function converts an eccentricity measurement on the retinal surface(in micrometers), measured from the optic axis, into degrees of visual angle using Eq. A6 in [Watson2014].
- Parameters:
x_um (double or array-like) – Original x and y coordinates on the retina (microns)
y_um (double or array-like) – Original x and y coordinates on the retina (microns)
coords ({'cart', 'polar'}) – Whether to return the result in Cartesian or polar coordinates
- Returns:
x_dva, y_dva – Transformed x and y coordinates (degrees of visual angle, dva)
- Return type:
double or array-like
- dva_to_ret(x_deg, y_deg, coords='cart')[source]
Converts visual angles (deg) into retinal distances (um)
This function converts degrees of visual angle into a retinal distance from the optic axis (um) using Eq. A5 in [Watson2014].
- Parameters:
x_dva (double or array-like) – Original x and y coordinates (degrees of visual angle, dva)
y_dva (double or array-like) – Original x and y coordinates (degrees of visual angle, dva)
coords ({'cart', 'polar'}) – Whether to return the result in Cartesian or polar coordinates
- Returns:
x_ret, y_ret – Transformed x and y coordinates on the retina (microns)
- Return type:
double or array-like
- from_dva()[source]
Returns a dict containing the region(s) that this visuotopy maps to, and the corresponding mapping function(s).
- get_param_units()[source]
Return a dict of the units that parameters are stored in
Maps a parameter name to the
Unitthat the implementation assumes it is expressed in. AQuantityassigned to such a parameter is checked against that unit and rescaled to it, so thatFadingTemporal(tau=100) FadingTemporal(tau=100 * ms) FadingTemporal(tau=0.1 * s)
all store the same float. Bare numbers keep their documented meaning and are passed through untouched.
Parameters absent from this dict take plain numbers: they are either dimensionless (
thresh_percept) or empirical fit parameters whose dimension the implementation does not actually commit to. Declaring a unit is a statement about what the equations assume, so a parameter should only appear here when that is documented or unambiguous.This dict is not restricted to the names in
get_default_params: it describes every physical attribute this object normalizes. A constructor argument assigned straight toself–DefaultSizeModeltakesrhothat way – belongs here too, and is converted like any other.Subclasses extend rather than replace it:
def get_param_units(self): return {**super().get_param_units(), 'dt': ms, 'tau': ms}
Added in version 0.10.0.
- class pulse2percept.topography.retina.Watson2014DisplaceMap(**params)[source]
Converts between visual angle and retinal eccentricity using RGC displacement [Watson2014]
Converts from eccentricity (defined as distance from a visual center) in degrees of visual angle (dva) to microns on the retina using Eqs. 5, A5, and A6 in [Watson2014].
In a central retinal zone, the retinal ganglion cell (RGC) bodies are displaced centrifugally some distance from the inner segments of the cones to which they are connected through the bipolar cells, and thus from their receptive field. The displacement function is described in Eq. 5 of [Watson2014].
- watson_displacement(r, meridian='temporal')[source]
Ganglion cell displacement function
Implements the ganglion cell displacement function described in Eq. 5 of [Watson2014].
- Parameters:
r (double|array-like) – Eccentricity in degrees of visual angle (dva)
meridian ('temporal' or 'nasal')
- Returns:
The displacement in dva experienced by ganglion cells at eccentricity
r.
- dva_to_ret(xdva, ydva)[source]
Converts dva to retinal coords
- Parameters:
xdva (double or array-like) – x,y coordinates in dva
ydva (double or array-like) – x,y coordinates in dva
- Returns:
xret, yret – Corresponding x,y coordinates in microns
- Return type:
double or array-like
- ret_to_dva(xret, yret)[source]
Converts retinal distances (um) to visual angles (deg)
This function converts an eccentricity measurement on the retinal surface(in micrometers), measured from the optic axis, into degrees of visual angle using Eq. A6 in [Watson2014].
- Parameters:
x_um (double or array-like) – Original x and y coordinates on the retina (microns)
y_um (double or array-like) – Original x and y coordinates on the retina (microns)
coords ({'cart', 'polar'}) – Whether to return the result in Cartesian or polar coordinates
- Returns:
x_dva, y_dva – Transformed x and y coordinates (degrees of visual angle, dva)
- Return type:
double or array-like
- from_dva()[source]
Returns a dict containing the region(s) that this visuotopy maps to, and the corresponding mapping function(s).
- get_param_units()[source]
Return a dict of the units that parameters are stored in
Maps a parameter name to the
Unitthat the implementation assumes it is expressed in. AQuantityassigned to such a parameter is checked against that unit and rescaled to it, so thatFadingTemporal(tau=100) FadingTemporal(tau=100 * ms) FadingTemporal(tau=0.1 * s)
all store the same float. Bare numbers keep their documented meaning and are passed through untouched.
Parameters absent from this dict take plain numbers: they are either dimensionless (
thresh_percept) or empirical fit parameters whose dimension the implementation does not actually commit to. Declaring a unit is a statement about what the equations assume, so a parameter should only appear here when that is documented or unambiguous.This dict is not restricted to the names in
get_default_params: it describes every physical attribute this object normalizes. A constructor argument assigned straight toself–DefaultSizeModeltakesrhothat way – belongs here too, and is converted like any other.Subclasses extend rather than replace it:
def get_param_units(self): return {**super().get_param_units(), 'dt': ms, 'tau': ms}
Added in version 0.10.0.