pulse2percept.topography.retina

RetinalMap, Curcio1990Map, Watson2014Map, Watson2014DisplaceMap

Classes

Curcio1990Map(**params) Converts between visual angle and retinal eccentricity [Curcio1990]
RetinalMap(**params) Template class for retinal visual field maps, which only have 1 region.
Watson2014DisplaceMap(**params) Converts between visual angle and retinal eccentricity using RGC displacement [Watson2014]
Watson2014Map(**params) Converts between visual angle and retinal eccentricity [Watson2014]
class pulse2percept.topography.retina.Curcio1990Map(**params)[source]

Converts between visual angle and retinal eccentricity [Curcio1990]

build(**build_params)[source]

Build the model

Every model must have a `build method, which is meant to perform all expensive one-time calculations. You must call build before calling predict_percept.

Important

Don’t override this method if you are building your own model. Customize _build instead.

Parameters:build_params (additional parameters to set) – You can overwrite parameters that are listed in get_default_params. Trying to add new class attributes outside of that will cause a FreezeError. Example: model.build(param1=val)
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].

from_dva()[source]

Returns a dict containing the region(s) that this visuotopy maps to, and the corresponding mapping function(s).

get_default_params()[source]

Required to inherit from BaseModel

is_built

A flag indicating whether the model has been built

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]

set_params(**params)[source]

Set the parameters of this model

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.

class pulse2percept.topography.retina.RetinalMap(**params)[source]

Template class for retinal visual field maps, which only have 1 region.

build(**build_params)[source]

Build the model

Every model must have a `build method, which is meant to perform all expensive one-time calculations. You must call build before calling predict_percept.

Important

Don’t override this method if you are building your own model. Customize _build instead.

Parameters:build_params (additional parameters to set) – You can overwrite parameters that are listed in get_default_params. Trying to add new class attributes outside of that will cause a FreezeError. Example: model.build(param1=val)
dva_to_ret(x, y)[source]

Convert degrees of visual angle (dva) to retinal coords (um)

from_dva()[source]

Returns a dict containing the region(s) that this visuotopy maps to, and the corresponding mapping function(s).

get_default_params()[source]

Required to inherit from BaseModel

is_built

A flag indicating whether the model has been built

ret_to_dva(x, y)[source]

Convert retinal coords (um) to degrees of visual angle (dva)

set_params(**params)[source]

Set the parameters of this model

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.

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].

build(**build_params)[source]

Build the model

Every model must have a `build method, which is meant to perform all expensive one-time calculations. You must call build before calling predict_percept.

Important

Don’t override this method if you are building your own model. Customize _build instead.

Parameters:build_params (additional parameters to set) – You can overwrite parameters that are listed in get_default_params. Trying to add new class attributes outside of that will cause a FreezeError. Example: model.build(param1=val)
dva_to_ret(xdva, ydva)[source]

Converts dva to retinal coords

Parameters:ydva (xdva,) – x,y coordinates in dva
Returns:xret, yret (double or array-like) – Corresponding x,y coordinates in microns
from_dva()[source]

Returns a dict containing the region(s) that this visuotopy maps to, and the corresponding mapping function(s).

get_default_params()[source]

Required to inherit from BaseModel

is_built

A flag indicating whether the model has been built

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:
  • y_um (x_um,) – 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 (double or array-like) – Transformed x and y coordinates (degrees of visual angle, dva)

set_params(**params)[source]

Set the parameters of this model

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.

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.

class pulse2percept.topography.retina.Watson2014Map(**params)[source]

Converts between visual angle and retinal eccentricity [Watson2014]

build(**build_params)[source]

Build the model

Every model must have a `build method, which is meant to perform all expensive one-time calculations. You must call build before calling predict_percept.

Important

Don’t override this method if you are building your own model. Customize _build instead.

Parameters:build_params (additional parameters to set) – You can overwrite parameters that are listed in get_default_params. Trying to add new class attributes outside of that will cause a FreezeError. Example: model.build(param1=val)
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:
  • y_dva (x_dva,) – 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 (double or array-like) – Transformed x and y coordinates on the retina (microns)

from_dva()[source]

Returns a dict containing the region(s) that this visuotopy maps to, and the corresponding mapping function(s).

get_default_params()[source]

Required to inherit from BaseModel

is_built

A flag indicating whether the model has been built

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:
  • y_um (x_um,) – 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 (double or array-like) – Transformed x and y coordinates (degrees of visual angle, dva)

set_params(**params)[source]

Set the parameters of this model

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.