rotate_dict

rotate_dict#

stimupy.utils.rotate_dict(dct, nrots=1, keys=('img', '*mask'))#

Return a dict with key-arrays rotated by nrots*90 degrees.

Parameters:
  • dct (dict) – dict containing arrays to be stacked

  • nrot (int) – number of rotations by 90 degrees

  • keys (Sequence[String, String] or String) – keys in dict for images to be padded

Returns:

same as input dict but with rotated key-arrays and updated keys for “visual_size” and “shape”

Return type:

dict[str, Any]