Visual Prostheses
An implant in pulse2percept describes where stimulation is delivered: the electrodes, their geometry, their location, and the stimulus assigned to them. It fits into the modeling pipeline like so:
electrical Stimulus -> implant -> model -> Percept
The implant says where the stimulation goes. The percept model says how that stimulation is transformed into a visual percept.
Choosing an implant and model
The best model depends first on where the implant stimulates. A useful starting point is:
Implant location |
Good starting model |
Why |
|---|---|---|
Epiretinal |
Epiretinal stimulation can activate retinal ganglion-cell axons, producing elongated percepts that follow nerve fiber bundles. |
|
Subretinal |
A local “one electrode, one blob” model is a useful first approximation when axonal activation is not the main effect of interest. |
|
Suprachoroidal |
pulse2percept does not currently provide a dedicated suprachoroidal phosphene model, so the scoreboard model is a simple geometry-first baseline. |
|
Cortical |
Cortical stimulation is mapped through cortical retinotopy rather than the retinal nerve fiber layer. |
These are starting points, not compatibility rules. For example,
ScoreboardModel is also a useful baseline for
an epiretinal implant when axonal streaking is not part of the question. More
detailed retinal models should be chosen because their physiological
assumptions match the experiment, not simply because they are more complex.
A minimal example
For an epiretinal implant such as Argus II, a typical simulation looks like:
import pulse2percept as p2p
implant = p2p.implants.ArgusII()
encoder = p2p.stimuli.AmplitudeEncoder(
implant, amp_range=(0, 50), freq=20
)
implant.stim = encoder.encode(p2p.stimuli.BostonTrain())
model = p2p.models.AxonMapModel().build()
percept = model.predict_percept(implant)
percept.play()
Changing the implant changes the electrode geometry. Changing the model changes the assumptions about how stimulation becomes vision.
Available implants
pulse2percept includes software representations of several published visual prostheses. The table below emphasizes array geometry and which model to start with, rather than device manufacturer.
These classes are research software representations based on published descriptions, not manufacturer-validated device simulators. Some geometries necessarily rely on assumptions where complete device specifications are not public; the API documentation for each class records those details.
What an implant contains
Every visual prosthesis derives from
ProsthesisSystem. The pieces you will use
most often are:
earrayThe
ElectrodeArraycontaining the electrodes and their locations.stimThe electrical
Stimuluscurrently assigned to the implant.eyeThe implanted eye for retinal systems.
rasterAn optional
Rasterdescribing which electrodes may stimulate at the same time.
Electrodes can be accessed by name or index:
implant = p2p.implants.ArgusII()
implant['A1']
implant[0]
implant.electrode_names
implant.earray.coordinates()
The easiest way to understand an implant geometry is often simply to plot it:
implant.plot(annotate=True)
Coordinate systems
Retinal implants use a coordinate system centered on the fovea. Distances are stored in microns:
positive
xpoints toward the nasal retina;positive
ypoints toward the superior retina;positive
zmoves away from the retina and into the vitreous.
The eye parameter handles the corresponding left- versus right-eye
geometry where needed.
Cortical implants live in physical cortical coordinates instead. A cortical
model combines those electrode locations with a
VisualFieldMap to determine where
stimulation falls in the visual field. That is why cortical implants use the
models in pulse2percept.models.cortex, rather than retinal models
such as the Axon Map Model.
Building your own implant
For a custom array, you usually do not need a new implant class. An
ElectrodeGrid can be wrapped directly in a
ProsthesisSystem:
from pulse2percept.implants import ElectrodeGrid, ProsthesisSystem
earray = ElectrodeGrid(
shape=(10, 10),
spacing=500,
r=100,
)
implant = ProsthesisSystem(earray=earray)
For irregular arrays, build an
ElectrodeArray from individual electrode
objects. EnsembleImplant can combine
multiple implants into one system.
The implant geometry and percept model remain separate, so a custom implant can be paired with whichever model best matches the stimulation target and the scientific question.
Rastering
Some stimulators cannot drive every electrode simultaneously. Raster strategies split an array into groups that take turns:
implant.raster = p2p.implants.CheckerboardRaster(
implant, n_groups=5
)
The encoder uses that schedule when constructing the electrical stimulus. See Raster Strategies for the details.
See also
pulse2percept.implantsfor the implant APIpulse2percept.implants.cortexfor cortical implant classes