checkerboard#

checkerboard stimulus example

You can find an interactive version of this example here

stimupy.stimuli.checkerboards.checkerboard(visual_size=None, ppd=None, shape=None, frequency=None, board_shape=None, check_visual_size=None, target_indices=(), extend_targets=False, period='ignore', rotation=0.0, intensity_checks=(0.0, 1.0), intensity_target=0.5, round_phase_width=True)#

Checkerboard assimilation effect

High-contrast checkerboard, with intermediate targets embedded in it. Target brightness assimilates to direct surround, rather than contrast with it.

These kinds of checkerboard displays are described by De Valois & De Valois (1988), and the brightness effect of it by Blakeslee & McCourt (2004).

Parameters:
  • visual_size (Sequence[Number, Number], Number, or None (default)) – visual size of the total board [height, width] 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] in pixels

  • frequency (Sequence[Number, Number], Number, or None (default)) – frequency of checkerboard in [y, x] in cpd

  • board_shape (Sequence[Number, Number], Number, or None (default)) – number of checks in [height, width] of checkerboard

  • check_visual_size (Sequence[Number, Number], Number, or None (default)) – visual size of a single check [height, width] in degrees

  • target_indices (Sequence[(Number, Number),...], optional) – target indices (row, column of checkerboard), by default None

  • extend_targets (bool, optional) – if true, extends the targets by 1 check in all 4 directions, by default False

  • period ("even", "odd", "either" or "ignore" (default)) – ensure whether the grating has “even” number of phases, “odd” number of phases, either or whether not to round the number of phases (“ignore”)

  • rotation (float, optional) – rotation (in degrees), counterclockwise, by default 0.0 (horizontal)

  • intensity_checks (Sequence[float, float]) – intensity values of checks, by default (0.0, 1.0)

  • round_phase_width (Bool) – if True, round width of bars given resolution (default: True)

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:

dict[str, Any]

References

Blakeslee, B., & McCourt, M. E. (2004).

A unified theory of brightness contrast and assimilation incorporating oriented multiscale spatial filtering and contrast normalization. Vision Research, 44(21), 2483-2503. https://doi.org/10/fmcx5p

De Valois, R. L., & De Valois, K. K. (1988).

Spatial Vision. Oxford University Press.