gaussian#

gaussian stimulus example

You can find an interactive version of this example here

stimupy.stimuli.edges.gaussian(visual_size=None, ppd=None, shape=None, sigma=None, rotation=0.0, intensity_edges=(0.0, 1.0), intensity_background=0.5)#

Draw a central step edge with a Gaussian envelop

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

  • sigma (float or (float, float)) – sigma of Gaussian in degree visual angle (y, x)

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

  • intensity_edges ((float, float)) – intensity values of edges (default: (0., 1.))

  • intensity_background (float) – intensity value of background, by default 0.5

Returns:

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

Return type:

dict[str, Any]