pad_dict_to_visual_size#
- stimupy.utils.pad_dict_to_visual_size(dct, visual_size, ppd, pad_value=0, keys=('img', '*mask'))#
Pad images in dictionary to specified visual size in degrees visual angle
- Parameters:
dct (dict) – dict containing image-arrays to be padded
visual_size (Sequence[int, int, ...]) – desired visual size (in degrees visual angle) of img after padding
ppd (Sequence[Number] or Sequence[Number, Number]) – pixels per degree
pad_value (Numeric, optional) – value to pad with, by default 0.0
keys (Sequence[String, String] or String) – keys in dict for images to be padded
- Returns:
same as input dict but with larger key-arrays and updated keys for “visual_size” and “shape”
- Return type: