Correcting for physical distortions in visual stimuli improves reproducibility in zebrafish neuroscience

Timothy Dunn, James E. Fitzgerald

TL;DR

Zebrafish researchers often overlook how the air-water interface distorts the visual stimuli they project to their subjects. This paper introduces a computational tool that uses Snell’s Law and Fresnel equations to correct these distortions, successfully reconciling major discrepancies in behavioral literature and preventing significant errors in neural receptive field mapping.

What Problem Does This Paper Address?

In a typical zebrafish neuroscience experiment, a larval fish sits in a water-filled dish while a projector displays visual stimuli on a screen outside the dish. Between the screen and the fish’s eye lies an air-water interface (and often a plastic dish).

As any high school physics student knows, light bends when it moves between media of different densities—a phenomenon known as refraction (Snell’s Law). Furthermore, some light is reflected away rather than transmitted (Fresnel equations). Despite the precision of modern brain-imaging techniques, many researchers have treated their "projected" stimuli as identical to the "received" stimuli. This paper argues that this "naive" approach creates a massive gap in reproducibility, as different lab setups (flat vs. curved dishes) produce vastly different optical distortions, leading researchers to draw conflicting conclusions from the same biological phenomena.

Methods

The authors developed a mathematical framework to map the relationship between the true position of a projected point ($\theta'$) and its apparent position as seen by the fish ($\theta$).

  1. Geometric Modeling: They derived trigonometric solutions for the two most common experimental configurations:
  2. Flat interfaces: Stimuli projected from below through a flat tank bottom.
  3. Curved interfaces: Stimuli projected from the side through a cylindrical dish.
  4. Ray Tracing: They treated the fish eye as a pinhole detector and traced light paths through the air, plastic, and water layers.
  5. Intensity Correction: Using Fresnel equations, they modeled how light transmittance drops off at steeper angles, which affects the perceived contrast of the stimuli.
  6. Software Tool: They released an open-source tool (available on GitHub) that allows researchers to "pre-distort" their images so that the fish receives the intended stimulus, or to "post-correct" existing data for more accurate analysis.

Datasets

While this is a theoretical and computational paper rather than a data-mining one, the authors validated their model using two landmark behavioral datasets from the zebrafish literature:

  • Temizer et al. (2015): Studied looming-evoked escape behavior using a curved interface.
  • Dunn et al. (2016): Studied the same behavior using a flat interface.

By applying their corrections to these existing datasets, the authors demonstrated that the "conflicting" results in the literature were actually consistent once physics was taken into account.

Key Insights and Ideas

  • The Snell Window: Because of refraction, the entire $180^\circ$ horizon above the water is compressed into a cone of only about $97.2^\circ$ from the fish’s perspective. This means stimuli near the edges are incredibly "squashed" and distorted.
  • The "Aha!" Moment on Looming: Two major studies reported wildly different "critical angles" (the size a stimulus must reach to trigger an escape): $21.7^\circ$ vs $72.0^\circ$. The authors show that after correcting for the air-water interface and calculating the true solid angle (the 3D area the stimulus occupies on the eye), this $14\%$ discrepancy shrinks to a negligible $1.3\%$.
  • Receptive Field Dangers: In neuroscience, "receptive field mapping" identifies which part of the visual world a specific neuron responds to. The authors show that failing to correct for Snell’s Law can lead to massive errors in both the estimated position and size of these fields, especially for neurons sensitive to the periphery.

Key Results

  • Discrepancy Reduction: The primary achievement was reconciling the escape behavior literature, reducing a $50.3^\circ$ angular discrepancy between studies to a statistically insignificant difference.
  • Transmittance Effects: The model shows that light transmittance remains high near the center but drops sharply near the edge of the Snell window, effectively creating a "vignetting" effect that researchers must account for when measuring contrast sensitivity.
  • Predictive Errors: Simulations showed that "naive" measurements of receptive fields can either over- or under-estimate the true size of a neuron's field depending on its location relative to the Snell window.

Limitations and Future Work

The authors acknowledge a few simplifying assumptions:

  • Pinhole Model: The model treats the fish eye as a single point. In reality, the fish eye has its own complex optics and a finite pupil size, which would introduce additional blurring not captured here.
  • Fixed Position: The current tool assumes a fixed distance between the fish and the interface ($d_w$). In experiments where fish swim freely, this distance changes constantly, making real-time correction a significant engineering challenge.
  • Hardware Solutions: While the paper offers a computational fix, the authors suggest that future experiments could avoid these issues entirely by using spherical arenas or placing screens inside the water, though these come with their own technical hurdles.

This work serves as a vital reminder that in the quest to map the brain, we cannot afford to ignore the basic physics of the environment.

Summary updated

Abstract

Optical refraction causes light to bend at interfaces between optical media. This phenomenon can significantly distort visual stimuli presented to aquatic animals in water, yet refraction has often been ignored in the design and interpretation of visual neuroscience experiments. Here we provide a computational tool that transforms between projected and received stimuli in order to detect and control these distortions. The tool considers the most commonly encountered interface geometry, and we show that this and other common configurations produce stereotyped distortions. By correcting these distortions, we reduced discrepancies in the literature concerning stimuli that evoke escape behavior, and we expect this tool will help reconcile other confusing aspects of the literature. This tool also aids experimental design, and we illustrate the dangers that uncorrected stimuli pose to receptive field mapping experiments.
BibTeX
@inproceedings{dunn2020correcting,
  author = {Timothy Dunn and James E. Fitzgerald},
  title = {{Correcting for physical distortions in visual stimuli improves reproducibility in zebrafish neuroscience}},
  booktitle = {eLife},
  year = {2020},
  doi = {10.7554/elife.53684},
}
Figure