stimupy.stimuli.benarys#
Demos#
Functions#
Benary's Cross Illusion |
|
Benary's Cross stimulus with two rectangular targets with default placement |
|
Benary's Cross stimulus with two triangular targets with default placement |
|
Todorovic Benary's Cross Illusion |
|
Todorovic version of Benary's Cross stimulus with two rectangular targets and default placement |
|
Todorovic version of Benary's Cross stimulus with two triangular targets and default placement |
- cross_generalized(visual_size=None, ppd=None, shape=None, cross_thickness=None, target_size=None, target_type='r', target_rotation=0.0, target_x=None, target_y=None, intensity_background=1.0, intensity_cross=0.0, intensity_target=0.5)[source]#
Benary’s Cross Illusion
- Parameters:
visual_size (Sequence[Number, Number], Number, or None (default)) – visual size [height, width] of grating, 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 grating, in pixels
cross_thickness (float) – width of the cross bars in degrees visual angle
target_size ((float, float)) – size of all target(s) in degrees visual angle
target_type (tuple of strings) – type of targets to use; option: r (rectangle), t (triangle); as many targets as types
target_rotation (tuple of floats, or float) – tuple with rotation of targets in deg, counterclockwise, as many targets as rotations
target_x (tuple of floats) – tuple with x coordinates of targets in degrees, as many targets as coordinates
target_y (tuple of floats) – tuple with y coordinates of targets in degrees, as many targets as coordinates
intensity_background (float) – intensity value for background
intensity_cross (float) – intensity value for cross
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
- Benary, W. (1924).
Beobachtungen zu einem Experiment über Helligkeitskontrast. Psychologische Forschung, 5, 131-142. https://doi.org/10.1007/BF00402398
- cross_rectangles(visual_size=None, ppd=None, shape=None, cross_thickness=None, target_size=None, intensity_background=1.0, intensity_cross=0.0, intensity_target=0.5)[source]#
Benary’s Cross stimulus with two rectangular targets with default placement
- Parameters:
visual_size (Sequence[Number, Number], Number, or None (default)) – visual size [height, width] of grating, 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 grating, in pixels
cross_thickness (float) – width of the cross bars in degrees visual angle
target_size ((float, float)) – size of all target(s) in degrees visual angle
intensity_background (float) – intensity value for background
intensity_cross (float) – intensity value for cross
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
- Benary, W. (1924).
Beobachtungen zu einem Experiment über Helligkeitskontrast. Psychologische Forschung, 5, 131-142. https://doi.org/10.1007/BF00402398
- cross_triangles(visual_size=None, ppd=None, shape=None, cross_thickness=None, target_size=None, intensity_background=1.0, intensity_cross=0.0, intensity_target=0.5)[source]#
Benary’s Cross stimulus with two triangular targets with default placement
- Parameters:
visual_size (Sequence[Number, Number], Number, or None (default)) – visual size [height, width] of grating, 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 grating, in pixels
cross_thickness (float) – width of the cross bars in degrees visual angle
target_size (float) – size of adjacent and opposite of target triangle in degrees visual angle
intensity_background (float) – intensity value for background
intensity_cross (float) – intensity value for cross
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
- Benary, W. (1924).
Beobachtungen zu einem Experiment über Helligkeitskontrast. Psychologische Forschung, 5, 131-142. https://doi.org/10.1007/BF00402398
- todorovic_generalized(visual_size=None, ppd=None, shape=None, L_width=None, target_size=None, target_type='r', target_rotation=0.0, target_x=None, target_y=None, intensity_background=1.0, intensity_cross=0.0, intensity_target=0.5)[source]#
Todorovic Benary’s Cross Illusion
- Parameters:
visual_size (Sequence[Number, Number], Number, or None (default)) – visual size [height, width] of grating, 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 grating, in pixels
L_width (float) – width of L in degree visual angle
target_size ((float, float)) – size of all target(s) in degrees visual angle
target_type (tuple of strings) – type of targets to use; option: r (rectangle), t (triangle); as many targets as types
target_rotation (tuple of floats, or float) – tuple with rotation of targets in deg, counterclockwise, as many targets as rotations
target_x (tuple of floats) – tuple with x coordinates of targets in degrees, as many targets as coordinates
target_y (tuple of floats) – tuple with y coordinates of targets in degrees, as many targets as coordinates
intensity_background (float) – intensity value for background
intensity_cross (float) – intensity value for cross
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
- Benary, W. (1924).
Beobachtungen zu einem Experiment über Helligkeitskontrast. Psychologische Forschung, 5, 131-142. https://doi.org/10.1007/BF00402398
- todorovic_rectangles(visual_size=None, ppd=None, shape=None, L_width=None, target_size=None, intensity_background=1.0, intensity_cross=0.0, intensity_target=0.5)[source]#
Todorovic version of Benary’s Cross stimulus with two rectangular targets and default placement
- Parameters:
visual_size (Sequence[Number, Number], Number, or None (default)) – visual size [height, width] of grating, 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 grating, in pixels
L_width (float) – width of L in degree visual angle
target_size ((float, float)) – size of all target(s) in degrees visual angle
intensity_background (float) – intensity value for background
intensity_cross (float) – intensity value for cross
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
- Benary, W. (1924).
Beobachtungen zu einem Experiment über Helligkeitskontrast. Psychologische Forschung, 5, 131-142. https://doi.org/10.1007/BF00402398
- todorovic_triangles(visual_size=None, ppd=None, shape=None, L_width=None, target_size=None, intensity_background=1.0, intensity_cross=0.0, intensity_target=0.5)[source]#
Todorovic version of Benary’s Cross stimulus with two triangular targets and default placement
- Parameters:
visual_size (Sequence[Number, Number], Number, or None (default)) – visual size [height, width] of grating, 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 grating, in pixels
L_width (float) – width of L in degree visual angle
target_size (float) – size of adjacent and opposite of target triangle in degrees visual angle
intensity_background (float) – intensity value for background
intensity_cross (float) – intensity value for cross
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
- Benary, W. (1924).
Beobachtungen zu einem Experiment über Helligkeitskontrast. Psychologische Forschung, 5, 131-142. https://doi.org/10.1007/BF00402398