pulse2percept.stimuli.samples.zebrafish_retina

pulse2percept.stimuli.samples.zebrafish_retina(resize=None, electrodes=None, metadata=None, as_gray=False)[source]

Zebrafish retina micrograph

Load a 544x760x3 RGB fluorescence micrograph of a zebrafish retina (“Sunrise in the eye”), as a false-color image stimulus.

The micrograph is by Dr Kara Cerveny and Dr Steve Wilson, held by the Wellcome Collection, and licensed CC BY 4.0 rather than under pulse2percept’s BSD license; metadata carries the attribution.

Added in version 0.11.0.

Parameters:
  • resize ((height, width) or None, optional) – A tuple specifying the desired height and the width of the image stimulus.

  • electrodes (int, string or list thereof; optional) –

    Optionally, you can provide your own electrode names. If none are given, each pixel is named after its place in the image: a letter for the row, a number for the column, and a suffix for the color channel (e.g. ‘A1’, ‘C12’, ‘A1_R’).

    Note

    The number of electrode names provided must match the number of pixels in the (resized) image.

  • metadata (dict, optional) – Additional stimulus metadata can be stored in a dictionary. Keys given here override the attribution defaults above.

  • as_gray (bool, optional) – Flag whether to convert the image to grayscale.

Returns:

stim

Return type:

ImageStimulus

Examples

>>> from pulse2percept.stimuli import samples
>>> samples.zebrafish_retina().img_shape
(544, 760, 3)