Overview

This section documents all visual stimulus patterns used in the freely-walking optomotor experiments on the G3 LED arena.

Pattern Categories

The patterns are organized into several categories based on their visual properties and experimental purpose:

Category Description Example Patterns
Optomotor Gratings Moving vertical stripe patterns for motion detection Pattern 06 (8px), Pattern 09 (16px)
Flicker Temporal contrast without spatial motion Pattern 10, Pattern 07
Curtains Progressive edge stimuli (ON/OFF) Pattern 19, Pattern 20, Pattern 51-52
Reverse Phi Contrast-reversing apparent motion Pattern 31-33, Pattern 58-62
Bar Fixation Stationary bars for phototaxis Pattern 30, Pattern 37-46
Background Uniform patterns for intervals Pattern 47, Pattern 25

Pattern Overview

Pattern Name Type
01 optomotor_contrast_72_RC Optomotor Grating
02 flicker_72_RC Flicker
03 optomotor_shifted_centre Optomotor Grating
04 optomotor_4pixel_binary Optomotor Grating
05 flicker_4pixel_binary Flicker
06 optomotor_8pixel_binary Optomotor Grating
07 flicker_8pixel_binary Flicker
08 optomotor_8pixel_shifted_binary Optomotor Grating
09 optomotor_16pixel_binary Optomotor Grating
10 flicker_16pixel_binary Flicker
11 optomotor_skinny_2ON_6OFF_binary Optomotor Grating
12 flicker_2ON_6OFF Flicker
13 optomotor_skinny_4ON_12OFF_binary Optomotor Grating
14 flicker_4ON_12OFF Flicker
15 optomotor_wide_6ON_2OFF_binary Optomotor Grating
16 optomotor_wide_12ON_4OFF_binary Optomotor Grating
17 optomotor_skinny_2ON_14OFF_binary Optomotor Grating
18 flicker_2ON_14OFF Flicker
19 ON_curtains_16px ON Curtain
20 OFF_curtains_16px OFF Curtain
21 0-8shift_60deg_1-875step Shifted Center
22 0shift_60deg_1-875step Shifted Center
23 minus0-8shift_60deg_1-875step Shifted Center
24 optomotor_skinny_2OFF_14ON_binary Optomotor Grating
25 bkg_3_gsval4_2frames Background
26 optomotor_8pixel_binary_2pxsteps Optomotor Grating
27 optomotor_16pixel_binary_2pxsteps Optomotor Grating
28 optomotor_skinny_2ON_14OFF_binary_2pxsteps Optomotor Grating
29 bkg_1_gsval4_2frames Background
30 4px_bar_fixation Bar Fixation
31 RevPhi_0_3_8_1px_step Reverse Phi
32 RevPhi_0_3_8_4px_step Reverse Phi
33 RevPhi_0_3_8_8px_step Reverse Phi
34 FoE_1-875_step_30deg Focus of Expansion
35 FoE_1-875_step_15deg Focus of Expansion
36 FoE_1-875_step_60deg Focus of Expansion
37 8px_bar_fixation_OFF Bar Fixation (OFF)
38 8px_bar_fixation_ON Bar Fixation (ON)
39 8px_bar_fixation_ON_2con Bar Fixation (ON)
40 8px_bar_fixation_ON_4con Bar Fixation (ON)
41 8px_bar_fixation_ON_6con Bar Fixation (ON)
42 8px_bar_fixation_OFF_2con Bar Fixation (OFF)
43 8px_bar_fixation_OFF_4con Bar Fixation (OFF)
44 8px_bar_fixation_OFF_6con Bar Fixation (OFF)
45 16px_bar_fixation_ON Bar Fixation (ON)
46 16px_bar_fixation_OFF Bar Fixation (OFF)
47 bkg_0_gsval1_2frames Background
48 full_flashes_0_1_binary_2frames Full Field Flash
49 16px_bar_fixation_OFF_3con Bar Fixation (OFF)
50 16px_bar_fixation_ON_3con Bar Fixation (ON)
51 ON_curtains_32px ON Curtain
52 OFF_curtains_32px OFF Curtain
53 ON_curtains_32px_4_9 ON Curtain
54 ON_R_curtains_32px_4_9 ON Curtain
55 OFF_curtains_32px_4_0 OFF Curtain
56 OFF_R_curtains_32px_4_0 OFF Curtain
57 32px_single_bar_ON Other
58 RevPhi_gsval3_0_3_7_8-24px_4px_step Reverse Phi
59 RevPhi_gsval3_0_3_7_16-16px_4px_step Reverse Phi
60 RevPhi_gsval3_0_3_7_16-16px_8px_step Reverse Phi
61 RevPhi_gsval3_0_2_7_16-16px_4px_step Reverse Phi
62 RevPhi_gsval2_0_1_3_16-16px_4px_step Reverse Phi
63 optomotor_4pixel_binary_2pxsteps Optomotor Grating

Adding a New Pattern

When you create a new pattern for the LED arena, follow these steps to add it to this documentation:

Step 1: Create the Pattern File

Create your pattern using MATLAB. Pattern generation scripts are located in:

freely-walking-optomotor/script_to_make_patterns/

Your pattern file should follow the naming convention: Pattern_XX_descriptive_name.mat

The pattern struct should contain:

  • pattern.Pats - 3D or 4D array of pixel values
  • pattern.x_num - Number of animation frames
  • pattern.y_num - Number of contrast levels (usually 1)
  • pattern.gs_val - Greyscale value (1=binary, 2=4-level, 3=8-level, 4=16-level)
  • pattern.num_panels - Number of panels (72)

Step 2: Generate Documentation

From the freely-walking-optomotor directory, run:

cd /path/to/freely-walking-optomotor
pixi run -e default --manifest-path python/freely-walking-python/pixi.toml \
    python docs_generator/generate_pattern_docs.py \
    patterns/Patterns_optomotor/Pattern_XX_your_pattern.mat

This will:

  1. Generate PNG frames and an animated GIF in reiser-documentation/assets/imgs/freely/patterns/
  2. Create a .qmd documentation page in reiser-documentation/Freely-walking/

Step 3: Update Navigation

Add your new pattern to reiser-documentation/_quarto.yml under the Patterns section:

- section: "Patterns"
  contents:
    - Freely-walking/freely_walking_patterns_index.qmd
    - Freely-walking/freely_walking_pattern_XX.qmd  # Add your pattern here

Step 4: Preview and Deploy

cd /path/to/reiser-documentation
quarto preview

Once satisfied, commit and push to deploy.

Regenerating All Pattern Documentation

To regenerate documentation for all patterns:

cd /path/to/freely-walking-optomotor
pixi run -e default --manifest-path python/freely-walking-python/pixi.toml \
    python docs_generator/generate_pattern_docs.py

Technical Details

Arena Geometry

  • Display: Cylindrical LED arena with 72 panels
  • Resolution: 3 rows x 192 columns (each panel is 8x8 pixels)
  • Panel arrangement: fliplr(flipud(reshape(1:72, 3, 24)))

Greyscale Levels

gs_val Levels Use Case
1 2 (binary) High contrast patterns
2 4 Low contrast experiments
3 8 Reverse phi, intermediate contrast
4 16 Fine contrast gradients