Skip to main content
Skip table of contents

Patterns

Patterns are the visual contents that fill Regions.

While some of the regions displayed to a test subject will be filled with solid fixed colors, often a region will be filled with one or more complex stimulus patterns such as gratings, checkerboards, or drifting dots. Any number of patterns can be combined within a single region. Each new pattern combines either additively or multiplicatively with the previous pattern. Patterns are always tied to a single region. Therefore, a region must be created and selected before a pattern can be assigned.

image-20241220-180302.png

Pattern User Interface in LabMaestro 1.10

Pattern Shared Parameters

Like regions, patterns have many shared parameters across all types. Here are these parameters:

Pattern Center

Center allows you to specify the location of the pattern's center relative to its embedded region. The center coordinates can be defined in degrees of visual angle, pixels, or centimeters.

By default, the coordinate frame is centered in the region's middle.

Adjusting the center of a pattern can be helpful when fine-tuning the disparity of two grating patterns that will be viewed binocularly. The grating's center can be specified relative to the center of the testing display or relative to the center of the region holding the grating.

If you plan on moving the region and want the grating to stay constant on the screen (giving the impression that the region is a window moving over a fixed grating), turn off the From center of region checkbox in the center parameters. Otherwise, leave this checkbox turned on. Now, if you drag the region, the grating pattern will remain unchanged within it.

LabMaestro also offers the flexibility of specifying the center in rectangular or polar coordinates.

Geometric polar coordinates have a 0-degree origin towards the right, with increasing angles rotating counter-clockwise. Geographic polar coordinates have a 0-degree origin towards the top of the display, with increasing angles rotating clockwise.

The polar coordinates system is convenient if you conceptualize your stimulus location in terms of visual eccentricity and meridian.

Changing the coordinate space buttons or the linear units popup will cause LabMaestro to automatically convert the existing coordinates to the new space and units.

Pattern Flicker Waveform

While all Regions have a Region Flicker Waveform parameter group, which allows you to accurately control the flicker waveform of the combined patterns within the region, sometimes you may require that just a single pattern within a region flicker, while the rest of the patterns within the region remain fixed.

You can use the Flicker Waveform parameter groups present in most Patterns to implement this kind of per-pattern flicker control.

To enable pattern flicker, click the check-box on the left of the Flicker Waveform group box title. The push buttons to the right of the group box title allow you to specify sinusoidal, square-wave, triangle-wave, or ramp flicker waveforms. The AmplitudeDC OffsetPhase, and Symmetry parameters give you complete control over the flicker waveform and the Temp. Freq. parameter allows you to specify the frequency of the flicker in Hertz.

Pattern Spatial Waveform

The Grating Pattern, Radial Bars Pattern, Concentric Circles Pattern, and Looming Dots Pattern all map two-dimensional space onto a one-dimensional waveform. The Spatial Waveform parameter gives you flexibility in specifying this one-dimensional waveform.

As a first step, you can choose between a sine, square, triangle, or ramp wave.

Then, you can scale and distort the waveform using the AmplitudeDC OffsetPhase, and Symmetry parameters. Finally, you can continuously drift the waveform's phase using the Drift Freq. parameter, giving rise to dynamic effects like drifting gratings and looming circles.

Pattern Types

Below is a list of all the patterns supported by the software, along with their parameters:

Checkerboard Pattern

One of the most commonly used stimuli in electrophysiology evoked-potentials research. Insert a checkerboard pattern to control the checkerboard's check size, orientation, and flicker waveform.

image-20241220-180200.png

Checkerboard Pattern

The Square Size allows you to change the size of individual squares in the pattern.

Concentric Circles Pattern

Create a series of concentric rings about the point specified by the Center parameter.

image-20241220-180223.png

Concentric Circle Pattern

The Spatial Frequency parameter can be modified to change the frequency of white/black luminance changes.

Drifting Dots Pattern

Create a drifting dot field with control over the dot population, coherence, velocity, update period, lifetime period, and flow center. This is a standard stimulus in motion perception.

image-20241220-180331.png

Drifting Dots Pattern

Drifting dots contain many additional parameters that can be controlled:

  • Population: The higher this value, the more circles are present.

  • Coherence: The higher this value, the more coherent the drift.

  • Incoherent Jitter: Toggle this option to add jitter to the dot pattern.

  • Amplitude: Define the mean amplitude.

  • DC Offset: Define the mean amplitude displacement from zero.

  • Update Period Units: Toggle to define the update period.

    • Update Period: The number of frames until the display is updated. 0 is every frame.

  • Flashing Dots: Toggle to enable flashing dots.

    • On Time: The time it takes for the dot to turn invisible to visible.

    • Off Time: The time it takes for the dot to turn visible to invisible.

  • Lifetime: Toggle to define lifetime.

    • Lifetime Duration: The time individual dots remain on the screen.

  • Fixed seed: Toggle to define a fixed seed.

    • Seed: Define the specific seed used by this pattern.

  • Synchronize Dots: Generate dots in a synchronized manner.

  • Dot Geometry: The dots' horizontal and vertical sizes.

  • Dot Velocity: Speed at which dots are moving on the screen.

Expression Pattern

Define a pattern as a general mathematical function that will be evaluated for each pixel in the pattern.

The expression typically includes the variables x and y, but it can also contain variables. Standard programming functions are also available (e.g., sin, rand(min, max), etc.). Dynamic patterns can be generated by including the variable "time" in the expression, which is the current animation time in seconds. The function must be scaled to have a range of -1 to +1.

