gabor

 elements

A sinusoidal grating with a Gaussian envelope in a rectangular display area. Default is a grayscale grating that oscillates between pure black and white in a square area. Uses standard formulas for grating and envelope—see gabor_open.m if you want to check them.

For any trial you define in an experiment script, you can make one or more 

gabor

 objects using function 

gabor

Object and input them to addTrial.

For any trial you define in an experiment script, you can make one or more 

gabor

 objects using function 

gabor

Object and input them to addTrial.

Input properties

Adjustable properties

You can allow the subject to adjust the following input properties of an object of this type during the experiment using an adjuster element. If you need to make other properties adjustable, you can copy the element type using newPbType and edit it.

position
nn_eyes
rotation
opacity

(None)

(None)

size

Default: square with sides 5 deg

Sets display area for the Gabor. A number that is side length for a square, or a vector [width height] for a rectangle (deg).

frequency

Default: 2 cycles/deg

Spatial frequency (cycles/deg).

orientation

Default: vertical

An angle clockwise (deg) setting orientation of the grating. 0 = vertical bars. Note this sets orientation of the grating within the display area—to rotate the whole display, you can use property rotation.

phase

Default: 0

Phase (cycles). 0 = sine grating centered in the element display area, 0.5 = negative sine grating, 0.25 = cosine grating, etc.

meanIntensity
amplitude
contrast

Defaults: meanIntensity = 0.5, amplitude = 0.5

meanIntensity is a number between 0–1 setting the intensity the grating oscillates about, also the intensity it decays toward at its edges due to the Gaussian envelope.

Also set one of:

amplitude is max intensity − mean intensity.

OR

contrast is Michelson contrast, amplitude / mean intensity. If you set contrast, mean intensity must be > 0.

It's possible to set a combination of these properties that causes the grating to clip at intensity 0 or 1. See record properties maxAmplitude and maxContrast below.

sigma

Default: 0.75 deg

Standard deviation for a symmetric Gaussian envelope (deg). <cd>inf<cd> = no envelope.

You can also use a vector <cd>[s_x s_y]<cd> for an asymmetric envelope. Here x is perpendicular to the orientation of the grating and y is parallel to it (so x = horizontal and y = vertical for a vertical grating). Grating orientation is set using orientation above.

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.

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.

maxAmplitude
maxContrast

Maximum amplitude and contrast where intensity would clip at 0 or 1, whichever is reached first, given the set mean intensity.