©AAOO & Dr Grant Hannaford – Clinical Grating & Gabor Generator

Full-field pattern gratings and cogsci-style Gabor patches, calibrated in cycles/degree for a given screen and viewing distance.

Physical display calibration (required for clinical use)

Place a ruler against the screen. Adjust the reference below until its two end marks are exactly 100 mm apart. Keep browser zoom at 100% and recalibrate whenever the screen, display scaling, browser zoom or monitor changes.

Measure with a ruler (visible display area).
Nominal native resolution for the record. The measured 100 mm ruler above controls physical calibration.
e.g. 400 mm = 40 cm (typical near distance).
2–8 c/deg: typical “pattern glare” range.
Full-field gratings: 0° gives vertical bars; 90° gives horizontal bars.
Shifts pattern along its axis.
1 = full Colour 1/2; 0 = uniform mid-tone.
Gabor uses the cogsci.nl generator logic with a chosen patch diameter.
Uniform mode uses whole-pixel stripe widths and reports the actual frequency. Oblique patterns use filtered edges. Display calibration is still required.
For Gabor, any of these envelopes can be used (Gaussian standard deviation below).
σ for Gaussian envelope, used in both full-field and Gabor modes when envelope = Gaussian.
Values below are CSS pixels. Select millimetres to specify physical size.
Width
Height
(unlocked)
Currently treated as CSS pixels. Change units using “Canvas size units”.
Horizontal FOV
Vertical FOV
When FOV is locked, canvas width/height are derived from these degrees and your px/deg calibration, overriding the size inputs.
Contrast scales the difference between Colour 1 and 2 around their mid-tone; background is unaffected.
Used only when waveform = Gabor. Patch is drawn centred in the canvas.
Presets set: square-wave, contrast = 1.0, horizontal bars (90°), and the specified spatial frequency.
Settings update automatically every time you draw a new stimulus. The PNG download captures the current canvas.

Rendering note: canvas backing pixels are rendered at device pixel ratio, with physical size established by the measured 100 mm calibration reference. Grey edge colours are not luminance-calibrated. Clinical note: ensure the subject sits at the specified viewing distance with no browser zoom or OS scaling changes. For pattern glare, mid spatial frequencies (~3 c/deg) and large field size are typically the most provocative.