Skip to content

Commit

Permalink
Image-base docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisVincent committed Dec 13, 2022
1 parent 2e1df0d commit e0e72ad
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions stimuli/components/components.py
Expand Up @@ -7,6 +7,30 @@


def image_base(visual_size=None, shape=None, ppd=None, rotation=0.0):
"""Create coordinate-arrays to serve as image base for drawing
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
rotation : float, optional
rotation (in degrees) counterclockwise from 3 o'clock, by default 0.0
Returns
-------
dict[str, Any]
dict with keys:
"visual_size", "ppd" : resolved from input arguments,
"x", "y" : single axes
"xx", "yy": numpy.ndarray of shape,
"angular" : numpy.ndarray of shape, with angle (in rad) relative to center point
at each pixel
"""

shape, visual_size, ppd = resolution.resolve(shape=shape, visual_size=visual_size, ppd=ppd)

# Image axes
Expand Down

0 comments on commit e0e72ad

Please sign in to comment.