stimupy.noises#
Modules#
Functions#
Generate example stimuli from this module |
|
Plot overview of examples in this module (and submodules) |
|
Create pseudorandom white noise spectrum |
- 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:
- 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