on_grating_masked#

on_grating_masked stimulus example

You can find an interactive version of this example here

stimupy.stimuli.gratings.on_grating_masked(small_grating_params, large_grating_params, mask_size=None, mask_rotation=None)#

Small grating, with a parallelogram-like shape, on a larger grating

Parameters:
  • small_grating_params (dict) – kwargs to generate small grating

  • large_grating_params (dict) – kwargs to generate larger grating

  • mask_size (Sequence[Number, Number, Number], Sequence[Number, Number], Number or None (default)) – size (height, width, depth) of parallelogram-like mask in degrees visual angle

  • mask_rotation (float) – rotation of the mask in degree

Returns:

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

Return type:

dict[str, Any]

References

White, M. (1981).

The effect of the nature of the surround on the perceived lightness of grey bars within square-wave test grating. Perception, 10, 215-230. https://doi.org/10.1068/p100215