stimupy.noises#

Modules#

stimupy.noises.binaries

stimupy.noises.narrowbands

stimupy.noises.naturals

stimupy.noises.whites

Functions#

overview

Generate example stimuli from this module

plot_overview

Plot overview of examples in this module (and submodules)

pseudo_white_spectrum

Create pseudorandom white noise spectrum

overview(skip=False)[source]#

Generate example stimuli from this module

Returns:

Dict mapping names to individual stimulus dicts

Return type:

dict[str, dict]

plot_overview(mask=False, save=None, units='deg')[source]#

Plot overview of examples in this module (and submodules)

Parameters:
  • mask (bool or str, optional) – If True, plot mask on top of stimulus image (default: False). If string is provided, plot this key from stimulus dictionary as mask

  • save (None or str, optional) – If None (default), do not save the plot. If string is provided, save plot under this name.

  • units ("px", "deg" (default), or str) – what units to put on the axes, by default degrees visual angle (“deg”). If a str other than “deg”(/”degrees”) or “px”(/”pix”/”pixels”) is passed, it must be the key to a tuple in stim

pseudo_white_spectrum(shape=(100, 100), amplitude=2.0)[source]#

Create pseudorandom white noise spectrum

Code translated and adapted from Matlab scripts provided by T. Peromaa

Parameters:
  • shape (int or (int, int)) – Shape of noise array in pixels (height, width)

  • amplitude – Amplitude of noise power spectrum

Returns:

Shifted 2d complex number spectrum. DC = 0. Amplitude of each (pos/neg) frequency component = A/2 Power of each (pos/neg) frequency component = (A/2)**2

Return type:

spectrum