noise

 elements

White Gaussian noise, either static (a still image) or dynamic (changing over time). Note to add Gaussian noise to an image, you can use a picture element with property noise instead.

You can make 

noise

 objects using function 

noise

Object and add them to a trial by including them as inputs to addTrial.

You can make 

noise

 objects using function 

noise

Object and add them to a trial by including them as inputs to addTrial.

Input properties

Adjustable properties

You can vary or allow the subject to adjust the following input properties of an object of this type in real time when it's running. If you need to make other properties adjustable, you can edit the element type code—see Element Type Programming Manual.

position
nn_eyes
rotation
opacity

(None)

(None)

size

Default: whole window

A 1×2 vector [width height] setting size of the display. Or a single number for a square display. Or the number <cd>inf<cd> = whole window.

maxFrequency

Default: 10 cycles/deg

The maximum spatial frequency of the the Gaussian noise (cycles/deg). This effectively sets the size of one pixel in the noise in terms of distance on screen: 1 px = 1/2 cycle = 1/2 × 1/frequency.

meanIntensity
sigma
numLevels

Default: meanIntensity = 0.5
Default: sigma = 0.2
Default: numLevels = approximately continuous intensity distribution

meanIntensity is the mean pixel intensity the noise is distributed about (0–1). 0 = black, 1 = full intensity corresponding to color below.

sigma is standard deviation of the Gaussian pixel intensity distribution for the noise. Or <cd>inf<cd> = rectangular distribution from 0–1.

numLevels is an integer > 0 to quantize the noise intensity. e.g. if you set sigma = <cd>inf<cd> and numLevels = 2 you'll get binary noise (black/white unless modulated by color below). <cd>inf<cd> = as continuous as possible up to the intensity resolution of the display (typically 256 levels).

color

Default: white

A 1×3 RGB vector with numbers between 0–1. This defines the color at intensity = 1. Color at intensity = 0 is <cd>[0 0 0]<cd>. Color at all other intensities is linearly interpolated between the two.

temporalFrequency
repeatInterval

Default: temporalFrequency = static display
Default: repeatInterval = 1 sec if dynamic display

temporalFrequency sets frequency that the noise pattern changes at (frames/sec). 0 = static display. Note actual temporal frequency achieved is limited by frame rate during the element, which nominally = screen refresh rate but can be lower if frames are dropped—see Timing precision.

If temporalFrequency > 0, repeatInterval sets the interval at which the noise pattern repeats (sec). This lets the element save processing time by not generating a new pattern at every change. It comes at a cost of using memory to store enough pre-generated patterns to cover the repeat interval. <cd>inf<cd> = no repeat, in which case the element generates a new pattern at every change and stores none.

seed

Default: full pseudo-randomization

You can use this property to apply a specific random pattern for the noise, typically if you want to repeat precisely the same pattern across multiple noise elements. To do this, set seed to a MATLAB random number generator state as returned by the rng command, and set it to the same state for all noise elements that you want to share the pattern. The element will set the generator to that state before generating the pattern (it re-shuffles the state after so randomization elsewhere is not affected).

All elements using the same seed must have the same values for all other properties that affect the noise pattern, i.e. most of the properties above. You can't use seed for dynamic noise with no repeat (temporalFrequency > <cd>0<cd> and repeatInterval < <cd>inf<cd>).

See <PsychBench folder>/docs/tutorials/tutorial08_stereo.m for an example where this is used to make a random dot stereogram.

Input properties all visual elements have

position

Input properties all adjuster elements have

adjust

Input properties all objects have

report
info

Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.