pulse2percept.stimuli.ImplantEncoder

class pulse2percept.stimuli.ImplantEncoder(implant=None)[source]

Base class for encoders installable on an implant.

An implant encoder accepts the dimensionless Stimulus (image or video gray levels) that Implant.prepare_stim produces, and can therefore be assigned to Implant.encoder. Assigning an unbound encoder binds it to that implant.

Added in version 0.11.0.

__init__(implant=None)[source]

Methods

__init__([implant])

encode(source)

Encode a visual target as stimulation

Attributes

implant

The implant this encoder is bound to, or None (read-only)

abstractmethod encode(source)[source]

Encode a visual target as stimulation

Parameters:

source – The visual target to encode, in the representation the subclass accepts.

Returns:

stim – The encoded stimulus, in the unit that drives the device.

Return type:

Stimulus

property implant

The implant this encoder is bound to, or None (read-only)