stimupy.stimuli.cubes#
Demos#
Functions#
Cube stimulus (Agostini & Galmonte, 2002) with flexible cell lengths. |
|
Cube illusion (Agostini & Galmonte, 2002) |
- varying_cells(ppd=None, cell_lengths=None, cell_thickness=None, cell_spacing=None, target_indices=(), intensity_background=0.0, intensity_cells=1.0, intensity_target=0.5)[source]#
Cube stimulus (Agostini & Galmonte, 2002) with flexible cell lengths.
- Parameters:
ppd (Number or None (default)) – pixels per degree (visual angle)
cell_lengths (Sequence[Number, ...], Number of None (default)) – lengths of individual cells in degrees
cell_thickness (Number or None (default)) – thickness of each cell in degrees
cell_spacing (Number or None (default)) – spacing between cells in degrees
target_indices (Sequence or None) – target indices; will be used on each side
intensity_background (float) – intensity value for background
intensity_cells (float) – intensity value for grid cells
intensity_target (float) – intensity value for target
- Returns:
dict with the stimulus (key: “img”), mask with integer index for each target (key: “target_mask”), and additional keys containing stimulus parameters
- Return type:
References
- Agostini, T., and Galmonte, A. (2002).
Perceptual organization overcomes the effects of local surround in determining simultaneous lightness contrast. Psychol. Sci. 13, 89-93. https://doi.org/10.1111/1467-9280.00417
- Domijan, D. (2015).
A neurocomputational account of the role of contour facilitation in brightness perception. Frontiers in Human Neuroscience, 9, 93. https://doi.org/10.3389/fnhum.2015.00093
- cube(visual_size=None, ppd=None, shape=None, n_cells=None, target_indices=(), cell_thickness=None, cell_spacing=None, intensity_background=0.0, intensity_cells=1.0, intensity_target=0.5)[source]#
Cube illusion (Agostini & Galmonte, 2002)
- Parameters:
visual_size (Sequence[Number, Number], Number, or None (default)) – visual size [height, width] of image, in degrees
ppd (Sequence[Number, Number], Number, or None (default)) – pixels per degree [vertical, horizontal]
shape (Sequence[Number, Number], Number, or None (default)) – shape [height, width] of image, in pixels
n_cells (int) – the number of square cells (not counting background) per dimension
target_indices (Sequence) – Target indices. Will be used on each side
cell_thickness (Number or None (default)) – thickness of each cell in degrees
cell_spacing (Sequence[Number, Number], Number or None (default)) – spacing between cells in degrees (height, width)
intensity_background (float) – intensity value for background
intensity_cells (float) – intensity value for grid cells
intensity_target (float) – intensity value for target
- Returns:
dict with the stimulus (key: “img”), mask with integer index for each target (key: “target_mask”), and additional keys containing stimulus parameters
- Return type:
References
- Agostini, T., and Galmonte, A. (2002).
Perceptual organization overcomes the effects of local surround in determining simultaneous lightness contrast. Psychol. Sci. 13, 89-93. https://doi.org/10.1111/1467-9280.00417
- Domijan, D. (2015).
A neurocomputational account of the role of contour facilitation in brightness perception. Frontiers in Human Neuroscience, 9, 93. https://doi.org/10.3389/fnhum.2015.00093