rectangle#
You can find an interactive version of this example here
- stimupy.components.shapes.rectangle(visual_size=None, ppd=None, shape=None, rectangle_size=None, rectangle_position=None, intensity_rectangle=1.0, intensity_background=0.0, rotation=0.0)#
Draw a rectangle
- Parameters:
visual_size (Sequence[Number, Number], Number, or None (default)) – visual size [height, width] of image, in degrees visual angle
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
rectangle_size (Number, Sequence[Number, Number]) – rectangle size [height, width], in degrees visual angle
rectangle_position (Number, Sequence[Number, Number], or None (default)) – position of the rectangle, in degrees visual angle. If None, rectangle will be placed in center of image.
intensity_rectangle (float, optional) – intensity value for rectangle, by default 1.0
intensity_background (float, optional) – intensity value of background, by default 0.0
rotation (float, optional) – rotation (in degrees), counterclockwise, by default 0.0 (horizontal)
- Returns:
dict with the stimulus (key: “img”), mask with integer index for the shape (key: “rectangle_mask”), and additional keys containing stimulus parameters
- Return type: