basic#

basic stimulus example

You can find an interactive version of this example here

stimupy.stimuli.sbcs.basic(visual_size=None, ppd=None, shape=None, target_size=None, intensity_background=0.0, intensity_target=0.5)#

Simultaneous contrast stimulus with central target

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

  • target_size (float or (float, float)) – size [height, width] of the target, in degrees visual angle

  • intensity_background (float, optional) – intensity value for background, by default 0.0

  • intensity_target (float, optional) – intensity value for target, by default 0.5

Returns:

dict with the stimulus (key: “img”), mask with integer index for the target (key: “target_mask”), and additional keys containing stimulus parameters

Return type:

dict[str, Any]

References

Chevreul, M. (1855).

The principle of harmony and contrast of colors.