gabor

 element objects

A sinusoidal grating in a Gaussian envelope. Includes options for flicker and phase drift. See also element type grating.

▸ Object ends on its own?

"Ends on its own" means ends automatically at that point. If an element can end on its own, you don't need to set end conditions for it in property end (unless you want it to maybe end earlier).

No—runs until any condition you set in property end.

Input properties
Record properties
gabor
elements (see below)

size
frequency
orientation
phase
meanIntensity
amplitude
contrast
sigma
color
flickerFrequency
temporalFrequency

All visual elements
position
depth

nn_eyes
rotation
flipHorz
flipVert

colorMask
alpha
intensity
contrastMult
convolution
shader
filterOrder
filterGrayscale
filterResolutionMult
filterGamma

channelResolution
backColor
addDisplay

All visual elements
position

All adjuster elements have
adjust

All elements
start
end

startBuffer
endBuffer

vary
staircase

All objects
info
report

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: sine grating left → right (vertical bars)

Orientation angle of the grating, + = clockwise (deg). 0 = sine grating left → right (vertical bars). This sets rotation of the grating within its rectangular display area. For rotation of the whole display use property rotation.

phase

Default: sine grating with angle = 0 at center

Phase of grating (cycles). 0 = sine grating with angle = 0 at display center, 0.5 = negative sine grating, 0.25 = cosine grating, etc. Display center is at element position.

meanIntensity
amplitude
contrast

Defaults: meanIntensity = 0.5, amplitude = 0.5

meanIntensity is a number between 0–1 (black–maximum) 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 OR contrast:

amplitude is max intensity − mean intensity.

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

Intensity always clips at 0 and 1. It's possible to set a combination of these properties that causes the grating to clip in this way. 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 in the direction of the grating (perpendicular to its bars). Grating orientation can be set using orientation above.

color

Default: white <cd>[1 1 1]<cd>

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 intensities between 0–1 is linearly interpolated between the two. Note intensity, as defined by amplitude/contrast + meanIntensity above, always clips at 0 and 1, so color clips at <cd>[0 0 0]<cd> and color.

flickerFrequency
temporalFrequency

Defaults: no flicker or phase drift

You can set one of flickerFrequency OR temporalFrequency:

flickerFrequency is frequency of switching between dark–light (cycles/sec). 0 = no flicker.

temporalFrequency is continuous phase drift rate. This can be positive or negative to specify direction (+ = direction of orientation above, − = opposite direction, cycles/sec). 0 = no phase drift.

Adjustable properties

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

Adjustable properties

Adjustable properties

position
nn_eyes
rotation
colorMask
alpha
intensity
contrastMult
drawCodeVars

(None)

(None)

Input properties
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.

gabor
elements (see below)

maxAmplitude
maxContrast

All elements
startTime
endTime
duration
n_startFrame
n_endFrame
startLatencyBufferable
endLatencyBufferable

maxAmplitude
maxContrast

Values for input properties amplitude and contrast that would cause intensity to clip at 0 or 1 given the current value of meanIntensity.