shape_from_visual_size_ppd

shape_from_visual_size_ppd#

stimupy.utils.resolution.shape_from_visual_size_ppd(visual_size, ppd)#

Calculate shape (pixels) from given visual size (degrees) and pixels-per-degree

Parameters:
  • visual_size (Sequence[Number, Number]; or Number; or None) – each element has to be of type that can be cast to float, or None.

  • ppd (Sequence[int, int]; or int, or None) – each element has to be of type that can be cast to int, or None. See validate_ppd

Returns:

.height: int, height in pixels .width: int, width in pixels See validate_shape

Return type:

Shape NamedTuple, with two attributes