adapt_normalized_rms_contrast_dict#

stimupy.utils.contrast_conversions.adapt_normalized_rms_contrast_dict(stim, rms_contrast, mean_luminance=None)#

Adapt normalized rms contrast of image (std divided by mean)

Parameters:
  • stim (dict) – stimulus dictionary containing at least key “img”

  • rms_contrast (float) – desired rms contrast (std divided by mean intensity)

  • mean_luminance (float) – desired mean luminance; if None (default), dont change mean luminance

Returns:

dict with the stimulus (key: “img”), RMS contrast (key: “rms_contrast”), mean luminance (“mean_luminance”) and additional keys containing stimulus parameters

Return type:

dict[str, Any]