stimupy.stimuli.plaids#

Demos#

Functions#

gabors

Draw plaid consisting of two gabors

sine_waves

Draw plaid consisting of two sine-wave gratings

square_waves

Draw plaid consisting of two square-wave gratings

gabors(gabor_parameters1, gabor_parameters2, weight1=1, weight2=1)[source]#

Draw plaid consisting of two gabors

Parameters:
  • gabor_parameters1 (dict) – kwargs to generate first Gabor

  • gabor_parameters2 (dict) – kwargs to generate second Gabor

  • weight1 (float) – weight of first Gabor (default: 1)

  • weight2 (float) – weight of second Gabor (default: 1)

Returns:

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

Return type:

dict[str, Any]

sine_waves(grating_parameters1, grating_parameters2, weight1=1, weight2=1)[source]#

Draw plaid consisting of two sine-wave gratings

Parameters:
  • grating_parameters1 (dict) – kwargs to generate first sine-wave grating

  • grating_parameters2 (dict) – kwargs to generate second sine-wave grating

  • weight1 (float) – weight of first grating (default: 1)

  • weight2 (float) – weight of second grating (default: 1)

Returns:

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

Return type:

dict[str, Any]

square_waves(grating_parameters1, grating_parameters2, weight1=1, weight2=1)[source]#

Draw plaid consisting of two square-wave gratings

Parameters:
  • grating_parameters1 (dict) – kwargs to generate first sine-wave grating

  • grating_parameters2 (dict) – kwargs to generate second sine-wave grating

  • weight1 (float) – weight of first grating (default: 1)

  • weight2 (float) – weight of second grating (default: 1)

Returns:

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

Return type:

dict[str, Any]