The Expression property is used to define the mathematical function. You can find more information on the Values and Expressions page.

Gaussian Pattern

Create a Gaussian pattern, controlling its horizontal and vertical standard deviation and overall orientation. Gaussian blobs can be used as stimuli or combined multiplicatively with other patterns to make complex stimuli like Gabor patches.

image-20241220-180725.png

Gaussian Pattern

The Standard Deviation parameter can be defined to influence the size of the Gaussian blob along the horizontal and vertical axes.

Amplitude defines the amplitude of the Gaussian blob. Higher values are lighter, and lower values are darker. The DC Offset applies an offset to all values computed of the pattern, which can be between -2 and 2. Resulting values that fall out of the [-1, 1] range will be clamped to their limit values.

Grating Pattern

One of the most commonly used patterns in basic vision research. Fill a region with a with a grating. Specify the grating's spatial frequency and orientation. Optionally, control the grating's spatial and temporal waveforms, including the ability to drift the grating.

image-20241220-183932.png

Grating Pattern

The Spatial Frequency parameter can be defined to change the frequency of luminance variations.

Looming Dots Pattern

Create true looming dot patterns. These patterns are spatially and temporally identical to the physical analogy of moving within a tunnel with light bulbs placed randomly along the walls.

Looming dots share many parameters with drifting dots, plus the following parameters:

  • Min Radius: Minimum distance from the center at which dots can appear.

  • Dot Speed: The speed at which the dots move away from the center.

  • At Radius: TBD.

  • Projection: Determines the movement of the dots, which can be Constant, Linear, Projection, and Starfield.

Looming Circles Pattern

Create true looming circle patterns. These patterns are spatially and temporally identical to the physical analogy of moving within a tunnel with the Spatial Waveform parameter painted on the tunnel's walls.

image-20241220-190753.png

Looming Circle

The Spatial Frequency parameter can be defined to change the frequency of luminance variations.

The Radius parameter can be used to define the size of the circles.

Movie Pattern

Fill any region with an internal pattern made by another application saved on your disk as a movie file. Individual parameters include:

  • Tiling: The toggle will enable tiling across the region if space remains.

  • Scaling Mode: Define how the movie scales in the defined region.

  • Auto Repeat: Toggle to repeat the movie once all frames have played.

  • Muted: Toggle to remove sound from the movie file.

  • Speed: Define the playback speed of the movie.

Noise Pattern

Used to create static and dynamic random noise patterns, with control over the noise granularity, distribution, and seed, often used as masks or simple stimuli. It can also be used to create random-dot stereograms or to transform first-order stimuli into second-order stimuli.

image-20241220-191118.png

Noise Pattern

Here are the parameters that can be edited:

  • Amplitude: Define the maximum value for pixels in the noise patch.

  • DC Offset: Define the mean amplitude displacement from zero.

  • Symmetry: Define the point of symmetry in the noise patch.

  • Distribution: Define the noise distribution. Available distributions are Uniform, Gaussian and Binary.

  • Dynamic Noise: Toggle to enable dynamic noise. The noise patch will change each frame.

  • Fixed Seed: Toggle to define a single seed for the pattern.

  • Seed: Define the random seed of the pattern.

Picture Pattern

Fill any region with an internal pattern made by another application and saved on your disk as a picture file. If you only need to import a picture file's shape as a mask, not its internal pattern, use a Shape Mask Region instead of a picture pattern.

image-20241220-192058.png

Picture Pattern

Picture patterns have the following additional parameters:

  • Resource: Define the custom resource used as a pattern.

  • Amplitude: Define the mean amplitude.

  • DC Offset: Define the mean amplitude displacement from zero.

  • Tiling: The toggle will enable tiling across the region if space remains.

  • Scaling Mode: Define the preferred option for scaling the resource image.

Radial Bars Pattern

Create windmills, spirals, and other related static and dynamic patterns.

image-20241220-192442.png

Radial Bars Pattern

Radial patterns include the following additional parameters:

  • Number of Cycles: Define the number of rays in the pattern.

  • Spiral: Define the intensity of the spiral pattern, if desired.

Rotating Dots Pattern

Implements a uniform field of dots rotating about a common point specified by the center of rotation parameter.

image-20241220-192725.png

Rotating Dots Pattern

Rotating dots use the same properties as drifting dots, but Dot Velocity is replaced by Angular Speed, which defines the rotational speed of the dots.

Uniform Patterns

Fill a region with a solid pattern. This can be used to implement several different types of stimuli and create a solid flickering field.

image-20241220-192749.png

Uniform Patterns

Uniform patterns have no additional properties.

Combine Modes

All pattern dialogs have a combine-mode option, allowing you to specify how the pattern will be combined with previously defined patterns within the same region. The two “combine mode” options are add and multiply.

  • Use the add mode when creating a new pattern to add to the previous ones. For example, to make a plaid pattern, place a half-contrast grating into the region (the “combine mode" of this first grating is ignored), then create a second half-contrast grating with a different orientation and place it into the region in add mode. The result is a full-contrast plaid.

  • Use the multiply mode when you want to modulate one pattern with another. For example, to make a Gabor pattern, first place a full contrast grating into the region, then create a Gaussian pattern and place it into the region in multiply mode.

To select combine modes, first place two patterns in the same region. The Combine Mode property will become available in the Properties window of the second pattern.

For more practical examples of using patterns in LabMaestro, please check the Regions and Patterns demo in the documentation. This template project, Static Psychophysics Stimuli, provides examples of common stimuli.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.