Implants

An implant describes a device: its electrodes, their device-local geometry, and the rules that convert a source (pulses, an image, a video) into the stimulation those electrodes deliver. It stores no stimulus; see Stimulation. Where the device sits in tissue is a model parameter; see Coordinates and Visual Field Maps.

Devices live under the tissue they stimulate, p2p.implants.retina and p2p.implants.cortex. Electrodes, arrays, rasters, and EnsembleImplant live at the root of pulse2percept.implants.

import pulse2percept as p2p

implant = p2p.implants.retina.ArgusII()

implant['A8']                  # electrode by name
implant[0]                     # electrode by index
implant.electrode_names
implant.electrode_array.coordinates()   # (x, y, z) in um
implant.plot()

All implants derive from Implant. Its main attributes:

electrode_array

The ElectrodeArray.

placement

'epiretinal', 'subretinal', 'suprachoroidal', 'epicortical', 'intracortical', or None for a generic array.

encoder, raster, preprocess

How image and video input becomes stimulation; see Stimulation.

thresholds

Perceptual threshold current (uA), used to convert xTh amplitudes to current. A scalar applies to every electrode; a dict to the named ones.

safe_mode, max_current

Checks applied when stimulation is prepared: charge balance, and the total instantaneous current (uA) summed over electrodes.

scene_input_frame

'eye' if the input passes through the eye’s optics, 'head' for a head-mounted camera. Sets whether gaze moves the input; see Visual Input and Simulated Vision.

Retinal implants

Retinal implants derive from RetinalImplant. eye ('left' or 'right', default 'right') records the implanted eye; axon map models use it to place the optic disc. Some devices also reverse their column names in the left eye (see each class’s API documentation).

Object

Placement

Electrodes

Device

Typical model

ArgusI

epiretinal

16

Argus I, 4 x 4 array

AxonMapModel, Nanduri2012Model

ArgusII

epiretinal

60

Argus II, 6 x 10 array

AxonMapModel, BiphasicAxonMapModel

IMIE

epiretinal

256

IMIE array

AxonMapModel

AlphaIMS

subretinal

1500

Alpha IMS microphotodiode array

ScoreboardModel

AlphaAMS

subretinal

1600

Alpha AMS microphotodiode array

ScoreboardModel

Suprachoroidal24

suprachoroidal

35

First-generation suprachoroidal array

ScoreboardModel

Suprachoroidal44

suprachoroidal

46

Second-generation suprachoroidal array

ScoreboardModel

PRIMAPivotal

subretinal

378

PRIMA photovoltaic array [Holz2026]

Ho2018Model, ScoreboardModel

These classes are built from published device descriptions; they are not manufacturer-validated simulators.

The arrays differ widely in physical scale (device-local microns):

../_images/implants-1.png

Argus II

ArgusII() includes the device’s video defaults: an AmplitudeEncoder at 6 Hz and a SequentialRaster that pulses one of six rows every 2 ms. Images and videos can therefore be passed to it directly. encoder=None disables encoding; raster=None lets all electrodes pulse at once:

implant = p2p.implants.retina.ArgusII(encoder=None, raster=None)

Photovoltaic arrays

PRIMAPivotal models the 378-pixel, 100 um subretinal array of the pivotal PRIMAvera trial [Holz2026], which matches the first-in-human device [Palanker2020]. Three research arrays model [Lorach2015], [Ho2019], and [Huang2021]. All are shown at the same scale:

../_images/implants-2.png

Object

Pixels

Pixel geometry

Substrate

Default optical protocol

PRIMAPivotal()

378

100 um wide, 100 um spacing, 28 um active

2 x 2 mm

PRIMAEncoder: 880 nm, 3.5 mW/mm^2, 30 Hz, 0.7-9.8 ms ON

Lorach2015Array()

142

70 um wide, 75 um spacing, 20 um active

1 mm

PhotovoltaicEncoder: 915 nm, 4 mW/mm^2, 4 ms at 40 Hz

Ho2019FlatArray(55)

250

55 um wide/spacing, 14 um active

1 mm

PhotovoltaicEncoder: 915 nm, 8 mW/mm^2, 4 ms at 40 Hz

Ho2019FlatArray(40)

502

40 um wide/spacing, 10 um active

1 mm

same as above

Huang2021Array(55)

421

55 um wide/spacing, 22 um active

1.5 mm

PhotovoltaicEncoder: 880 nm, 4.7 mW/mm^2, 10 ms at 2 Hz

Huang2021Array(40)

821

40 um wide/spacing, 16 um active

1.5 mm

same as above

Huang2021Array(30)

1388

30 um wide/spacing, 12 um active

1.5 mm

same as above

Huang2021Array(20)

2806

20 um wide/spacing, 8 um active

1.5 mm

same as above

Hexagonal rows are spacing * sqrt(3) / 2 apart. Notes on the geometry:

  • Ho2019FlatArray(55) is reconstructed from Fig. 2(a) of [Ho2019]. The F40 outline was not published, so Ho2019FlatArray(40) uses the 502 lattice sites nearest the substrate center.

  • Huang2021Array counts only exposed, stimulating pixels. The fabricated arrays had 526 (F55), 1027 (F40), 1735 (F30), and 3508 (F20) cells; the peripheral ones formed the common return and are not modeled.

  • The Huang2021 irradiance, 4.7 mW/mm^2, is the brightest condition of a VEP threshold sweep (0.002-4.7 mW/mm^2), not a device or safety maximum.

These arrays are driven by pulsed near-infrared light, so prepare_stim returns irradiance in mW/mm^2 (see Encoders). Photovoltaic conversion to tissue current is not modeled. Negative or non-finite irradiance is rejected. safe_mode=True checks the documented PRIMA projector envelope on PRIMAPivotal; the research arrays have no published envelope, so they reject safe_mode=True with a NotImplementedError.

PRIMA, PRIMA75, PRIMA55 and PRIMA40 are deprecated aliases; the v0.11 release notes list their replacements.

Cortical implants

Cortical implants derive from CorticalImplant. Both cortical models, ScoreboardModel and DynaphosModel, accept any of them.

Object

Placement

Electrodes

Description

Orion

epicortical

60

Orion cortical visual prosthesis

NeuroPortArray

intracortical

96

CORTIVIS NeuroPort array

ICVP

intracortical

18

Intracortical Visual Prosthesis (ICVP)

Neuralink

intracortical

per thread

Ensemble of Neuralink-style threads

../_images/implants-3.png

hemisphere ('left', 'right', or None) is metadata only. The model’s implant_position places the array; setting hemisphere neither moves nor mirrors it. Cortical implants have no default encoder.

Custom arrays

A regular grid needs no new class:

implant = p2p.implants.GridImplant(shape=(10, 10), spacing=500)

implant = p2p.implants.GridImplant(
    shape=(20, 20), spacing=400, grid_type='hex',
    electrode_type=p2p.implants.DiskElectrode, radius=75)

Electrodes are point sources unless electrode_type gives them an extent. For an irregular layout, build an ElectrodeArray from individual electrodes and wrap it in an Implant.

GridImplant and Implant carry neither eye nor hemisphere. To state laterality, wrap the array in the tissue-specific class:

from pulse2percept.implants import ElectrodeGrid
from pulse2percept.implants.retina import RetinalImplant
from pulse2percept.implants.cortex import CorticalImplant

array = ElectrodeGrid(shape=(10, 10), spacing=500)
retinal = RetinalImplant(array, eye='right')
cortical = CorticalImplant(array, hemisphere='right')

EnsembleImplant combines several implants into one system. from_visual_field_map() places one copy per visual-field location through a 2D VisualFieldMap.