white_two_rows

white_two_rows#

white_two_rows stimulus example

You can find an interactive version of this example here

stimupy.stimuli.whites.white_two_rows(visual_size=None, ppd=None, shape=None, frequency=None, n_bars=None, bar_width=None, period='ignore', rotation=0.0, intensity_bars=(0.0, 1.0), intensity_target=0.5, target_indices_top=(), target_indices_bottom=(), target_center_offset=None, target_heights=None, origin='corner', round_phase_width=True)#

White’s stimulus where targets are placed in two rows (top, bottom) that have the same distance from the center.

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

  • frequency (Number, or None (default)) – spatial frequency of grating, in cycles per degree visual angle

  • n_bars (int, or None (default)) – number of bars in the grating

  • bar_width (Number, or None (default)) – width of a single bar, in degrees visual angle

  • 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_bars (Sequence[float, ...]) – intensity value for each bar, by default (1.0, 0.0). Can specify as many intensities as n_bars; If fewer intensities are passed than n_bars, cycles through intensities

  • intensity_target (float) – intensity value of target

  • target_indices_top (int or tuple of ints) – bar indices where top target(s) will be placed. As many targets as ints.

  • target_indices_bottom (int or tuple of ints) – bar indices where bottom target(s) will be placed. As many targets as ints.

  • target_center_offset (float) – offset from target centers to image center in degree visual angle.

  • target_heights (float, or Sequence[float, ...]) – height of targets in degrees visual angle

  • origin ("corner", "mean" or "center") – if “corner”: set origin to upper left corner (default) if “mean”: set origin to hypothetical image center if “center”: set origin to real center (closest existing value to mean)

  • round_phase_width (Bool) – if True (default), round phase width of grating

Returns:

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

Return type:

dict[str, Any]

References

White, M. (1979).

A new effect of pattern on perceived lightness. Perception, 8(4), 413-416. https://doi.org/10.1068/p080413