<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.1 20151215//EN"  "JATS-archivearticle1.dtd"><article article-type="research-article" dtd-version="1.1" xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"><front><journal-meta><journal-id journal-id-type="nlm-ta">elife</journal-id><journal-id journal-id-type="publisher-id">eLife</journal-id><journal-title-group><journal-title>eLife</journal-title></journal-title-group><issn pub-type="epub" publication-format="electronic">2050-084X</issn><publisher><publisher-name>eLife Sciences Publications, Ltd</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">53684</article-id><article-id pub-id-type="doi">10.7554/eLife.53684</article-id><article-categories><subj-group subj-group-type="display-channel"><subject>Short Report</subject></subj-group><subj-group subj-group-type="heading"><subject>Neuroscience</subject></subj-group></article-categories><title-group><article-title>Correcting for physical distortions in visual stimuli improves reproducibility in zebrafish neuroscience</article-title></title-group><contrib-group><contrib contrib-type="author" corresp="yes" id="author-165587"><name><surname>Dunn</surname><given-names>Timothy W</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0002-9381-4630</contrib-id><email>timothy.dunn@duke.edu</email><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="other" rid="fund1"/><xref ref-type="other" rid="fund2"/><xref ref-type="other" rid="fund4"/><xref ref-type="fn" rid="con1"/><xref ref-type="fn" rid="conf1"/></contrib><contrib contrib-type="author" corresp="yes" id="author-28900"><name><surname>Fitzgerald</surname><given-names>James E</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0002-0949-4188</contrib-id><email>fitzgeraldj@janelia.hhmi.org</email><xref ref-type="aff" rid="aff2">2</xref><xref ref-type="other" rid="fund3"/><xref ref-type="other" rid="fund4"/><xref ref-type="fn" rid="con2"/><xref ref-type="fn" rid="conf1"/></contrib><aff id="aff1"><label>1</label><institution>Duke Forge, Duke Global Neurosurgery and Neurology, Departments of Statistical Science and Neurosurgery, Duke University</institution><addr-line><named-content content-type="city">Durham</named-content></addr-line><country>United States</country></aff><aff id="aff2"><label>2</label><institution>Janelia Research Campus, Howard Hughes Medical Institute</institution><addr-line><named-content content-type="city">Ashburn</named-content></addr-line><country>United States</country></aff></contrib-group><contrib-group content-type="section"><contrib contrib-type="editor"><name><surname>Wyart</surname><given-names>Claire</given-names></name><role>Reviewing Editor</role><aff><institution>Institut du Cerveau et la Moelle épinière, Hôpital Pitié-Salpêtrière, Sorbonne Universités, UPMC Univ Paris 06, Inserm, CNRS</institution><country>France</country></aff></contrib><contrib contrib-type="senior_editor"><name><surname>Stainier</surname><given-names>Didier YR</given-names></name><role>Senior Editor</role><aff><institution>Max Planck Institute for Heart and Lung Research</institution><country>Germany</country></aff></contrib></contrib-group><pub-date date-type="publication" publication-format="electronic"><day>24</day><month>03</month><year>2020</year></pub-date><pub-date pub-type="collection"><year>2020</year></pub-date><volume>9</volume><elocation-id>e53684</elocation-id><history><date date-type="received" iso-8601-date="2019-11-16"><day>16</day><month>11</month><year>2019</year></date><date date-type="accepted" iso-8601-date="2020-03-23"><day>23</day><month>03</month><year>2020</year></date></history><permissions><copyright-statement>© 2020, Dunn and Fitzgerald</copyright-statement><copyright-year>2020</copyright-year><copyright-holder>Dunn and Fitzgerald</copyright-holder><ali:free_to_read/><license xlink:href="http://creativecommons.org/licenses/by/4.0/"><ali:license_ref>http://creativecommons.org/licenses/by/4.0/</ali:license_ref><license-p>This article is distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License</ext-link>, which permits unrestricted use and redistribution provided that the original author and source are credited.</license-p></license></permissions><self-uri content-type="pdf" xlink:href="elife-53684-v2.pdf"/><abstract><p>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.</p></abstract><kwd-group kwd-group-type="author-keywords"><kwd>visual stimulus design</kwd><kwd>air-water interface</kwd><kwd>escape behavior</kwd><kwd>zebrafish</kwd><kwd>receptive fields</kwd><kwd>neurobiology</kwd></kwd-group><kwd-group kwd-group-type="research-organism"><title>Research organism</title><kwd>Zebrafish</kwd></kwd-group><funding-group><award-group id="fund1"><funding-source><institution-wrap><institution>Duke Forge</institution></institution-wrap></funding-source><principal-award-recipient><name><surname>Dunn</surname><given-names>Timothy W</given-names></name></principal-award-recipient></award-group><award-group id="fund2"><funding-source><institution-wrap><institution>Duke AI Health</institution></institution-wrap></funding-source><principal-award-recipient><name><surname>Dunn</surname><given-names>Timothy W</given-names></name></principal-award-recipient></award-group><award-group id="fund3"><funding-source><institution-wrap><institution-id institution-id-type="FundRef">http://dx.doi.org/10.13039/100000011</institution-id><institution>Howard Hughes Medical Institute</institution></institution-wrap></funding-source><principal-award-recipient><name><surname>Fitzgerald</surname><given-names>James E</given-names></name></principal-award-recipient></award-group><award-group id="fund4"><funding-source><institution-wrap><institution-id institution-id-type="FundRef">http://dx.doi.org/10.13039/100000002</institution-id><institution>National Institutes of Health</institution></institution-wrap></funding-source><award-id>U01 NS090449</award-id><principal-award-recipient><name><surname>Dunn</surname><given-names>Timothy W</given-names></name><name><surname>Fitzgerald</surname><given-names>James E</given-names></name></principal-award-recipient></award-group><funding-statement>The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.</funding-statement></funding-group><custom-meta-group><custom-meta specific-use="meta-only"><meta-name>Author impact statement</meta-name><meta-value>Computational analyses quantitatively account for optical refraction at air-water interfaces to enable visual neuroscientists to present distortion-free stimuli to underwater animals.</meta-value></custom-meta></custom-meta-group></article-meta></front><body><p>Breakthrough technologies for monitoring and manipulating single-neuron activity provide unprecedented opportunities for whole-brain neuroscience in larval zebrafish (<xref ref-type="bibr" rid="bib1">Ahrens et al., 2012</xref>; <xref ref-type="bibr" rid="bib2">Ahrens et al., 2013</xref>; <xref ref-type="bibr" rid="bib15">Portugues et al., 2014</xref>; <xref ref-type="bibr" rid="bib16">Prevedel et al., 2014</xref>; <xref ref-type="bibr" rid="bib21">Vladimirov et al., 2014</xref>; <xref ref-type="bibr" rid="bib6">Dunn et al., 2016b</xref>; <xref ref-type="bibr" rid="bib14">Naumann et al., 2016</xref>; <xref ref-type="bibr" rid="bib13">Kim et al., 2017</xref>; <xref ref-type="bibr" rid="bib22">Vladimirov et al., 2018</xref>). Understanding the neural mechanisms of visually guided behavior also requires precise stimulus control, but little prior research has accounted for physical distortions that result from refraction and reflection at an air-water interface that usually separates the projected stimulus from the fish (<xref ref-type="bibr" rid="bib18">Sajovic and Levinthal, 1983</xref>; <xref ref-type="bibr" rid="bib19">Stowers et al., 2017</xref>; <xref ref-type="bibr" rid="bib23">Zhang and Arrenberg, 2019</xref>). In a typical zebrafish visual neuroscience experiment, an animal in water gazes at stimuli on a screen separated from the water by a small (~500 µm) region of air (<xref ref-type="fig" rid="fig1">Figure 1a</xref>, top). When light traveling from the screen reaches the air-water interface, it is refracted according to Snell’s law (<xref ref-type="bibr" rid="bib12">Hecht, 2016</xref>; <xref ref-type="fig" rid="fig1">Figure 1b</xref>, bottom). At flat interfaces, a common configuration used in the literature (<xref ref-type="bibr" rid="bib1">Ahrens et al., 2012</xref>; <xref ref-type="bibr" rid="bib21">Vladimirov et al., 2014</xref>; <xref ref-type="bibr" rid="bib5">Dunn et al., 2016a</xref>), this refraction reduces incident light angles, thereby translating and distorting the images that reach the fish (black vs. brown arrows in <xref ref-type="fig" rid="fig1">Figure 1a</xref>, bottom). By solving Snell’s equations for this arena configuration (Appendix 1), we determined the apparent position of a point on the screen, <inline-formula><mml:math id="inf1"><mml:mi>θ</mml:mi></mml:math></inline-formula>, as a function of its true position, <inline-formula><mml:math id="inf2"><mml:mi>θ</mml:mi><mml:mi>'</mml:mi></mml:math></inline-formula> (<xref ref-type="fig" rid="fig1">Figure 1b</xref>). Snell’s law implies that distant stimuli appear to the fish at the asymptotic value of <inline-formula><mml:math id="inf3"><mml:mi>θ</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi><mml:mi>'</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula> (~48.6°). This implies that the entire horizon is compressed into a 97.2° “Snell window” whose size does not depend on the distances between the fish and the interface (<italic>d<sub>w</sub></italic>) or the screen and the interface (<italic>d<sub>a</sub></italic>), but the distance ratio <italic>d<sub>a</sub></italic>/<italic>d<sub>w</sub></italic> determines the abruptness of the <inline-formula><mml:math id="inf4"><mml:mi>θ</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi><mml:mi>'</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula> transformation. We also calculated the total light transmittance according to the Fresnel equations (<xref ref-type="fig" rid="fig1">Figure 1b</xref>, right). These two effects have a profound impact on visual stimuli (<xref ref-type="fig" rid="fig1">Figure 1c</xref>). The plastic dish that contains the water has little impact (Appendix 1). Physical distortions thus have the potential to affect fundamental conclusions drawn from studies of visual processing and visuomotor transformations.</p><fig id="fig1" position="float"><label>Figure 1.</label><caption><title>Snell's law describes visual stimulus distortions that occur via air-water interfaces encountered in a typical experiment.</title><p>(<bold>a</bold>) <italic>Top</italic>, In a typical zebrafish neuroscience experiment, an image is presented via projection onto a screen underneath an animal in a water-filled plastic dish. <italic>Middle</italic>, A small layer of air separates the screen from the dish and water. <italic>Bottom box</italic>, This configuration causes the image received at the eye (brown arrow) to be distorted and translated relative to the projected image (black arrow). We can describe this transformation as a relationship between the true position of a projected point (<inline-formula><mml:math id="inf5"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mi mathvariant="normal">′</mml:mi></mml:msup></mml:mrow></mml:mstyle></mml:math></inline-formula>) and its apparent position (<inline-formula><mml:math id="inf6"><mml:mi>θ</mml:mi></mml:math></inline-formula>), depending on the ratio between the distance from the air-water interface to the screen (<inline-formula><mml:math id="inf7"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>) and the distance from the eye to the air-water interface (<inline-formula><mml:math id="inf8"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>). To solve the transformation, we use Snell’s law (illustrated in inset and panel <italic>b</italic>), which relates the angle at which a light ray leaves the air-water interface (<inline-formula><mml:math id="inf9"><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>) to the angle at which it hits the interface (<inline-formula><mml:math id="inf10"><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>), depending on the refractive indices of the media (air, <inline-formula><mml:math id="inf11"><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:math></inline-formula>; water, <inline-formula><mml:math id="inf12"><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>1.333</mml:mn></mml:math></inline-formula>). Note that the effects of the plastic dish are typically minor (Appendix 1). (<bold>b</bold>) <italic>Top left,</italic> the apparent position of a point (<inline-formula><mml:math id="inf13"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula>) as a function of its true position (<inline-formula><mml:math id="inf14"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mi mathvariant="normal">′</mml:mi></mml:msup></mml:mrow></mml:mstyle></mml:math></inline-formula>), and its inverse (<italic>inset</italic>), for <inline-formula><mml:math id="inf15"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>10</mml:mn></mml:math></inline-formula> (pink) and <inline-formula><mml:math id="inf16"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>0.1</mml:mn></mml:mrow></mml:mstyle></mml:math></inline-formula> (blue). <italic>Top right</italic>, fraction of light transmitted into the water as a function of <inline-formula><mml:math id="inf17"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mi mathvariant="normal">′</mml:mi></mml:msup></mml:mrow></mml:mstyle></mml:math></inline-formula> for the same two values of <inline-formula><mml:math id="inf18"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. <italic>Bottom box</italic>, Using Snell’s law, we derived <inline-formula><mml:math id="inf19"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mi mathvariant="normal">′</mml:mi></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math></inline-formula> (<italic>top left inset</italic>), whose inverse we take numerically to arrive at <inline-formula><mml:math id="inf20"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>θ</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>θ</mml:mi><mml:mi mathvariant="normal">′</mml:mi></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math></inline-formula> (<italic>top left</italic>). (<bold>c</bold>) Simulated distortion of a standard sinusoidal grating. Yellow circle denotes the extent of the Snell window (~97.2° visual angle). The virtual screen is modeled as a 4 × 4 cm square with 250 pixels/cm resolution, and we fixed the total distance between the fish and the virtual screen, <inline-formula><mml:math id="inf21"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, to be 1 cm. Note that only a fraction of the screen is apparent when <inline-formula><mml:math id="inf22"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is small (<italic>bottom left</italic>), but a distorted view of the full screen appears within the Snell window when <inline-formula><mml:math id="inf23"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> becomes large (<italic>bottom right</italic>). Contrast axes are matched across panels and saturate to de-emphasize the ring of light at the Snell window, whose magnitude would be attenuated by unmodeled optics in the fish eye (Materials and methods).</p></caption><graphic mime-subtype="tiff" mimetype="image" xlink:href="elife-53684-fig1-v2.tif"/></fig><p>The quantitative merits of correcting for refraction are apparent when comparing two recent studies of visually evoked escape behavior in larval zebrafish. Although <xref ref-type="bibr" rid="bib20">Temizer et al. (2015)</xref> and <xref ref-type="bibr" rid="bib5">Dunn et al., 2016a</xref> both found that a critical size of looming stimuli triggered escape behavior, they reported surprisingly different values for the critical angular size (21.7°±4.9° and 72.0°±2.5°, respectively, mean ±95% CI). This naively implies that the critical stimulus of Dunn et al. occupied 9 times the solid angle of Temizer et al. (1.02 [+0.14,–0.11] steradians and 0.11 [+0.06,–0.04] steradians, respectively, mean [95% CI]) (Materials and methods). This large size discrepancy initially raises doubt to the notion that a stimulus size threshold triggers the escape (<xref ref-type="bibr" rid="bib11">Hatsopoulos et al., 1995</xref>; <xref ref-type="bibr" rid="bib9">Gabbiani et al., 1999</xref>; <xref ref-type="bibr" rid="bib7">Fotowat and Gabbiani, 2011</xref>). However, a major difference in experimental design is that Temizer et al. showed stimuli from the front through a curved air-water interface, and Dunn et al. showed stimuli from below through a flat air-water interface (<xref ref-type="fig" rid="fig2">Figure 2a</xref>). Correcting the Dunn et al. stimuli with Snell’s law, and again quantifying the size of irregularly shaped stimuli with their solid angle, we found that the fish exhibited escape responses when the stimulus spanned just 0.24 steradians (<xref ref-type="fig" rid="fig2">Figure 2b</xref>, Materials and methods, Appendix 1, <xref ref-type="video" rid="fig2video1">Figure 2—video 1</xref>). The same correction applied to Temizer et al. sets the critical size at 0.08 steradians (<xref ref-type="fig" rid="fig2">Figure 2b</xref>, Materials and methods, Appendix 2). This leaves a discrepancy of 0.16 steradians, which is much smaller than the original solid angle discrepancy of 0.91 steradians (<xref ref-type="fig" rid="fig2">Figure 2c</xref>, <italic>black</italic>). Correcting with Snell’s law thus markedly reduced this discrepancy in the literature, shrinking a 9-fold size difference down to 3-fold (<xref ref-type="fig" rid="fig2">Figure 2c</xref>, <italic>blue</italic>). The small remaining difference could indicate an ethologically interesting dependence of behavior on the spatial location of the looming stimulus (<xref ref-type="bibr" rid="bib5">Dunn et al., 2016a</xref>; <xref ref-type="bibr" rid="bib20">Temizer et al., 2015</xref>).</p><fig-group><fig id="fig2" position="float"><label>Figure 2.</label><caption><title>Snell's law corrections reduce discrepancies in the literature and predict effects on receptive field mapping.</title><p>(<bold>a</bold>) In the zebrafish literature, two configurations were used to probe the neural circuitry processing looming stimuli that expand over time. In one, fish were embedded off-center in a curved plastic dish and a screen presented stimuli in front of the animal through the curved interface of the dish (<xref ref-type="bibr" rid="bib20">Temizer et al., 2015</xref>). In the other, fish were embedded (or swam freely) in a similar dish, but stimuli were presented on a screen below the dish (as in <xref ref-type="fig" rid="fig1">Figure 1a</xref>; <xref ref-type="bibr" rid="bib5">Dunn et al., 2016a</xref>). (<bold>b</bold>) Plot detailing the changes to the looming expansion time courses after correcting for Snell’s law and converting to solid angle, which more accurately describes the irregular stimulus shapes produced by the optical distortion (Materials and methods). Curves corresponding to Dunn et al. and Temizer et al. are plotted in black and magenta, respectively. (<bold>c</bold>) Snell’s law corrections reduced the discrepancy between Dunn et al. and Temizer et al. <italic>Black</italic>: Snell’s law corrections decreased the absolute magnitude of the discrepancy (Dunn et al. critical solid angle minus Temizer et al. critical solid angle). We report discrepancies as fractions of the maximal solid angle (4π steradians) to aid intuition for stimulus sizes. <italic>Blue</italic>: Snell’s law corrections also decreased the relative magnitude of the discrepancy (Dunn et al. size divided by Temizer et al. size). (<bold>d</bold>) In a simple receptive field (RF) mapping experiment, dots appear at different positions on a screen (<italic>Top</italic>), and behavioral or neural responses (<italic>Bottom</italic>) are measured. In the latter case, a map of a single neuron’s RF is constructed by assigning the measured <inline-formula><mml:math id="inf24"><mml:mi>Δ</mml:mi><mml:mi>F</mml:mi><mml:mo>/</mml:mo><mml:mi>F</mml:mi></mml:math></inline-formula> signal to the point on the screen that evoked the <inline-formula><mml:math id="inf25"><mml:mi>Δ</mml:mi><mml:mi>F</mml:mi><mml:mo>/</mml:mo><mml:mi>F</mml:mi></mml:math></inline-formula> response. (<bold>e</bold>) Snell’s law predicts changes in RF peak positions (<italic>Top</italic>) and RF sizes (<italic>Bottom</italic>). The magnitude of these changes depends on the true RF position (<italic>x</italic>-axis), true RF size (line color), and <inline-formula><mml:math id="inf26"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> (warm versus cool colors). True RF positions and sizes correspond to the means and standard deviations of Gaussian receptive fields. The black dots indicate the RFs in <italic>panel f, top</italic>, and the gray dots show the RFs in <italic>panel f</italic>, <italic>bottom</italic>. (<bold>f</bold>) Illustrations of two simulated &quot;true&quot; RFs and their corresponding measurement distortions predicted using Snell’s law. For simplicity, we show only one quadrant of the screen space, with the fish at the top left corner. The brown circle denotes the extent of the Snell window. As RFs are mapped directly to screen pixels, the axes are nonlinear in terms of angle relative to the fish (top left corner). Each blue &quot;x&quot; denotes the peak position of the RF displayed in each plot. The dashed blue border denotes the half-maximum value of each RF, and the size of the RF is the solid angle within one of these borders.</p></caption><graphic mime-subtype="tiff" mimetype="image" xlink:href="elife-53684-fig2-v2.tif"/></fig><media id="fig2video1" mime-subtype="mp4" mimetype="video" xlink:href="elife-53684-fig2-video1.mp4"><label>Figure 2—video 1.</label><caption><title>Optical refraction distorts the appearance of looming visual stimuli.</title><p><italic>Left</italic>: Example looming stimulus that grows with a time course mimicking an approaching object. Here the looming stimulus is a dark circle, the time course of its diameter corresponds to the <xref ref-type="bibr" rid="bib5">Dunn et al. (2016a)</xref> &quot;stimulus angle&quot; curve in <xref ref-type="fig" rid="fig2">Figure 2b</xref>, and the stimulus eventually fills the screen. This is an example of a visual stimulus that would be projected directly onto the screen by Dunn et al. <italic>Right</italic>: Illustration of what the example looming stimulus would look like inside the water. Because of the flat air-water interface that separates the fish from the screen, eccentric regions of the visual field are compressed into the Snell window. The visual stimulus is therefore irregularly shaped. Since the looming stimulus is presented off-center, it is initially compressed within a small region near the periphery of the Snell window. The stimulus grows to eventually fill the entire Snell window.</p></caption></media></fig-group><p>Accounting for optical distortions will be critical for understanding other fundamental properties of the zebrafish visual system. For example, a basic property of many visual neurons is that they respond strongest to stimuli presented in one specific region of the visual field, termed their receptive field (RF) (<xref ref-type="bibr" rid="bib10">Hartline, 1938</xref>; <xref ref-type="bibr" rid="bib17">Ringach, 2004</xref>; <xref ref-type="bibr" rid="bib23">Zhang and Arrenberg, 2019</xref>). When we simulated the effect of Snell’s law on RF mapping under typical experimental conditions (<xref ref-type="fig" rid="fig2">Figure 2d</xref>), we predicted substantial errors in both the position and size of naively measured receptive fields (<xref ref-type="fig" rid="fig2">Figure 2e</xref>, Materials and methods). Depending on the properties of the true RF, its position and size could be either over- or under-estimated (<xref ref-type="fig" rid="fig2">Figure 2e–f</xref>), with the most drastic errors occurring for small RFs appearing near the edge of the Snell window.</p><p>Future experiments could avoid distortions altogether by adjusting experimental hardware. For instance, fish could be immobilized in the center of water-filled spheres (<xref ref-type="bibr" rid="bib23">Zhang and Arrenberg, 2019</xref>; <xref ref-type="bibr" rid="bib3">Dehmelt et al., 2019</xref>), or air interfaces could be removed altogether, such as by placing a projection screen inside the water-filled arena. But in practice the former would restrict naturalistic behavior, and the latter would reduce light diffusion by shrinking the refractive index mismatch between the diffuser and transparent medium (water vs. air) that typical light diffusers use to transmit stimuli over a large range of angles. An engineering solution might build diffusive elements into the body of the fish tank (<xref ref-type="bibr" rid="bib19">Stowers et al., 2017</xref>; <xref ref-type="bibr" rid="bib8">Franke et al., 2019</xref>). Alternatively, we propose a simple computational solution to account for expected distortions when designing stimuli or analyzing data. Our tool (<ext-link ext-link-type="uri" xlink:href="https://www.github.com/spoonsso/snell_tool/">https://www.github.com/spoonsso/snell_tool/</ext-link>) converts between normal and distorted image representations for the most common zebrafish experiment configuration (<xref ref-type="fig" rid="fig1">Figure 1a</xref>), and other geometries could be analyzed similarly. This tool will therefore improve the interpretability and reproducibility of innovative experiments that capitalize on the unique experimental capabilities available in zebrafish neuroscience.</p><sec id="s1" sec-type="materials|methods"><title>Materials and methods</title><p>See Appendix 1 and Appendix 2 for the geometric consequences of Snell’s law at flat and curved interfaces, respectively.</p><sec id="s1-1"><title>Implications of the Fresnel equations</title><p>Only a portion of the incident light is transmitted into the water to reach the eye. We calculated the fraction of transmitted light according to the Fresnel equations. Assuming the light is unpolarized,<disp-formula id="equ1"><mml:math id="m1"><mml:mi>T</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn><mml:mo>-</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>R</mml:mi></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>R</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula><mml:math id="inf27"><mml:mi>T</mml:mi></mml:math></inline-formula> is the fraction of light transmitted across an air-water interface at incident angle <inline-formula><mml:math id="inf28"><mml:msub><mml:mrow><mml:mi mathvariant="normal">ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="normal">ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula> (See Appendices 1, 2), <inline-formula><mml:math id="inf29"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>ψ</mml:mi><mml:mi>w</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>θ</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> is the angle of the refracted light ray in water, and<disp-formula id="equ2"><mml:math id="m2"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mtable columnalign="left left" columnspacing="1em" rowspacing="4pt"><mml:mtr><mml:mtd><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo></mml:mtd><mml:mtd><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>−</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi></mml:mrow></mml:mfrac><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo></mml:mtd><mml:mtd><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi><mml:mo>−</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mstyle></mml:math></disp-formula>are the reflectances for s-polarized (i.e. perpendicular) and p-polarized (i.e. parallel) light, respectively. When including the plastic dish in our simulations, we modified these equations to separately calculate the transmission fractions across the air-plastic and the plastic-water interfaces. We assumed that the full transmission fraction is the product of these two factors, thereby ignoring the possibility of multiple reflections within the plastic.</p></sec><sec id="s1-2"><title>Illustrating distorted sinusoidal gratings</title><p>For all image simulations in <xref ref-type="fig" rid="fig1">Figure 1c</xref>, we neglected the plastic and fixed the total distance between the fish and the virtual screen, <inline-formula><mml:math id="inf30"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, to be 1 cm, a typical distance in real-world experiments. The virtual screen was considered to be a 4 × 4 cm square with 250 pixels/cm resolution. Here we assumed that the virtual screen emits light uniformly at all angles, but this assumption is violated by certain displays, and our computational tool allows the user to specify alternate angular emission profiles. To transform images on the virtual screen, we shifted each light ray (i.e. image pixel) according to Snell’s law, scaled its intensity according to the Fresnel equations, and added the intensity value to a bin at the resulting apparent position. This simple model treats the fish eye as a pinhole detector, whereas real photoreceptors blur visual signals on a spatial scale determined by their receptive field. Consequently, our simulation compresses a large amount of light onto the overly thin border of the Snell window, and we saturated the grayscale color axes in <xref ref-type="fig" rid="fig1">Figure 1c</xref> to avoid this visually distracting artifact.</p><p>To make the image as realistic as possible, we mimicked real projector conditions using gamma-encoded gratings with spatial frequency 1 cycle / cm, such that<disp-formula id="equ3"><mml:math id="m3"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mi>x</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mrow><mml:mn>1</mml:mn><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mn>2.2</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mtext> </mml:mtext><mml:mi>sin</mml:mi><mml:mo>⁡</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mstyle></mml:math></disp-formula>with <inline-formula><mml:math id="inf31"><mml:mi>x</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula> ranging from 1.0 to 500.0 lux, a standard range of physical illuminance for a lab projector. The exponent on the left represents a typical display gamma encoding with gamma = 2.2. To reduce moiré artifacts arising from ray tracing, we used a combination of ray supersampling (averaging the rays emanating from 16 sub-pixels for each virtual screen pixel) and stochastic sampling (the position of each ray was randomly jittered between -1 and 1 sub-pixels from its native position) (<xref ref-type="bibr" rid="bib4">Dippé and Wold, 1985</xref>). In <xref ref-type="fig" rid="fig1">Figure 1c</xref>, we display the result of these operations followed by a gamma compression to mimic the perceptual encoding of the presented stimulus.</p></sec><sec id="s1-3"><title>Corrections to looming visual stimuli</title><p>We approximated the geometric parameters from <xref ref-type="bibr" rid="bib5">Dunn et al. (2016a)</xref> (flat air-water interface, <italic>d<sub>a</sub></italic> = 0.5 mm, <italic>d<sub>w</sub></italic> = 3 mm, <italic>d<sub>p</sub></italic> = 1 mm, stimulus offset from the fish by 10 mm along the screen) and <xref ref-type="bibr" rid="bib20">Temizer et al., 2015</xref> (curved air-water interface, <italic>d<sub>a</sub></italic> = 8 mm, <italic>d<sub>w</sub></italic> = 2 mm, <italic>d<sub>p</sub></italic> = 1 mm, r = 17.5 mm, stimulus centered) to create Snell-transformed images of circular stimuli with sizes growing over time (<xref ref-type="fig" rid="fig2">Figure 2a–c</xref>). We used a refractive index of <italic>n<sub>p</sub></italic> = 1.55 for the polystyrene plastic. While Dunn et al. collected data from freely swimming fish, the height of the water was kept at approximately 5 mm, and 3 mm reflects a typical swim depth. Since freely swimming zebrafish can adjust their depth in water, it’s an approximation to treat <italic>d<sub>w</sub></italic> as constant.</p><p>We quantified the size of each transformed stimulus with its solid angle, the surface area of the stimulus shape projected onto the unit sphere. To calculate the solid angle for Temizer et al., we used the formula for a spherical cap, <inline-formula><mml:math id="inf32"><mml:mi>A</mml:mi><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:mi>π</mml:mi><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>-</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="normal">cos</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:math></inline-formula>, where <inline-formula><mml:math id="inf33"> <mml:mi/><mml:mi>A</mml:mi></mml:math></inline-formula> is the solid angle and <inline-formula><mml:math id="inf34"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mn>2</mml:mn><mml:mi>θ</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> is the apex angle. To calculate the solid angle for Dunn et al., in which stimuli were not spherical caps, we first represented stimulus border pixels in a spherical coordinate system locating the fish at the origin. The radial coordinate does not affect the solid angle, so we described each border pixel by two angles: the latitude, <italic>α</italic>, and longitude, <inline-formula><mml:math id="inf35"><mml:mi>β</mml:mi></mml:math></inline-formula>. To calculate the area, we used an equal-area sinusoidal (Mercator) projection given by<disp-formula id="equ4"><mml:math id="m4"><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo> <mml:mi/><mml:mfenced separators="|"><mml:mrow><mml:mrow><mml:mrow><mml:mi>β</mml:mi> <mml:mi mathvariant="normal">cos</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mi>α</mml:mi></mml:mrow></mml:mrow><mml:mo>,</mml:mo><mml:mi>α</mml:mi></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:math></disp-formula>which projects an arbitrary shape on the surface of a sphere onto the Cartesian plane. While distances and shapes are not preserved in this projection, area as a fraction of the sphere’s surface area is maintained. Thus, we could calculate the solid area of the stimulus in this projection by finding the area of the projected 2D polygon. To calculate the absolute and relative discrepancy 95% confidence intervals in <xref ref-type="fig" rid="fig2">Figure 2c</xref>, we used error propagation formulae for the difference and division of two distributions, respectively.</p></sec><sec id="s1-4"><title>Receptive field mapping</title><p>We simulated receptive field (RF) mapping experiments by tracing light paths from single pixels on a virtual screen to the fish (<xref ref-type="fig" rid="fig2">Figure 2d-f</xref>). We modeled a neuron’s RF as a Gaussian function on the sphere, defined the “true RF” to be the pixel-wise response pattern that would occur in the absence of the air-water interface, and defined the “apparent RF” as the pixel-wise response pattern that would be induced with light that bends according to Snell’s law at an air-water interface. More precisely, we modeled the neural response to pixel activation at position <inline-formula><mml:math id="inf36"><mml:mi>x</mml:mi></mml:math></inline-formula> as<disp-formula id="equ5"><mml:math id="m5"><mml:mi>F</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mi>T</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mi>P</mml:mi><mml:mo>(</mml:mo><mml:mi>ρ</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi>μ</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mi>σ</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula><mml:math id="inf37"><mml:mi>T</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:math></inline-formula> is the fraction of light transmitted (Fresnel equations), <inline-formula><mml:math id="inf38"> <mml:mi/><mml:msub><mml:mrow><mml:mi>μ</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula><mml:math id="inf39"><mml:msub><mml:mrow><mml:mi mathvariant="normal">σ</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are the mean and standard deviation of the Gaussian RF, <inline-formula><mml:math id="inf40"><mml:mi>ρ</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi>μ</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:math></inline-formula> is the distance along a great circle from the center of the RF to the pixel’s projected retinal location, and <inline-formula><mml:math id="inf41"><mml:mi>P</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>ρ</mml:mi><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mi>σ</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mi>e</mml:mi></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:msup><mml:mrow><mml:mi>ρ</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:mo>/</mml:mo><mml:mfenced separators="|"><mml:mrow><mml:mn>2</mml:mn><mml:msubsup><mml:mrow><mml:mi>σ</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow></mml:msup> <mml:mi/></mml:math></inline-formula> is the Gaussian RF shape. We calculated the great circle distance between points on the sphere as<disp-formula id="equ6"><mml:math id="m6"><mml:mrow><mml:mrow><mml:mi mathvariant="normal">cos</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mi>ρ</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi>μ</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo> <mml:mi/><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="normal">α</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="normal">α</mml:mi></mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow><mml:mo>+</mml:mo> <mml:mi/><mml:mrow><mml:mrow><mml:mi mathvariant="normal">cos</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="normal">α</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">cos</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="normal">α</mml:mi></mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">cos</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>β</mml:mi></mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>β</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula><mml:math id="inf42"><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="normal">α</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi>β</mml:mi></mml:mrow><mml:mrow><mml:mi>R</mml:mi><mml:mi>F</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:math></inline-formula> are the latitude and longitude coordinate of the RF center, and <inline-formula><mml:math id="inf43"><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="normal">α</mml:mi></mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi>β</mml:mi></mml:mrow><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:math></inline-formula> are the latitude and longitude coordinates of the projected pixel location. We quantified the position of the RF as the maximum of <inline-formula><mml:math id="inf44"><mml:mi>F</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula>, converted to an angular coordinate along the screen. We quantified RF area as the solid angle of the shape formed by thresholding <inline-formula><mml:math id="inf45"><mml:mi>F</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula> at half its maximal value.</p></sec><sec id="s1-5"><title>Computational tool for simulating and correcting optical distortions</title><p>With this paper, we provide a computation tool for visualizing and correcting distortions (<ext-link ext-link-type="uri" xlink:href="https://github.com/spoonsso/snell_tool/">https://github.com/spoonsso/snell_tool/</ext-link>). The tool is written in Python and uses standard image processing libraries. The tool can be launched virtually over the web, without any need to install new software, using the MyBinder link in the README file hosted on the github repository. The source code can also be downloaded and run on the user’s local machine.</p><p>The uses and parameters of the tool are described in detail in an example notebook in the repository (<italic>snell_example.ipynb</italic>). In brief, the tool is implemented only for flat interfaces with the assumptions described in Appendix 1, and it can model distortions through three media (i.e. with a plastic interface between air and water). It can also model displays that emit light with non-uniform angular profiles. Key customizable parameters include the screen size, screen resolution, screen distance, media thicknesses, media refractive indices, and gamma encoding. As described in Illustrating distorted sinusoidal gratings, the tool uses a combination of ray super-sampling and stochastic sampling to reduce moiré artifacts arising from ray tracing.</p><p>The Python notebook illustrates two primary use cases of the tool, though the tool’s library is flexible enough to be adopted for other tasks. First, it allows the user to input an image to see its distorted form under the assumptions of the model. Thus, it recreates <xref ref-type="fig" rid="fig1">Figure 1c</xref>, but for any arbitrary grayscale stimulus, and for a range of user-specified experimental configurations. Second, it allows the user to input an undistorted target image, and the tool inverts the distortion process to suggest an image that could be displayed during an experiment to approximately produce the target from the point of view of the fish. In the tool’s example notebook, we demonstrate this inversion process using a checkered ball stimulus. Importantly, note that some stimuli will be physically impossible to correct (e.g. undistorted image content cannot be delivered outside the Snell window).</p></sec></sec></body><back><ack id="ack"><title>Acknowledgements</title><p>We thank Damon Clark, Ruben Portugues, and Kristen Severi for helpful comments on the manuscript. We thank Eva Naumann for discussions regarding light diffusion in the laboratory and for sharing fish icons for the figures. We also thank Florian Engert and Haim Sompolinsky for early support and partial funding of the project (NIH grant U01 NS090449). TWD was supported by Duke Forge and Duke AI Health. JEF was supported by the Howard Hughes Medical Institute.</p></ack><sec id="s2" sec-type="additional-information"><title>Additional information</title><fn-group content-type="competing-interest"><title>Competing interests</title><fn fn-type="COI-statement" id="conf1"><p>No competing interests declared</p></fn></fn-group><fn-group content-type="author-contribution"><title>Author contributions</title><fn fn-type="con" id="con1"><p>Conceptualization, Software, Formal analysis, Funding acquisition, Validation, Investigation, Visualization, Methodology, Project administration, Writing – original draft, Writing – review and editing</p></fn><fn fn-type="con" id="con2"><p>Conceptualization, Formal analysis, Funding acquisition, Validation, Investigation, Methodology, Project administration, Writing – original draft, Writing – review and editing</p></fn></fn-group></sec><sec id="s3" sec-type="supplementary-material"><title>Additional files</title><supplementary-material id="transrepform"><label>Transparent reporting form</label><media mime-subtype="docx" mimetype="application" xlink:href="elife-53684-transrepform-v2.docx"/></supplementary-material></sec><sec id="s4" sec-type="data-availability"><title>Data availability</title><p>No data were collected for this theoretical manuscript.</p></sec><ref-list><title>References</title><ref id="bib1"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ahrens</surname> <given-names>MB</given-names></name><name><surname>Li</surname> <given-names>JM</given-names></name><name><surname>Orger</surname> <given-names>MB</given-names></name><name><surname>Robson</surname> <given-names>DN</given-names></name><name><surname>Schier</surname> <given-names>AF</given-names></name><name><surname>Engert</surname> <given-names>F</given-names></name><name><surname>Portugues</surname> <given-names>R</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Brain-wide neuronal dynamics during motor adaptation in zebrafish</article-title><source>Nature</source><volume>485</volume><fpage>471</fpage><lpage>477</lpage><pub-id pub-id-type="doi">10.1038/nature11057</pub-id><pub-id pub-id-type="pmid">22622571</pub-id></element-citation></ref><ref id="bib2"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ahrens</surname> <given-names>MB</given-names></name><name><surname>Orger</surname> <given-names>MB</given-names></name><name><surname>Robson</surname> <given-names>DN</given-names></name><name><surname>Li</surname> <given-names>JM</given-names></name><name><surname>Keller</surname> <given-names>PJ</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Whole-brain functional imaging at cellular resolution using light-sheet microscopy</article-title><source>Nature Methods</source><volume>10</volume><fpage>413</fpage><lpage>420</lpage><pub-id pub-id-type="doi">10.1038/nmeth.2434</pub-id><pub-id pub-id-type="pmid">23524393</pub-id></element-citation></ref><ref id="bib3"><element-citation publication-type="preprint"><person-group person-group-type="author"><name><surname>Dehmelt</surname> <given-names>FA</given-names></name><name><surname>Meier</surname> <given-names>R</given-names></name><name><surname>Hinz</surname> <given-names>J</given-names></name><name><surname>Yoshimatsu</surname> <given-names>T</given-names></name><name><surname>Simacek</surname> <given-names>CA</given-names></name><name><surname>Wang</surname> <given-names>K</given-names></name><name><surname>Baden</surname> <given-names>T</given-names></name><name><surname>Arrenberg</surname> <given-names>AB</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Spherical arena reveals optokinetic response tuning to stimulus location size and frequency across entire visual field of larval zebrafish</article-title><source>bioRxiv</source><pub-id pub-id-type="doi">10.1101/754408</pub-id></element-citation></ref><ref id="bib4"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dippé</surname> <given-names>MAZ</given-names></name><name><surname>Wold</surname> <given-names>EH</given-names></name></person-group><year iso-8601-date="1985">1985</year><article-title>Antialiasing through stochastic sampling</article-title><source>ACM SIGGRAPH Computer Graphics</source><volume>19</volume><fpage>69</fpage><lpage>78</lpage><pub-id pub-id-type="doi">10.1145/325165.325182</pub-id></element-citation></ref><ref id="bib5"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dunn</surname> <given-names>TW</given-names></name><name><surname>Gebhardt</surname> <given-names>C</given-names></name><name><surname>Naumann</surname> <given-names>EA</given-names></name><name><surname>Riegler</surname> <given-names>C</given-names></name><name><surname>Ahrens</surname> <given-names>MB</given-names></name><name><surname>Engert</surname> <given-names>F</given-names></name><name><surname>Del Bene</surname> <given-names>F</given-names></name></person-group><year iso-8601-date="2016">2016a</year><article-title>Neural circuits underlying visually evoked escapes in larval zebrafish</article-title><source>Neuron</source><volume>89</volume><fpage>613</fpage><lpage>628</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2015.12.021</pub-id><pub-id pub-id-type="pmid">26804997</pub-id></element-citation></ref><ref id="bib6"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dunn</surname> <given-names>TW</given-names></name><name><surname>Mu</surname> <given-names>Y</given-names></name><name><surname>Narayan</surname> <given-names>S</given-names></name><name><surname>Randlett</surname> <given-names>O</given-names></name><name><surname>Naumann</surname> <given-names>EA</given-names></name><name><surname>Yang</surname> <given-names>CT</given-names></name><name><surname>Schier</surname> <given-names>AF</given-names></name><name><surname>Freeman</surname> <given-names>J</given-names></name><name><surname>Engert</surname> <given-names>F</given-names></name><name><surname>Ahrens</surname> <given-names>MB</given-names></name></person-group><year iso-8601-date="2016">2016b</year><article-title>Brain-wide mapping of neural activity controlling zebrafish exploratory locomotion</article-title><source>eLife</source><volume>5</volume><elocation-id>e12741</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.12741</pub-id><pub-id pub-id-type="pmid">27003593</pub-id></element-citation></ref><ref id="bib7"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Fotowat</surname> <given-names>H</given-names></name><name><surname>Gabbiani</surname> <given-names>F</given-names></name></person-group><year iso-8601-date="2011">2011</year><article-title>Collision detection as a model for sensory-motor integration</article-title><source>Annual Review of Neuroscience</source><volume>34</volume><fpage>1</fpage><lpage>19</lpage><pub-id pub-id-type="doi">10.1146/annurev-neuro-061010-113632</pub-id><pub-id pub-id-type="pmid">21391815</pub-id></element-citation></ref><ref id="bib8"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Franke</surname> <given-names>K</given-names></name><name><surname>Maia Chagas</surname> <given-names>A</given-names></name><name><surname>Zhao</surname> <given-names>Z</given-names></name><name><surname>Zimmermann</surname> <given-names>MJ</given-names></name><name><surname>Bartel</surname> <given-names>P</given-names></name><name><surname>Qiu</surname> <given-names>Y</given-names></name><name><surname>Szatko</surname> <given-names>KP</given-names></name><name><surname>Baden</surname> <given-names>T</given-names></name><name><surname>Euler</surname> <given-names>T</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>An arbitrary-spectrum spatial visual stimulator for vision research</article-title><source>eLife</source><volume>8</volume><elocation-id>e48779</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.48779</pub-id><pub-id pub-id-type="pmid">31545172</pub-id></element-citation></ref><ref id="bib9"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gabbiani</surname> <given-names>F</given-names></name><name><surname>Krapp</surname> <given-names>HG</given-names></name><name><surname>Laurent</surname> <given-names>G</given-names></name></person-group><year iso-8601-date="1999">1999</year><article-title>Computation of object approach by a wide-field, motion-sensitive neuron</article-title><source>The Journal of Neuroscience</source><volume>19</volume><fpage>1122</fpage><lpage>1141</lpage><pub-id pub-id-type="doi">10.1523/JNEUROSCI.19-03-01122.1999</pub-id><pub-id pub-id-type="pmid">9920674</pub-id></element-citation></ref><ref id="bib10"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hartline</surname> <given-names>HK</given-names></name></person-group><year iso-8601-date="1938">1938</year><article-title>The response of single optic nerve fibers</article-title><source>The American Journal of Physiology</source><volume>121</volume><fpage>400</fpage><lpage>415</lpage></element-citation></ref><ref id="bib11"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hatsopoulos</surname> <given-names>N</given-names></name><name><surname>Gabbiani</surname> <given-names>F</given-names></name><name><surname>Laurent</surname> <given-names>G</given-names></name></person-group><year iso-8601-date="1995">1995</year><article-title>Elementary computation of object approach by wide-field visual neuron</article-title><source>Science</source><volume>270</volume><fpage>1000</fpage><lpage>1003</lpage><pub-id pub-id-type="doi">10.1126/science.270.5238.1000</pub-id><pub-id pub-id-type="pmid">15290817</pub-id></element-citation></ref><ref id="bib12"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Hecht</surname> <given-names>E</given-names></name></person-group><year iso-8601-date="2016">2016</year><source>Optics</source><edition>Fifth Edition</edition><publisher-name>Pearson Education</publisher-name></element-citation></ref><ref id="bib13"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kim</surname> <given-names>DH</given-names></name><name><surname>Kim</surname> <given-names>J</given-names></name><name><surname>Marques</surname> <given-names>JC</given-names></name><name><surname>Grama</surname> <given-names>A</given-names></name><name><surname>Hildebrand</surname> <given-names>DGC</given-names></name><name><surname>Gu</surname> <given-names>W</given-names></name><name><surname>Li</surname> <given-names>JM</given-names></name><name><surname>Robson</surname> <given-names>DN</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Pan-neuronal calcium imaging with cellular resolution in freely swimming zebrafish</article-title><source>Nature Methods</source><volume>14</volume><fpage>1107</fpage><lpage>1114</lpage><pub-id pub-id-type="doi">10.1038/nmeth.4429</pub-id><pub-id pub-id-type="pmid">28892088</pub-id></element-citation></ref><ref id="bib14"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Naumann</surname> <given-names>EA</given-names></name><name><surname>Fitzgerald</surname> <given-names>JE</given-names></name><name><surname>Dunn</surname> <given-names>TW</given-names></name><name><surname>Rihel</surname> <given-names>J</given-names></name><name><surname>Sompolinsky</surname> <given-names>H</given-names></name><name><surname>Engert</surname> <given-names>F</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>From whole-brain data to functional circuit models: the zebrafish optomotor response</article-title><source>Cell</source><volume>167</volume><fpage>947</fpage><lpage>960</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2016.10.019</pub-id><pub-id pub-id-type="pmid">27814522</pub-id></element-citation></ref><ref id="bib15"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Portugues</surname> <given-names>R</given-names></name><name><surname>Feierstein</surname> <given-names>CE</given-names></name><name><surname>Engert</surname> <given-names>F</given-names></name><name><surname>Orger</surname> <given-names>MB</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Whole-brain activity maps reveal stereotyped, distributed networks for visuomotor behavior</article-title><source>Neuron</source><volume>81</volume><fpage>1328</fpage><lpage>1343</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2014.01.019</pub-id><pub-id pub-id-type="pmid">24656252</pub-id></element-citation></ref><ref id="bib16"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Prevedel</surname> <given-names>R</given-names></name><name><surname>Yoon</surname> <given-names>YG</given-names></name><name><surname>Hoffmann</surname> <given-names>M</given-names></name><name><surname>Pak</surname> <given-names>N</given-names></name><name><surname>Wetzstein</surname> <given-names>G</given-names></name><name><surname>Kato</surname> <given-names>S</given-names></name><name><surname>Schrödel</surname> <given-names>T</given-names></name><name><surname>Raskar</surname> <given-names>R</given-names></name><name><surname>Zimmer</surname> <given-names>M</given-names></name><name><surname>Boyden</surname> <given-names>ES</given-names></name><name><surname>Vaziri</surname> <given-names>A</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Simultaneous whole-animal 3D imaging of neuronal activity using light-field microscopy</article-title><source>Nature Methods</source><volume>11</volume><fpage>727</fpage><lpage>730</lpage><pub-id pub-id-type="doi">10.1038/nmeth.2964</pub-id><pub-id pub-id-type="pmid">24836920</pub-id></element-citation></ref><ref id="bib17"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ringach</surname> <given-names>DL</given-names></name></person-group><year iso-8601-date="2004">2004</year><article-title>Mapping receptive fields in primary visual cortex</article-title><source>The Journal of Physiology</source><volume>558</volume><fpage>717</fpage><lpage>728</lpage><pub-id pub-id-type="doi">10.1113/jphysiol.2004.065771</pub-id><pub-id pub-id-type="pmid">15155794</pub-id></element-citation></ref><ref id="bib18"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sajovic</surname> <given-names>P</given-names></name><name><surname>Levinthal</surname> <given-names>C</given-names></name></person-group><year iso-8601-date="1983">1983</year><article-title>Inhibitory mechanism in zebrafish optic tectum: visual response properties of tectal cells altered by picrotoxin and bicuculline</article-title><source>Brain Research</source><volume>271</volume><fpage>227</fpage><lpage>240</lpage><pub-id pub-id-type="doi">10.1016/0006-8993(83)90285-8</pub-id><pub-id pub-id-type="pmid">6616176</pub-id></element-citation></ref><ref id="bib19"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Stowers</surname> <given-names>JR</given-names></name><name><surname>Hofbauer</surname> <given-names>M</given-names></name><name><surname>Bastien</surname> <given-names>R</given-names></name><name><surname>Griessner</surname> <given-names>J</given-names></name><name><surname>Higgins</surname> <given-names>P</given-names></name><name><surname>Farooqui</surname> <given-names>S</given-names></name><name><surname>Fischer</surname> <given-names>RM</given-names></name><name><surname>Nowikovsky</surname> <given-names>K</given-names></name><name><surname>Haubensak</surname> <given-names>W</given-names></name><name><surname>Couzin</surname> <given-names>ID</given-names></name><name><surname>Tessmar-Raible</surname> <given-names>K</given-names></name><name><surname>Straw</surname> <given-names>AD</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Virtual reality for freely moving animals</article-title><source>Nature Methods</source><volume>14</volume><fpage>995</fpage><lpage>1002</lpage><pub-id pub-id-type="doi">10.1038/nmeth.4399</pub-id><pub-id pub-id-type="pmid">28825703</pub-id></element-citation></ref><ref id="bib20"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Temizer</surname> <given-names>I</given-names></name><name><surname>Donovan</surname> <given-names>JC</given-names></name><name><surname>Baier</surname> <given-names>H</given-names></name><name><surname>Semmelhack</surname> <given-names>JL</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>A visual pathway for looming-evoked escape in larval zebrafish</article-title><source>Current Biology</source><volume>25</volume><fpage>1823</fpage><lpage>1834</lpage><pub-id pub-id-type="doi">10.1016/j.cub.2015.06.002</pub-id><pub-id pub-id-type="pmid">26119746</pub-id></element-citation></ref><ref id="bib21"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Vladimirov</surname> <given-names>N</given-names></name><name><surname>Mu</surname> <given-names>Y</given-names></name><name><surname>Kawashima</surname> <given-names>T</given-names></name><name><surname>Bennett</surname> <given-names>DV</given-names></name><name><surname>Yang</surname> <given-names>CT</given-names></name><name><surname>Looger</surname> <given-names>LL</given-names></name><name><surname>Keller</surname> <given-names>PJ</given-names></name><name><surname>Freeman</surname> <given-names>J</given-names></name><name><surname>Ahrens</surname> <given-names>MB</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Light-sheet functional imaging in fictively behaving zebrafish</article-title><source>Nature Methods</source><volume>11</volume><fpage>883</fpage><lpage>884</lpage><pub-id pub-id-type="doi">10.1038/nmeth.3040</pub-id><pub-id pub-id-type="pmid">25068735</pub-id></element-citation></ref><ref id="bib22"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Vladimirov</surname> <given-names>N</given-names></name><name><surname>Wang</surname> <given-names>C</given-names></name><name><surname>Höckendorf</surname> <given-names>B</given-names></name><name><surname>Pujala</surname> <given-names>A</given-names></name><name><surname>Tanimoto</surname> <given-names>M</given-names></name><name><surname>Mu</surname> <given-names>Y</given-names></name><name><surname>Yang</surname> <given-names>CT</given-names></name><name><surname>Wittenbach</surname> <given-names>JD</given-names></name><name><surname>Freeman</surname> <given-names>J</given-names></name><name><surname>Preibisch</surname> <given-names>S</given-names></name><name><surname>Koyama</surname> <given-names>M</given-names></name><name><surname>Keller</surname> <given-names>PJ</given-names></name><name><surname>Ahrens</surname> <given-names>MB</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Brain-wide circuit interrogation at the cellular level guided by online analysis of neuronal function</article-title><source>Nature Methods</source><volume>15</volume><fpage>1117</fpage><lpage>1125</lpage><pub-id pub-id-type="doi">10.1038/s41592-018-0221-x</pub-id><pub-id pub-id-type="pmid">30504888</pub-id></element-citation></ref><ref id="bib23"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname> <given-names>Y</given-names></name><name><surname>Arrenberg</surname> <given-names>AB</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>High throughput, rapid receptive field estimation for global motion sensitive neurons using a contiguous motion noise stimulus</article-title><source>Journal of Neuroscience Methods</source><volume>326</volume><elocation-id>108366</elocation-id><pub-id pub-id-type="doi">10.1016/j.jneumeth.2019.108366</pub-id><pub-id pub-id-type="pmid">31356837</pub-id></element-citation></ref></ref-list><app-group><app id="appendix-1"><title>Appendix 1</title><boxed-text><sec id="s5" sec-type="appendix"><title>Implications of Snell’s law at a flat interface</title><p>For this and all subsequent analyses, we treat the fish as a pinhole detector. Here we derive <inline-formula><mml:math id="inf46"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mrow><mml:mi mathvariant="normal">′</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math></inline-formula> with the aid of <xref ref-type="fig" rid="app1fig1">Appendix 1—figure 1</xref>. Note that this derivation includes optical effects from the plastic dish, but these effects will be relatively minor. To begin, we summarize the basic trigonometry of the problem. The true angular position of the stimulus is given by<disp-formula id="equ7"><mml:math id="m7"><mml:mrow><mml:mrow><mml:mi mathvariant="normal">tan</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mi>θ</mml:mi><mml:mi>'</mml:mi></mml:mrow></mml:mrow><mml:mo>=</mml:mo> <mml:mi/><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>d</mml:mi><mml:mi>'</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo> <mml:mi/><mml:msub><mml:mrow><mml:mi>d</mml:mi><mml:mi>'</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo> <mml:mi/><mml:msub><mml:mrow><mml:mi>d</mml:mi><mml:mi>'</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo> <mml:mi/><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo> <mml:mi/><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula><mml:math id="inf47"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the normal distance between the fish and the water-plastic interface, <inline-formula><mml:math id="inf48"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the normal distance between the water-plastic and plastic-air interfaces, <inline-formula><mml:math id="inf49"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the normal distance between the air interface and the screen (interface and screen assumed to be parallel), <inline-formula><mml:math id="inf50"><mml:msub><mml:mrow><mml:mi>d</mml:mi><mml:mi>'</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the parallel distance traveled by the light ray in the water, <inline-formula><mml:math id="inf51"><mml:msub><mml:mrow><mml:mi>d</mml:mi><mml:mi>'</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the parallel distance traveled by the light ray in the plastic, and <inline-formula><mml:math id="inf52"><mml:msub><mml:mrow><mml:mi>d</mml:mi><mml:mi>'</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the parallel distance traveled by the light ray in air. Each parallel distance is related to the corresponding normal distance by simple trigonometry. The apparent angular location of the stimulus satisfies<disp-formula id="equ8"><mml:math id="m8"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msubsup><mml:mi>d</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mstyle></mml:math></disp-formula>and the incident light angle satisfies<disp-formula id="equ9"><mml:math id="m9"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mtable columnalign="left left" columnspacing="1em" rowspacing="4pt"><mml:mtr><mml:mtd><mml:msubsup><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo></mml:mtd><mml:mtd><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:msubsup><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo></mml:mtd><mml:mtd><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:mrow></mml:mstyle></mml:math></disp-formula>thereby leading to<disp-formula id="equ10"><mml:math id="m10"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mrow><mml:mi mathvariant="normal">′</mml:mi></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mtext> </mml:mtext><mml:msup><mml:mi>tan</mml:mi><mml:mrow><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi><mml:mo>+</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mtext> </mml:mtext></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mrow></mml:mstyle></mml:math></disp-formula></p><p>We can next use Snell’s law to reduce the number of angular variables. In particular,<disp-formula id="equ11"><mml:math id="m11"><mml:msub><mml:mrow><mml:mi mathvariant="normal">ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo> <mml:mi/><mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="normal">ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo> <mml:mi/><mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:math></disp-formula>and<disp-formula id="equ12"><mml:math id="m12"><mml:msub><mml:mrow><mml:mi mathvariant="normal">ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo> <mml:mi/><mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="normal">ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo> <mml:mi/><mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:math></disp-formula>together imply that<disp-formula id="equ13"><mml:math id="m13"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mrow><mml:mi mathvariant="normal">′</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mtext> </mml:mtext><mml:msup><mml:mi>tan</mml:mi><mml:mrow><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi><mml:mo>+</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msup><mml:mi>sin</mml:mi><mml:mrow><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>sin</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi></mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mfrac><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msup><mml:mi>sin</mml:mi><mml:mrow><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>sin</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi></mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mfrac><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mtext> </mml:mtext><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mtext> </mml:mtext></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mrow></mml:mstyle></mml:math></disp-formula></p><p>The role of plastic in this equation is typically minimal. To see this, first note that <inline-formula><mml:math id="inf53"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>≈</mml:mo><mml:mn>1.333</mml:mn><mml:mo>&lt;</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>≈</mml:mo><mml:mn>1.55</mml:mn></mml:mrow></mml:mstyle></mml:math></inline-formula>, which implies that <inline-formula><mml:math id="inf54"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>sin</mml:mi><mml:mo>⁡</mml:mo><mml:mi>θ</mml:mi></mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mfrac><mml:mo>&lt;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mstyle></mml:math></inline-formula>. This implies that the Snell window is determined by <inline-formula><mml:math id="inf55"><mml:mn>1</mml:mn><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:math></inline-formula>, and the properties of the high-index plastic dishes have no effect on the size of the Snell window. The plastic can cause distortions within the Snell window, but these effects were small for all experimental arenas analyzed in this paper, as we empirically found that none of our results qualitatively depended upon the plastic. We therefore chose to highlight the critical impact of the air-water interface by assuming that <inline-formula><mml:math id="inf56"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></inline-formula> in the main text’s conceptual discussion. We nevertheless included nonzero values of <inline-formula><mml:math id="inf57"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> in our computational tool so that users can account for the quantitative effects of the plastic dish. We also included the effects of plastic when quantitatively correcting previously published results. Because analytically inverting <inline-formula><mml:math id="inf58"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mrow><mml:mi mathvariant="normal">′</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math></inline-formula> is non-trivial, we noted from the graph of <inline-formula><mml:math id="inf59"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mrow><mml:mi mathvariant="normal">′</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math></inline-formula> that the inverse function exists and calculated <inline-formula><mml:math id="inf60"><mml:mi>θ</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi><mml:mi>'</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula> with a numerical look-up table (<italic>e.g.</italic> <xref ref-type="fig" rid="fig1">Figure 1b</xref>).</p><fig id="app1fig1" position="float"><label>Appendix 1—figure 1.</label><caption><title>Illustration of mathematical variables used to analyze optical distortions in arena geometries where flat air-plastic and plastic-water interfaces separate the fish from the projection screen.</title><p>The brown line denotes the trajectory of a light ray traveling from the screen to the fish. We quantify the image transformation by relating the true angular position of each projected point (<inline-formula><mml:math id="inf61"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mi mathvariant="normal">′</mml:mi></mml:msup></mml:mrow></mml:mstyle></mml:math></inline-formula>) to its apparent position (<inline-formula><mml:math id="inf62"><mml:mi>θ</mml:mi></mml:math></inline-formula>). The derivation involves several distances (e.g. <inline-formula><mml:math id="inf63"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>) that summarize the ray’s trajectory through air (white region), plastic (gray region), and water (blue region). Refraction angles (<inline-formula><mml:math id="inf64"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>ψ</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>ψ</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>ψ</mml:mi><mml:mi>w</mml:mi></mml:msub></mml:mrow></mml:mstyle></mml:math></inline-formula>) describe the bending of light at each interface.</p></caption><graphic mime-subtype="tiff" mimetype="image" xlink:href="elife-53684-app1-fig1-v2.tif"/></fig></sec></boxed-text></app><app id="appendix-2"><title>Appendix 2</title><boxed-text><sec id="s6" sec-type="appendix"><title>Implications of Snell’s law at a curved interface</title><p>When the fish is mounted off-center (<xref ref-type="fig" rid="app2fig1">Appendix 2—figure 1a</xref>) in a circular dish (brown dot), rays pass through a curved interface and are refracted at tangent lines (brown line). We begin by using Snell’s law and basic trigonometry to relate each refraction angle to <inline-formula><mml:math id="inf65"><mml:mi>θ</mml:mi></mml:math></inline-formula>. Let <inline-formula><mml:math id="inf66"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> denote the distance in air between the edge of the plastic dish and the screen, <inline-formula><mml:math id="inf67"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> denote the thickness of the plastic dish, <inline-formula><mml:math id="inf68"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> denote the distance in water between the fish and the edge of the tank nearest the screen, and <inline-formula><mml:math id="inf69"><mml:mi>r</mml:mi></mml:math></inline-formula> denote the radius of the dish (excluding the plastic). We assume that <inline-formula><mml:math id="inf70"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>≤</mml:mo><mml:mi>r</mml:mi></mml:math></inline-formula> and the screen is perpendicular to the line between the fish and the center of the dish. Cases where the fish is behind the dish’s center or the screen is angled can be analyzed similarly. Starting at the fish and moving outwards, we first apply the law of sines to the gray triangle to find<disp-formula id="equ14"><mml:math id="m14"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:mi>sin</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:msub><mml:mrow><mml:mi>r</mml:mi><mml:mo>−</mml:mo><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mfrac><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>sin</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>π</mml:mi><mml:mo>−</mml:mo><mml:mi>θ</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mi>r</mml:mi></mml:mfrac><mml:mo stretchy="false">⟹</mml:mo><mml:mi>sin</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:msub><mml:mrow><mml:mi>r</mml:mi><mml:mo>−</mml:mo><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mi>r</mml:mi></mml:mfrac><mml:mi>sin</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:mstyle></mml:math></disp-formula>where we’ve used the identity <inline-formula><mml:math id="inf71"><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:math></inline-formula>. It will be useful for later to note that this triangle also implies that <inline-formula><mml:math id="inf72"><mml:mi>γ</mml:mi><mml:mo>=</mml:mo><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mi>θ</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. Snell’s law at the plastic-water interface implies,<disp-formula id="equ15"><mml:math id="m15"><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>⟹</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mfrac><mml:mrow><mml:mi>r</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:mfrac><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:math></disp-formula></p><p>We next relate the two plastic refraction angles to each other by applying the law of sines to the orange triangle and find<disp-formula id="equ16"><mml:math id="m16"><mml:mfrac><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msubsup><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:mfrac><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mo>⟹</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msubsup><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msubsup><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mfrac><mml:mrow><mml:mi>r</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:math></disp-formula></p><p>Finally, we determine the dependence of <inline-formula><mml:math id="inf73"><mml:msub><mml:mrow><mml:mi mathvariant="normal">ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> on <inline-formula><mml:math id="inf74"><mml:mi>θ</mml:mi></mml:math></inline-formula> from Snell’s law applied to the air-plastic interface,<disp-formula id="equ17"><mml:math id="m17"><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msubsup><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>⟹</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msubsup><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mfrac><mml:mrow><mml:mi>r</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>d mi&gt;</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:math></disp-formula></p><p>With these formulae in hand, we now proceed to the main goal of deriving an expression for <inline-formula><mml:math id="inf75"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mrow><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math></inline-formula>. Since we’ve already extracted everything from Snell’s law, all that remains is basic trigonometry, which we illustrate in <xref ref-type="fig" rid="app2fig1">Appendix 2—figure 1b</xref>. First note that applying the definition of the tangent function to the blue triangle implies that<disp-formula id="equ18"><mml:math id="m18"><mml:msup><mml:mrow><mml:mi>θ</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msup><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo> <mml:mi/><mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">tan</mml:mi></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mfrac><mml:mrow><mml:mi>s</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mi>s</mml:mi><mml:mi>'</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:math></disp-formula></p><p>It thus suffices to determine expressions for <inline-formula><mml:math id="inf76"><mml:mi>s</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula> and <inline-formula><mml:math id="inf77"> <mml:mi/><mml:mi>s</mml:mi><mml:mi>'</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula>. Consider first <inline-formula><mml:math id="inf78"><mml:mi>s</mml:mi><mml:mi>'</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula>. The large red triangle implies<disp-formula id="equ19"><mml:math id="m19"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>s</mml:mi><mml:mrow><mml:mi mathvariant="normal">′</mml:mi></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mi>tan</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>α</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:mrow></mml:mstyle></mml:math></disp-formula></p><p>Rewriting <inline-formula><mml:math id="inf79"><mml:mi>α</mml:mi></mml:math></inline-formula> in terms of the other two angles in the <inline-formula><mml:math id="inf80"><mml:mi>α</mml:mi><mml:mi>β</mml:mi><mml:msubsup><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> triangle gives <inline-formula><mml:math id="inf81"><mml:mi>α</mml:mi><mml:mo>=</mml:mo><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mi>β</mml:mi><mml:mo>-</mml:mo><mml:msubsup><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>. Rewriting <inline-formula><mml:math id="inf82"><mml:mi>β</mml:mi></mml:math></inline-formula> in terms of the other two angles in the <inline-formula><mml:math id="inf83"><mml:mi>β</mml:mi><mml:msubsup><mml:mrow><mml:mi>γ</mml:mi><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow/></mml:msubsup></mml:math></inline-formula> triangle gives <inline-formula><mml:math id="inf84"><mml:mi>β</mml:mi><mml:mo>=</mml:mo><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mfenced separators="|"><mml:mrow><mml:mi>γ</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mi>θ</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. Putting these pieces together, we thus find<disp-formula id="equ20"><mml:math id="m20"><mml:mi>α</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mi>θ</mml:mi><mml:mo>-</mml:mo><mml:msubsup><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msubsup><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:math></disp-formula></p><p>Next consider <inline-formula><mml:math id="inf85"><mml:mi>s</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula>. Applying the law of sines to the green triangle, we find<disp-formula id="equ21"><mml:math id="m21"><mml:mfrac><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:mfrac><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mi>ω</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:mfrac><mml:mo>⇒</mml:mo><mml:mi>s</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>a</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">sin</mml:mi></mml:mrow><mml:mo>⁡</mml:mo><mml:mrow><mml:mfenced separators="|"><mml:mrow><mml:mi>ω</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mrow></mml:mrow></mml:mfrac><mml:mo>.</mml:mo></mml:math></disp-formula></p><p>Rewriting <inline-formula><mml:math id="inf86"><mml:mi>ω</mml:mi></mml:math></inline-formula> in terms of the other two angles in the green triangle, <inline-formula><mml:math id="inf87"><mml:mi>ω</mml:mi><mml:mo>=</mml:mo><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mfenced separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mi>φ</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mi>φ</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, and rewriting <inline-formula><mml:math id="inf88"><mml:mi>φ</mml:mi></mml:math></inline-formula> in terms of the other angles in the red triangle,<inline-formula><mml:math id="inf89"> <mml:mi/><mml:mi>φ</mml:mi><mml:mo>=</mml:mo> <mml:mi/><mml:mi>π</mml:mi><mml:mo>-</mml:mo><mml:mfenced separators="|"><mml:mrow><mml:mi>α</mml:mi><mml:mo>+</mml:mo><mml:mfrac><mml:mrow><mml:mi>π</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>π</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac><mml:mo>-</mml:mo><mml:mi>α</mml:mi></mml:math></inline-formula>, we find<disp-formula id="equ22"><mml:math id="m22"><mml:mi>ω</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>π</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac><mml:mo>-</mml:mo><mml:mi>θ</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:msubsup><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msubsup><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>ψ</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:math></disp-formula></p><p>Finally, we find the dependence of <inline-formula><mml:math id="inf90"><mml:mi>a</mml:mi></mml:math></inline-formula> on <inline-formula><mml:math id="inf91"><mml:mi>θ</mml:mi></mml:math></inline-formula> from the red triangle using the definition of the cosine function<disp-formula id="equ23"><mml:math id="m23"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>α</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>a</mml:mi></mml:mrow></mml:mfrac><mml:mo stretchy="false">⟹</mml:mo><mml:mi>a</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mtext> </mml:mtext><mml:mfrac><mml:mrow><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi>cos</mml:mi><mml:mo>⁡</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>α</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac><mml:mo>−</mml:mo><mml:mi>r</mml:mi><mml:mo>−</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mstyle></mml:math></disp-formula></p><p>Since we’ve written <inline-formula><mml:math id="inf92"><mml:mi>α</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="inf93"><mml:mi>a</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="inf94"><mml:mi>ω</mml:mi></mml:math></inline-formula>, and the refraction angles as functions of <inline-formula><mml:math id="inf95"><mml:mi>θ</mml:mi></mml:math></inline-formula>, we’ve fully specified <inline-formula><mml:math id="inf96"><mml:mi>s</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula>, <inline-formula><mml:math id="inf97"><mml:mi>s</mml:mi><mml:mi>'</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula>, and thus <inline-formula><mml:math id="inf98"><mml:msup><mml:mrow><mml:mi>θ</mml:mi></mml:mrow><mml:mrow><mml:mi>'</mml:mi></mml:mrow></mml:msup><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula>. As with the flat interface, we calculated <inline-formula><mml:math id="inf99"><mml:mi>θ</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>θ</mml:mi><mml:mi>'</mml:mi></mml:mrow></mml:mfenced></mml:math></inline-formula> using a numerical look-up table.</p><fig id="app2fig1" position="float"><label>Appendix 2—figure 1.</label><caption><title>Illustration of mathematical variables used to analyze optical refraction at curved interfaces.</title><p>(<bold>a</bold>) We assume that the interfaces are circular, that the fish is mounted off-center (brown dot), and that the screen and fish are at the same elevation. We neglect distortions that could result from the flat vertical interface running parallel to the longitudinal axis of the cylindrical dish. We denote the radius of the arena’s water-filled compartment as <inline-formula><mml:math id="inf100"><mml:mi>r</mml:mi></mml:math></inline-formula>. The derivation additionally involves several distances that summarize the placement of the fish in the dish (<inline-formula><mml:math id="inf101"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>w</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>), the thickness of the plastic (<inline-formula><mml:math id="inf102"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>), and the distance separating the dish from the screen (<inline-formula><mml:math id="inf103"><mml:msub><mml:mrow><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>). Refraction angles (<inline-formula><mml:math id="inf104"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>ψ</mml:mi><mml:mrow><mml:mi>a</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msubsup><mml:mi>ψ</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">′</mml:mi></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msub><mml:mi>ψ</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>ψ</mml:mi><mml:mi>w</mml:mi></mml:msub></mml:mrow></mml:mstyle></mml:math></inline-formula>) of the light ray (brown line) are relative to each interface’s normal vector and describe the bending of light. Each shaded region highlights a triangle whose trigonometry is helpful for relating the refraction angles to the apparent angular position of a light source (<inline-formula><mml:math id="inf105"><mml:mi>θ</mml:mi></mml:math></inline-formula>). (<bold>b</bold>) Illustration of mathematical variables used to trigonometrically relate the true angular position of each projected point (<inline-formula><mml:math id="inf106"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msup><mml:mi>θ</mml:mi><mml:mi mathvariant="normal">′</mml:mi></mml:msup></mml:mrow></mml:mstyle></mml:math></inline-formula>) to its apparent position (<inline-formula><mml:math id="inf107"><mml:mi>θ</mml:mi></mml:math></inline-formula>), assuming the same arena geometry as panel <italic>a</italic>. The derivation utilizes most triangles shown, several of which are cross-hatched or outlined to direct the reader’s eye.</p></caption><graphic mime-subtype="tiff" mimetype="image" xlink:href="elife-53684-app2-fig1-v2.tif"/></fig></sec></boxed-text></app></app-group></back><sub-article article-type="decision-letter" id="sa1"><front-stub><article-id pub-id-type="doi">10.7554/eLife.53684.sa1</article-id><title-group><article-title>Decision letter</article-title></title-group><contrib-group><contrib contrib-type="editor"><name><surname>Wyart</surname><given-names>Claire</given-names></name><role>Reviewing Editor</role><aff><institution>Institut du Cerveau et la Moelle épinière, Hôpital Pitié-Salpêtrière, Sorbonne Universités, UPMC Univ Paris 06, Inserm, CNRS</institution><country>France</country></aff></contrib></contrib-group><contrib-group><contrib contrib-type="reviewer"><name><surname>Maia Chagas</surname><given-names>André</given-names> </name><role>Reviewer</role><aff><institution>University of Tübingen</institution><country>Germany</country></aff></contrib></contrib-group></front-stub><body><boxed-text><p>In the interests of transparency, eLife publishes the most substantive revision requests and the accompanying author responses.</p></boxed-text><p>Thank you for submitting your article &quot;Correcting for physical distortions in visual stimuli improves reproducibility in zebrafish neuroscience.&quot; for consideration by <italic>eLife</italic>. Your article has been reviewed by three peer reviewers, and the evaluation has been overseen by a Reviewing Editor and Didier Stainier as the Senior Editor. The following individual involved in review of your submission has agreed to reveal their identity: Andre Maia Chagas (Reviewer #3).</p><p>The reviewers have discussed the reviews with one another and the Reviewing Editor has drafted this decision to help you prepare a revised submission.</p><p>Summary:</p><p>The three reviewers agree that the study is of general interest and will help future studies on visual integration in zebrafish properly design their setups. Precisions and corrections are listed below. Please address all points raised and improve clarity of figures, check legends of supplementary videos.</p><p><italic>Reviewer #1:</italic></p><p>In this manuscript, the authors describe how to correct for distortions of the light path in vision experiments in aquatic animals. They first discuss and illustrate relevant physical laws and then showcase how distortions associated with suboptimal stimulus configurations could have affected two recent studies on looming stimuli in zebrafish. The impact of their manuscript can be subdivided into the following four points.</p><p>1) They raise awareness about stimulus stretching, compression and attenuation occurring in aquatic stimulus setups, which have oftentimes been ignored in zebrafish vision research. This will certainly be of high interest for the growing community of scientists working with aquatic animals, especially zebrafish.</p><p>2) The authors show that a critical parameter (d<sub>a</sub>/d<sub>w</sub>) determines how the physical laws (Fresnel equations, Snell's law) will affect the stimulus appearance in one of the frequently used recording configurations: the apparent position of a stimulus is shown to depend on the ratio of the water column length and the free-air distance between display and water container (d<sub>a</sub>/d<sub>w</sub>). While the physical laws are no news, the provided equation can be useful for scientists working with such a recording configuration.</p><p>3) They calculate, how stimuli have likely been distorted in two recent publications. This is a very helpful type of analysis that can potentially correct/explain observed differences in studies. The authors state that in the original publications the critical stimulus sizes were reported as 21.7° and 72.0° (difference: factor 3.3), and after their correction, the stimulus sizes were 0.6% and 1.9% (of 4π steradians, difference: factor 3.2). If I understand the authors correctly, the authors take the small <italic>absolute</italic> difference of 1.9% and 0.6% ( = 1.3%) as evidence for a better match after optical correction, because the absolute difference (14%) in the original studies before correction (72° – 21.7°=50.3° ~ = 14% of 360 degrees) had been much bigger. However, I don't agree that this is the best way to compare the results. The <italic>relative</italic> difference is about a factor of 3 in both cases, so not much different after correction. That being said, it is of course nonetheless very useful to perform these distortion calculations as they can be used to report the stimulus characteristics from the animal's perspective, which is what matters.</p><p>4) A programming tool is provided to help scientists calculate the distortions in their setups. It would be helpful if the functionality (inputs, outputs, available configurations) were described in more detail in the manuscript. The tool can be used for the experimental setup in Figure 1A, but for other configurations, users likely need to adapt it or use other software for ray tracing.</p><p>In summary, I think that the topic of the manuscript will be of interest to the community of aquatic vision researchers. The presented results and discussion present a rather incremental scientific advance, but are timely for zebrafish vision researchers.</p><p><italic>Reviewer #2:</italic></p><p>In this study, Dunn and Fitzgerald evaluate the effects of refractive index mismatches and consequent visual distortions upon zebrafish visual neuroscience experiments. They show that refraction at water-air interfaces causes distortions and translations to visual stimuli that, if ignored, will lead to erroneous conclusions about receptive field properties of visual neurons and visuomotor relationships. They show that accounting for Snell's law explains a large part of the apparent discrepancy between the critical angular sizes reported in two studies of looming-evoked escape behavior. The authors also provide a software tool to simulate the effects of refraction on visual stimuli.</p><p>Overall, this paper and the associated software will be of considerable value to the growing community of researchers investigating the larval zebrafish visual system. By highlighting an issue that has hitherto largely been ignored and providing means to improve experimental design and interpretation, the paper should enhance the quality and reproducibility of experiments in this important neuroscience model.</p><p>I have two main comments:</p><p>1) The authors do not appear to have considered the angular intensity profiles of the screens used to present visual cues. However, this will influence the most eccentric location at which an image feature (pixel) is visible to the fish as well as the observed intensity distribution. Moreover, the types of screens used in different studies vary. For example, Dunn et al. used a diffusive screen (for back projection) which will have some scattering characteristic – how was this modeled? Temizer et al. used an OLED screen where individual pixels have a (likely more limited) angular emission profile. This will determine the maximal theta' from which a ray can be emitted that will reach the fish, causing clipping at eccentric locations an affecting the size and amplitude profile of receptive fields. Can the authors incorporate the angular intensity profile of the presentation screen into their modeling (tool)?</p><p>2) It was not clear to me why the maximum image size is assumed to be 360° or 4π steradians. In the Dunn and Temizer papers, I assume angular size is computed according to a simple 2D model where one eye views a directly approaching orthogonal object.</p><p>In this case, the largest angular size subtended at the eye is 180° (at impact). However, the largest image size cast on the retina of a real eye will be limited by the visual field of that eye (and thus occur prior to impact). Similarly, for the analysis of solid angle, the authors compute percentages assuming a maximal size of 4π, which is clearly not biologically plausible. I would find it more useful if image sizes were given as a proportion of the (monocular) visual field. What is this estimated to be?</p><p><italic>Reviewer #3:</italic></p><p>I would like to start by thanking the authors for putting this paper together, as it is well written and definitely an asset for experimenters working with aquatic species, or in general for any other researchers that have visual stimuli that need to go through different media before reaching the animal/subject. I'm surprised that this issue hasn't been raised before, but glad to see that this is done here. I also enjoy the fact that they made a repository with more details on the tool they are proposing as a solution to the issue reported here, also that you can reproduce the paper's figures using this repository.</p><p>Here are some comments I hope will make the paper even more enjoyable:</p><p>1) Would it be possible for the authors to setup their repository to work with &quot;My Binder&quot; (https://mybinder.org/), so that readers who are not using/familiar with python could still use their notebook?</p><p>2) In the second paragraph of the main text the authors state that in traditional experimental setups for zebrafish, due to Snell's law, stimuli that are distant appear to the fish at the asymptotic value of ~48.6°, and that this would lead to a &quot;Snell window&quot; of 97.2°. I think this leads to some interesting questions:</p><p>2.1) In this setup configuration, the Snell window is covering what area of the bottom of the Petri dish? It would be nice to see visually represented what is the projection size of the window as size of the dish, since:</p><p>2.1.1) If the window is only covering part of the dish, the animals are freely moving, and the correction algorithm is used, this would mean that as the animals move, they could go past the edge of the window and be in a region where the stimulus is not present?</p><p>2.1.2) It would be nice to know how big the window projection is in relation to the animal's visual space, and how the distance between the petri dish and the projection window change this</p><p>3) The authors also mention that having water instead of air in the space between the petri-dish and the projection could be used as an alternative solution to the problem (main text, last paragraph), with the shortcoming of having a reduced transmission of stimuli in large angles. I wonder what these large angles would be? Would this be something easy to calculate? I wonder about this, since Franke et al. (https://elifesciences.org/articles/48779), show a &quot;fish cinema&quot; system where a lot of the fish's field of view is covered (while projecting directly at a screen which was the water container wall – so no air or water interface before the projected image)</p><p>4) One thing that I didn't see mentioned in the paper is chromatic aberration. Given the fact that stimuli are travelling through 3 different media at least, one could expect that different wavelengths will be projected slightly misaligned when compared to one another, especially considering the wide chromatic range present in Zebrafish vision? I wonder if it would be easy to incorporate these calculations in the tools they are describing, and most importantly, how could this affect the calculation of receptive fields, considering the misaligned patches of different wavelengths could directly influence some of these receptive fields?</p><p>I'm happy to clarify any points that might be unclear, or provide further arguments for the above mentioned points.</p><p>[Editors' note: further revisions were suggested prior to acceptance, as described below.]</p><p>Thank you for resubmitting your work entitled &quot;Correcting for physical distortions in visual stimuli improves reproducibility in zebrafish neuroscience.&quot; for further consideration by <italic>eLife</italic>. Your revised article has been evaluated by Didier Stainier as the Senior Editor, and a Reviewing Editor.</p><p>The manuscript has been improved but there are some remaining issues that need to be addressed before acceptance, as outlined below:</p><p>The reviewers have addressed most of the comments from the three reviewers satisfactorily. The authors now include a description of the relative differences of solid angles between the two studies, which is good. However, the presentation is still somewhat confusing for readers, because the comparison of fractional apex angles and fractional solid angles introduces a huge difference simply due to the fact of switching from a one-dimensional to a two-dimensional/squared parameter (the solid angle is proportional to the surface area of the sphere). Thus, the effect of the optical correction is partially masked by the effect of this parameter conversion, and the current text fails to make this transparent and resolve it for the reader.</p><p>1) Without optical correction, the absolute difference of 70.3° and 21.7° corresponds to solid angles of 1.15 sr and 0.112 sr, which is a 10-fold relative difference [according to the equation Ω=2π1-cosθ; Ω corresponds to the solid angle, 2θ to the apex, see https://en.wikipedia.org/wiki/Solid_angle]. After optical correction, the relative difference is reduced to 3-fold (0.24 sr vs. 0.08 sr).</p><p>Our suggestion is to present results in the main text and in Figure 2C in relative steradian terms. The authors could state that the initial 10-fold difference in covered stimulus area (between the two studies) was surprising, but that after optical correction, this difference is reduced markedly (by a factor of 3).</p><p>The remaining 3-fold difference could potentially be explained by a dependence of behavior on the spatial stimulus location (as the authors already write). If the authors structure the paragraph like this, they could then also delete the following sentence, which they need in their current version to present results accurately, but which can be confusing and anticlimactic for readers and the story: &quot;These corrections did not eliminate the discrepancy in relative terms, as Dunn et al. still found a critical size that was approximately three times as large as Temizer et al.&quot;.</p><p>2) We are not convinced that a 50.3° difference is &quot;far more striking&quot; than a similar relative difference at small stimulus sizes (as the authors state in their point-by-point response). Sensory systems typically encode stimulus magnitudes in logarithmic terms (Weber-Fechner law).</p><p>According to the logic used by the authors, a difference of 50.3° is striking irrespective of the base stimulus size. I think they would agree though, that two stimuli, 360° and 310.7° in size, are not very different. This is why the description of differences in relative terms is important, which the authors have now included in their revision.</p></body></sub-article><sub-article article-type="reply" id="sa2"><front-stub><article-id pub-id-type="doi">10.7554/eLife.53684.sa2</article-id><title-group><article-title>Author response</article-title></title-group></front-stub><body><disp-quote content-type="editor-comment"><p>Reviewer #1:</p><p>[…] 1) They calculate, how stimuli have likely been distorted in two recent publications. This is a very helpful type of analysis that can potentially correct/explain observed differences in studies. The authors state that in the original publications the critical stimulus sizes were reported as 21.7° and 72.0° (difference: factor 3.3), and after their correction, the stimulus sizes were 0.6% and 1.9% (of 4π steradians, difference: factor 3.2). If I understand the authors correctly, the authors take the small absolute difference of 1.9% and 0.6% ( = 1.3%) as evidence for a better match after optical correction, because the absolute difference (14%) in the original studies before correction (72° – 21.7°=50.3° ~ = 14% of 360°) had been much bigger. However, I don't agree that this is the best way to compare the results. The relative difference is about a factor of 3 in both cases, so not much different after correction. That being said, it is of course nonetheless very useful to perform these distortion calculations as they can be used to report the stimulus characteristics from the animal's perspective, which is what matters.</p></disp-quote><p>We thank the reviewer for this comment. We have comprehensively revised the paragraph describing the looming results to hopefully make our findings and interpretations clearer. However, we continue to think that <italic>absolute</italic> differences are more relevant than <italic>relative</italic> differences in the current context. Our rationale here is two-fold. First, both prior zebrafish papers on this topic put forward the interpretation that zebrafish exhibit a behavioral escape response when the looming stimulus exceeds a critical size, in <italic>absolute</italic> terms. This notion of critical size is deeply engrained in the literature, following numerous studies on multiple animals, and we think that reporting the observed discrepancy in <italic>absolute</italic> terms is more concordant with the literature. Second, because zebrafish were hypothesized to escape when looming stimuli exceed a critical size, we assert that the <italic>absolute</italic> discrepancy of 50° is far more striking than if the <italic>relative</italic> discrepancy of 3 has resulted in a smaller <italic>absolute</italic> change. For example, if one group had measured a critical angle of 5° and the other had found a critical angle of 15°, then we would have been far less concerned about the discrepancy, and we may not have started to think about the effects of optical refraction on the experimental results. To make these rationales for using <italic>absolute</italic> discrepancies more explicit, we edited the manuscript to say:</p><p>“This large angular discrepancy of 50.3° initially raises doubt to the notion that the stimulus’s absolute size triggers the escape (Hatsopoulos et al., 1995; Gabbiani, Krapp and Laurent, 1999; Fotowat and Gabbiani, 2011. However, a major difference in experimental design is that Temizer et al. showed stimuli from the front through a curved air-water interface, and Dunn et al. showed stimuli from below through a flat air-water interface.”</p><p>We hope this will help future readers understand why we were surprised by, and interested in, the <italic>absolute</italic> discrepancy in the experimental results. Nevertheless, we agree with the reviewer that some readers may be interested in interpreting the discrepancy’s magnitude in <italic>relative</italic> terms, and we have edited the manuscript so that it now includes both methods of quantification. In particular, we added a sentence to the manuscript that reads:</p><p>“These corrections did not eliminate the discrepancy in relative terms, as Dunn et al. still found a critical size that was approximately three times as large as Temizer et al.”</p><p>This change to the manuscript will allow future readers to decide for themselves whether they want to think about the discrepancy in <italic>absolute</italic> or <italic>relative</italic> terms.</p><disp-quote content-type="editor-comment"><p>2) A programming tool is provided to help scientists calculate the distortions in their setups. It would be helpful if the functionality (inputs, outputs, available configurations) were described in more detail in the manuscript. The tool can be used for the experimental setup in Figure 1A, but for other configurations, users likely need to adapt it or use other software for ray tracing.</p></disp-quote><p>We thank the reviewer for correctly pointing out that we insufficiently described the tool in the manuscript. We have added a section titled “Computational tool for simulating optical distortions” to the “Materials and methods” of the paper. This new section reads:</p><p>“With this paper, we provide a computation tool for visualizing and correcting distortions (https://github.com/spoonsso/snell_tool/). […] Importantly, note that some stimuli will be physically impossible to correct (e.g. undistorted image content cannot be delivered outside the Snell window).”</p><disp-quote content-type="editor-comment"><p>Reviewer #2:</p><p>[…] I have two main comments:</p><p>1) The authors do not appear to have considered the angular intensity profiles of the screens used to present visual cues. However, this will influence the most eccentric location at which an image feature (pixel) is visible to the fish as well as the observed intensity distribution. Moreover, the types of screens used in different studies vary. For example, Dunn et al. used a diffusive screen (for back projection) which will have some scattering characteristic – how was this modeled? Temizer et al. used an OLED screen where individual pixels have a (likely more limited) angular emission profile. This will determine the maximal theta' from which a ray can be emitted that will reach the fish, causing clipping at eccentric locations an affecting the size and amplitude profile of receptive fields. Can the authors incorporate the angular intensity profile of the presentation screen into their modeling (tool)?</p></disp-quote><p>We thank the reviewer for this suggestion. The reviewer is correct that we did not explicitly consider the angular intensity profiles used to present visual cues, and we assumed that the apparatuses used by Dunn et al. and Temizer et al. uniformly emitted light over all angles. We agree that the OLED screen used by Temizer et al. likely had a “more limited” angular emission profile that could have contributed to differences between the two studies. Similar OLED screens will also be relevant to many users of the tool, and we agree that OLED monitors might have important consequences for receptive field mapping experiments. We therefore accepted the reviewer’s suggestion and changed our tool to allow the user to specify non-uniform angular emission profile. We clarified these points in our paper by adding a sentence to the Materials and methods that reads:</p><p>“Here we assumed that the virtual screen emits light uniformly at all angles, but this assumption is violated by certain displays, and our computational tool allows the user to specify alternate angular emission profiles.”</p><p>We also demonstrate this new functionality in a modified notebook that we provide alongside the computational tool. We think that these modifications will make the tool more useful for users.</p><p>However, two considerations lead us to conclude that detailed corrections for the angular emission profiles of Dunn et al. and Temizer et al. were not needed to quantitatively compare their results. First, Dunn et al. used a standard light diffuser that is near uniform over the modest range of angles needed to fully fill the Snell window and specify the size of the looming stimulus. Second, Temizer et al. only showed looming stimuli in front of the fish, so the OLEDs were only used in a narrow operating regime where their angular emission profile were also nearly uniform. The quantitative effects of non-uniform angular emission profiles are now illustrated in the tool’s modified notebook, including a demonstration that effects from OLED-like profiles are minor for small angles near the center of the Snell window.</p><disp-quote content-type="editor-comment"><p>2) It was not clear to me why the maximum image size is assumed to be 360° or 4π steradians. In the Dunn and Temizer papers, I assume angular size is computed according to a simple 2D model where one eye views a directly approaching orthogonal object.</p><p>In this case, the largest angular size subtended at the eye is 180° (at impact). However, the largest image size cast on the retina of a real eye will be limited by the visual field of that eye (and thus occur prior to impact). Similarly, for the analysis of solid angle, the authors compute percentages assuming a maximal size of 4π, which is clearly not biologically plausible. I would find it more useful if image sizes were given as a proportion of the (monocular) visual field. What is this estimated to be?</p></disp-quote><p>We thank the reviewer for this comment. Some type of normalization is needed to compare critical size discrepancies expressed in different units (i.e. angle versus solid angle), but we agree that the normalization’s divisor is arbitrary. Given this arbitrariness, we decided that it was most straightforward to simply normalize each quantity by the maximal mathematical value that is possible for the quantity under consideration. This corresponds to 360° for angles and 4π steradians for solid angles. We agree that we could instead try to normalize by the estimated size of the fish’s visual field. However, we do not think that this normalization scheme would be any less arbitrary, and we think that the complication involved in computing it and justifying it would significantly decrease its utility. For example, what would the size of the visual field even mean when expressed in units of degrees?</p><p>On the other hand, we totally agree that the looming stimulus will never reach these maximal sizes, and we apologize that we were unclear in this regard. To make these normalization issues clearer for future readers, we have comprehensively revised the presentation of our looming results in light of this comment. We now initially present the discrepancies in the absolute units of degrees and steradians. We then introduce the normalization factor in an explicit way that makes its intended interpretation more explicit to the reader. In particular, we now say:</p><p>“This leaves a discrepancy of 0.16 steradians, which is a much smaller fraction of the full spherical solid angle (4π steradians) than 50.3° was of the full circular planar angle (360°). Correcting with Snell’s law thus markedly reduced this discrepancy in the literature, shrinking an original fractional discrepancy of 14.0% ± 1.6% to 1.3% [+0.6, -0.5]% (units normalized for comparison to 360° and 4π steradians, respectively) (Figure 2C).”</p><disp-quote content-type="editor-comment"><p>Reviewer #3:</p><p>[…] Here are some comments I hope will make the paper even more enjoyable:</p><p>1) Would it be possible for the authors to setup their repository to work with &quot;My Binder&quot; (https://mybinder.org/), so that readers who are not using/familiar with python could still use their notebook?</p></disp-quote><p>We have accepted the reviewer’s very good suggestion. In particular, the README for the tool now contains a My Binder link that we hope will make the tool useful to a wider audience. We have added a sentence to README file that says,</p><p>“Users can also run the tool without installing python by clicking on the `launch binder’ link above.”</p><disp-quote content-type="editor-comment"><p>2) In the second paragraph of the main text the authors state that in traditional experimental setups for zebrafish, due to Snell's law, stimuli that are distant appear to the fish at the asymptotic value of ~48.6°, and that this would lead to a &quot;Snell window&quot; of 97.2°. I think this leads to some interesting questions:</p><p>2.1) In this setup configuration, the Snell window is covering what area of the bottom of the Petri dish? It would be nice to see visually represented what is the projection size of the window as size of the dish, since:</p><p>2.1.1) If the window is only covering part of the dish, the animals are freely moving, and the correction algorithm is used, this would mean that as the animals move, they could go past the edge of the window and be in a region where the stimulus is not present?</p><p>2.1.2) It would be nice to know how big the window projection is in relation to the animal's visual space, and how the distance between the petri dish and the projection window change this</p></disp-quote><p>The Snell window is relative to the fish, so it moves around as the animal explores its aquatic environment. As such, the fish cannot move beyond the edge of the Snell window. To make this point more clearly, we edited Figure 1C to add a small zebrafish at the center of the Snell window.</p><p>The reviewer is correct that the distance between the petri dish and the projection screen has a major impact on the visual distortions experienced by the fish. We have edited the legend to Figure 1C to state the size of the screen and to point out that different distances strongly affect the relative sizes of the screen and Snell window. In particular, the Figure 1C legend now says:</p><p>“The virtual screen is modeled as a 4 x 4 cm square with 250 pixels / cm resolution, and we fixed the total distance between the fish and the virtual screen, da+dw, to be 1 cm. Note that only a fraction of the screen is visible when da/dw is small (bottom left), but a distorted view of the full screen fits within the Snell window when da/dw becomes large (bottom right).”</p><disp-quote content-type="editor-comment"><p>3) The authors also mention that having water instead of air in the space between the petri-dish and the projection could be used as an alternative solution to the problem (main text, last paragraph), with the shortcoming of having a reduced transmission of stimuli in large angles. I wonder what these large angles would be? Would this be something easy to calculate? I wonder about this, since Franke et al. (https://elifesciences.org/articles/48779), show a &quot;fish cinema&quot; system where a lot of the fish's field of view is covered (while projecting directly at a screen which was the water container wall – so no air or water interface before the projected image)</p></disp-quote><p>We agree with the reviewer that one appealing way to alleviate optical distortions is to eliminate air-water interfaces altogether, either by using a diffuser that works well outside air, or by engineering the diffractive elements into the walls of the chamber itself. In principle, we think these approaches represent very good ideas. At the moment, we do not have a quantitative method to model how well a general light diffuser would work outside air, and we were thus unable to confidently gauge how well the setup in Franke et al. is working. We note that our own thinking on these issues has been informed by experimenting with wet diffusive screens (e.g. Rosco Cinegel) in a laboratory setting, and we encourage the reviewer to similarly experiment with their own setup to see how well light is spreading throughout the aquatic environment. We are sorry that we cannot say anything more definitive on this point, but we do not want to mislead the reviewer with speculative hypotheses. We have added a citation to Franke et al. as another example paper that engineered the diffuser into the fish tank.</p><disp-quote content-type="editor-comment"><p>4) One thing that I didn't see mentioned in the paper is chromatic aberration. Given the fact that stimuli are travelling through 3 different media at least, one could expect that different wavelengths will be projected slightly misaligned when compared to one another, especially considering the wide chromatic range present in Zebrafish vision? I wonder if it would be easy to incorporate these calculations in the tools they are describing, and most importantly, how could this affect the calculation of receptive fields, considering the misaligned patches of different wavelengths could directly influence some of these receptive fields?</p></disp-quote><p>The reviewer is correct that we did not consider chromatic effects in the initial submission, and we agree that chromatic aberration is quantitatively important and easy to treat with the tool. We have thus modified the tool’s notebook to point out how users can use the tool to consider chromatic effects. In particular, when defining the variable “n<sub>w</sub>,” we now say:</p><p>“This parameter varies with the wavelength of light and can be changed to simulate chromatic aberration.”</p><p>We thought that the reviewer might also be interested in the results of some numerical experiments that we performed to explore the effects of chromatic aberration. In particular, we simulated the effects of optical refraction on a distorted checkerboard pattern, which we designed to transform into an undistorted form through refraction (<xref ref-type="fig" rid="respfig1">Author response image 1</xref>). When the projected pattern consists of equal parts red (n<sub>w</sub> = 1.331) and blue (n<sub>w</sub> = 1.341) light, the red and blue components of the transformed images combine to produce a dual-channel stimulus that is usually purple. However, chromatic aberrations did result in a few red or blue pixels at the edges of the checkerboard. Note that the reviewer might need to zoom in on <xref ref-type="fig" rid="respfig1">Author response image 1</xref> to see these relatively small effects.</p><fig id="respfig1"><label>Author response image 1.</label><caption><title>Left: The image of a grayscale checkerboard that our tool suggests a user display in order to achieve an undistorted checkerboard from the point of view of the fish.</title><p>Center: Simulation of chromatic aberrations for the resulting transformed checkerboard when it consists of equal parts red and blue light. Right: Zoom of image at Center.</p></caption><graphic mime-subtype="tiff" mimetype="image" xlink:href="elife-53684-resp-fig1-v2.tif"/></fig><p>Also note that the size of the Snell window depends slightly on the wavelength of light, which may lead to additional interesting aberration effects.</p><p>[Editors' note: further revisions were suggested prior to acceptance, as described below.]</p><disp-quote content-type="editor-comment"><p>The manuscript has been improved but there are some remaining issues that need to be addressed before acceptance, as outlined below:</p><p>The reviewers have addressed most of the comments from the three reviewers satisfactorily. The authors now include a description of the relative differences of solid angles between the two studies, which is good. However, the presentation is still somewhat confusing for readers, because the comparison of fractional apex angles and fractional solid angles introduces a huge difference simply due to the fact of switching from a one-dimensional to a two-dimensional/squared parameter (the solid angle is proportional to the surface area of the sphere). Thus, the effect of the optical correction is partially masked by the effect of this parameter conversion, and the current text fails to make this transparent and resolve it for the reader.</p></disp-quote><p>We are glad that the reviewers were satisfied by the bulk of our first revision. As suggested, the current revision further improves the presentation of the looming results.</p><disp-quote content-type="editor-comment"><p>1) Without optical correction, the absolute difference of 70.3° and 21.7° corresponds to solid angles of 1.15 sr and 0.112 sr, which is a 10-fold relative difference [according to the equation Ω=2π1-cosθ; Ω corresponds to the solid angle, 2θ to the apex, see https://en.wikipedia.org/wiki/Solid_angle]. After optical correction, the relative difference is reduced to 3-fold (0.24 sr vs. 0.08 sr).</p></disp-quote><p>We agree that quantifying the size of the looming stimuli with their solid angle increases the relative difference between the two reported values of critical size. We also agree that “the effect of the optical correction is partially masked by the effect of this parameter conversion, and the current text fails to make this transparent and resolve it for the reader.” However, the formula provided by the reviewers does not apply the stimuli presented by Dunn et al. As such, the relative size difference is slightly smaller than suggested by the calculation above. We find 9.0-fold with our method, whereas 1.15/0.112 = 10.2. The reviewers’ basic point still stands.</p><disp-quote content-type="editor-comment"><p>Our suggestion is to present results in the main text and in Figure 2C in relative steradian terms. The authors could state that the initial 10-fold difference in covered stimulus area (between the two studies) was surprising, but that after optical correction, this difference is reduced markedly (by a factor of 3).</p></disp-quote><p>We thank the reviewers for this good suggestion. We have accepted it and added the relative size comparison in Figure 2C. In the text, we now set up the problem by saying:</p><p>“Although Temizer et al., 2015 and Dunn et al., 2016, both found that a critical size of looming stimuli triggered escape behavior, they reported surprisingly different values for the critical angular size (21.7° ± 4.9° and 72.0° ± 2.5°, respectively, mean ± 95% CI). […] This large size discrepancy initially raises doubt to the notion that a stimulus size threshold triggers the escape (Hatsopoulos et al., 1995; Gabbiani, Krapp and Laurent, 1999; Fotowat and Gabbiani, 2011.”</p><p>We then resolve the problem by performing the Snell’s law corrections and saying:</p><p>“This leaves a discrepancy of 0.16 steradians, which is much smaller than the original solid angle discrepancy of 0.91 steradians (Figure 2C, black). […] The small remaining differences could indicate an ethologically interesting dependence of behavior on the spatial location of the looming stimulus (Dunn et al., 2016; Temizer et al., 2015.”</p><disp-quote content-type="editor-comment"><p>The remaining 3-fold difference could potentially be explained by a dependence of behavior on the spatial stimulus location (as the authors already write). If the authors structure the paragraph like this, they could then also delete the following sentence, which they need in their current version to present results accurately, but which can be confusing and anticlimactic for readers and the story: &quot;These corrections did not eliminate the discrepancy in relative terms, as Dunn et al. still found a critical size that was approximately three times as large as Temizer et al.&quot;.</p></disp-quote><p>We agree that the suggested changes improve the manuscript and alleviate the need for this sentence. We have eliminated it from the manuscript.</p><disp-quote content-type="editor-comment"><p>2) We are not convinced that a 50.3° difference is &quot;far more striking&quot; than a similar relative difference at small stimulus sizes (as the authors state in their point-by-point response). Sensory systems typically encode stimulus magnitudes in logarithmic terms (Weber-Fechner law).</p><p>According to the logic used by the authors, a difference of 50.3° is striking irrespective of the base stimulus size. I think they would agree though, that two stimuli, 360° and 310.7° in size, are not very different. This is why the description of differences in relative terms is important, which the authors have now included in their revision.</p></disp-quote><p>We do not believe there are substantial disagreements here. We think that both absolute and relative differences contribute to whether or not a discrepancy seems “striking.” The reviewers’ appreciation for the merits of relative comparisons is clear from their above comment. Their appreciation that absolute comparisons remain valuable is implicit. We hope that we’ve now converged on phrasing that the reviewers will find satisfactory. We personally find the new phrasing much more elegant, and we thank the reviewers for pointing out various difficulties emerging from past wordings.</p></body></sub-article></article>