pulse2percept.stimuli.psychophysics.landolt_c
- pulse2percept.stimuli.psychophysics.landolt_c(gap=1, position=(0, 0), orientation=0, fov=10, polarity='dark', shape=(512, 512))[source]
Landolt C optotype
Rasterize a Landolt C and place it in a
Scene.The C uses standard proportions: the stroke and gap are equal, with inner and outer diameters of
3 * gapand5 * gap. The analytic glyph is supersampled and area-averaged onto the requested raster;gapmust span at least three output pixels.Added in version 0.11.0.
- Parameters:
gap (float or Quantity, optional) – Angular width of the critical opening, in degrees of visual angle (e.g.
0.5 * dva).position ((x, y), optional) – Center of the optotype in visual-field coordinates, in dva.
ygrows upwards.orientation (float or Quantity, optional) – Direction the opening points, in degrees counterclockwise from the positive x axis (e.g.
90 * deg): 0 right, 90 up, 180 left, 270 down. Any finite angle is accepted.fov (float or
(width, height), optional) – How much of the visual field the scene covers, in dva. A scalar is the horizontal extent, and the vertical one follows fromshape.polarity ({'dark', 'light'}, optional) –
'dark'draws a black C on white,'light'a white C on black.shape ((rows, cols), optional) – Size of the rasterized frame, in pixels.
- Returns:
scene
- Return type:
Examples
A 0.5-degree gap pointing up, five degrees to the right of fixation:
>>> from pulse2percept.stimuli import psychophysics >>> from pulse2percept.units import deg, dva >>> scene = psychophysics.landolt_c(gap=0.5 * dva, ... position=(5, 0) * dva, ... orientation=90 * deg, fov=15 * dva) >>> scene.fov (15.0, 15.0)