DOI: 10.5061/dryad.bcc2fqzjz
title: Neural mechanisms to incorporate visual counterevidence in self movement estimation

description: In selecting appropriate behaviors, animals should weigh sensory evidence
 both for and against specific beliefs about the world. For instance,
 animals measure optic flow to estimate and control their own rotation.
 However, existing models of flow detection can be spuriously triggered by
 visual motion from external movements. Here, we show that stationary
 patterns on the retina, which constitute evidence against observer
 rotation, suppress inappropriate stabilizing rotational behavior in the
 fruit fly Drosophila. In silico experiments show that artificial neural
 networks that are optimized to distinguish observer movement from object
 motion similarly detect stationarity and incorporate negative evidence.
 Employing neural measurements and genetic manipulations, we identified
 components of the circuitry for stationary pattern detection, which runs
 parallel to the fly’s local motion- and optic flow-detectors. Our results
 show how the fly brain incorporates negative evidence to improve heading
 stability, exemplifying how a compact brain exploits geometrical
 constraints of the visual world.
description: This dataset contains all experimental data necessary to create
 figures in Tanaka et al. (2023), as well as scripts to analyze them. The
 scripts are written in Matlab 2019b, and uses some functions from
 Statistics and Machine Learning Toolbox.
description: # Data for: Neural mechanisms to incorporate visual counterevidence in
 self movement estimation ## Folder structure * `scripts` The easiest way
 to explore the data is to run the .m scripts under the `scripts` folder.
 Each script loads .mat files in the `data` holder and replicates plots in
 the paper showing behavioral and physiological data. The folder contains
 following scripts, with corresponding figure panels: * `fig1_01_basic.m` :
 Figure 1G-L * `fig1_02_bar.m` : Figure 1PQ * `fig1_03_orientation.m` :
 Figure 1ST, S1BC * `fig1_04_movingwindow.m` : Figure S1EF *
 `fig1_05_onset.m` : Figure 1VW, S1G-J * `fig3_sweeps.m` : Figure 3 (all
 panels) * `fig4_01_T4T5.m` : Figure 4EF, S3AB * `fig4_02_LPTC.m` : Figure
 4GH, S3CD * `fig5_transfer.m` : Figure 5 (all panels) *
 `fig6_01_screen_distplot.m` : Figure 6A, S4A * `fig6_02_replication.m` :
 Figure 6B, S4B * `fig6_03_NTsplit.m` : Figure S4D * `fig7_mi4.m` : Figure
 7A-D The generated figure panels will be automatically saved into
 `figtada/scripts`. * `data` Data loaded by the scripts are stored here as
 .mat file. Each .mat file contains cell arrays typically called
 "data", corresponding to a single batch of animals went through
 the identical experimental protocol (i.e., a set of visual stimuli). Each
 "data" cell array holds "analysis" objects, which is a
 structure array. If a single "data" cell array contains multiple
 "analysis" objects, they represent different preprocessing
 parameters (e.g., averaging mirror symmetric pairs of stimulus conditions
 or not, or selection for different functionally identified cell types in
 imaging experiments). An analysis object always has following fields: *
 `respMatPlot` : A matrix containing time traces of behavioral and
 physiological measures, averaged across flies. For behavioral experiments,
 this will be a 3D matrix of time x stimulus type (epoch) x {turning speed
 (deg/s), normalized walking speed}. For imaging experiments, this will be
 a 2D matrix of time x stimulus type (epoch), and the unit is ΔF/F. *
 `respMatSemPlot` : A matrix containing standard error of the mean (SEM)
 associated with `respMatPlot`. The structure of the matrix is the same as
 `respMatPlot`. * `timeX` : A vector containing timestamps relative to the
 stimulus onsets in milliseconds. The length of `timeX` is identical to the
 size of the first dimension of `respMatPlot`. * `indFly` : A cell array
 containing data from individual flies before averaging. Each cell in
 `indFly` corresponds to individual fly. Each cell has several fields named
 like `pX_`. Under each of these `pX_` field, there is a subfield named
 `snipMat`, which is a 2D cell array with the dimension order of stimulus
 type (epoch) x ROIs. Each cell of `snipMat` contains a matrix with the
 dimension order of time x repetitions x data type (data type is either
 turning or forward walking in behavioral experiment, and ΔF/F in imaging
 experiment). Most of the preprocessing steps simply averages time traces
 over different dimensions (e.g., repetitions of the same stimulus,
 different ROIs) and the size of those averaged dimension will become 1
 after that processing step. **If you are interested in examining the most
 raw form of the data, the best way to do so is to look at
 `p1_snipMat.snipMat` under `indFly`.** &gt; Note that, because our
 analysis pipeline is set up such that it can perform same analysis on both
 behavioral and imaging data, some features are only relevant to one but
 not to the other (for example,"averageRoi" step does nothing for
 behavioral data, and "normalizedWaling" does nothing for imaging
 data). Also, some of the preprocessing steps are toggled OFF in some
 analysis (i.e., the existence of "combinedOpposites" field in
 indFly cell does not necessarily mean that averaging over mirror symmetric
 versions of stimuli happened in that particular analysis object). &gt;
 In addition to `snipMat`, each `pX_` field contains `name` string, which
 is the name of the corresponding preprocessing step. `p1_snipMat` contains
 `flyResp`, which is a matrix of raw time traces before cutting out
 trial-wise snippets. `epochList` is a matrix with the same length as
 `flyResp`, which represents temporal ordering of the stimulus epochs
 presented. `epochDurations` are a vector containing the duration of each
 epoch (in the unit of frames, which is 60 Hz in behavioral experiments and
 imaging frame rate in imaging experiments). `shiftedEpochStartTimes` is a
 cell array that contains the starting time points of each trial-wise data
 snippet in `snipMat`. `normalizedWalking` contains a field
 `walkRespDuringnterleave`, which is the walking speed during the period
 immediately preceding the stimulus onset, to which the walking speed
 during stimulus presentation is normalized to (see Methods in the paper
 for details). `data` folder contains following .mat files and a folder,
 which correspond one-to-one to scripts in `scripts` folder. *
 `fig1_01_basic.mat` : Behavioral data from wild type flies presented with
 rotational and translational version of the "islands of motion"
 stimuli (Figure 1E, J). * `fig1_02_bar.mat` : Behavioral data from wild
 type flies presented with fast moving bars over different background
 patterns (Figure 1Q). * `fig1_03_orientation.mat` : Behavioral data from
 wild type flies presented with the islands of motion stimuli with either
 horizontal, vertical, or 2D patterns (Figure 1R, S1A). *
 `fig1_04_movingwindow.mat` : Behavioral data from wild type flies
 presented with the islands of motion stimuli with either stationary or
 moving windows (Figure S1D). * `fig1_05_onset.mat` : Behavioral data from
 wild type flies presented with the islands of motion stimuli where the
 onset of rotation of background patterns was delayed. This file contains
 data from two batches of flies (i.e., two 'data' cell arrays)
 that were presented with stimuli in Figure 1U and Figure S1I. *
 `fig3_sweeps.mat` : Behavioral data from wild type flies presented with
 variants of the islands of motion stimuli for stimulus parameter sweeps.
 This file contains data from multiple batches of flies (i.e., multiple
 'data' cell arrays) corresponding to each of the figure panels
 (Figure 3A for contrast sweep, Figure 3B for background fraction sweep,
 Figure 3C for velocity sweep, Figure 3D for frequency sweep, Figure 3E for
 wavelength sweep, and Figure 3FG for contrast/luminance sweep). *
 `fig4_01_T4T5.mat` : Calcium imaging data from T4/T5 neurons presented
 with the modified island of motion stimulus (Figure 4D). Because T4/T5
 neurons and their subtypes were labeled by the identical driver Gal4 line,
 we classified each ROI into specific subtypes based on their response to
 the probe stimuli (see Table S4). The 'data' cell array in this
 file has four cells corresponding to T4a, T4b, T5a, T5b subtypes. *
 `fig4_02_LPTC.mat` : Calcium imaging data from LPTCs presented with the
 islands of motion stimulus. This file contains five 'data' cell
 arrays each corresponding to one of five cell types studied (HS, CH, H2,
 Hx, FD1). * `fig5_transfer.mat` : Behavioral data from wild type flies
 presented with the "split screen" stimuli to probe inter-ocular
 transfer of the suppression of the optomotor response by stationary
 patterns. * `fig6` : This directory contains .mat files containing
 behavioral data for behavioral-genetic screening experiments in Figure 6
 and Figure S4. Each .mat file contains a pair of 'data' cell
 array corresponding to the Gal4&gt;UAS flies and corresponding Gal4/+
 controls. The data files are sorted into three subdirectories (`screen`,
 `replication`, `r13e12`), each corresponding to Figure 6A (initial
 screening), 6B (replication), and S4D (R13E12 split Gal4 screening). *
 `fig7_mi4.mat` : Calcium imaging data from Mi4 neurons presented with
 full-field checkerboard patterns. &gt; In our imaging experiments,
 cells / regions of interests were selected based on their consistent or
 desired responses to the probe stimuli, as detailed in the Method section
 of the paper. Imaging data .mat files (`fig4` and `fig7`) contain
 `data_nonselected` structure (in addition to `data`), where this selection
 process is not performed. * `utilities` The utility functions for data
 analysis and visualization used by the scripts are here. ## Requirements
 The scripts are written in Matlab 2019b, and use functions from Statistics
 and machine learning toolbox.