DOI: 10.5061/dryad.g1jwstqwj
title: Asynchronous haltere input drives specific wing and head movements in Drosophila

description: Halteres are multifunctional mechanosensory organs unique to the true
 flies (Diptera). A set of reduced hindwings, the halteres beat at the same
 frequency as the lift-generating forewings and sense inertial forces via
 mechanosensory campaniform sensilla. Though haltere ablation makes stable
 flight impossible, the specific role of wing-synchronous input has not
 been established. Using small iron filings attached to the halteres of
 tethered flies and an alternating electromagnetic field, we experimentally
 decoupled the wings and halteres of flying Drosophila and observed the
 resulting changes in wingbeat amplitude and head orientation. We find that
 asynchronous haltere input results in fast amplitude changes in the wing
 (“wing hitches”), but does not appreciably move the head. In multi-modal
 experiments, we find that wing and gaze optomotor responses are disrupted
 differently by asynchronous input. These effects of wing-asynchronous
 haltere input suggest that specific sensory information is necessary for
 maintaining wing amplitude stability and adaptive gaze control.
description: High speed videos were recorded at 750-2000FPS from tethered,
 flying Drosophila using high speed cameras (TS4 or IL5, Fastec Imagining,
 San Diego, CA, USA). Haltere kinematics were extracted using the
 DeepLabCut python package (Mathis et al. 2018, Nature Neuroscience) or the
 DLTdv package (Hedrick 2008,  Bioinspiration and Biomechanics).
 Concurrent videos recorded at 100FPS using an industrial machine
 vision camera (Point Grey Chameleon3, FLIR, Wilsonville, OR, USA) provided
 head yaw and wingstroke envelope measurements computed using flyalyzer
 (https://github.com/michaelrauscher/flyalyzer), a custom MATLAB (The
 Mathworks, Natick, MA, USA) program.
description: Dataset includes extracted kinematic timeseries in *.mat format,
 which is readable by MATLAB and the freely-available OCTAVE software
 (https://www.gnu.org/software/octave/index). Included README files provide
 details about fields in each data file Included
 analysis scripts were written with MATLAB 2021b and should function with
 this and subsequent versions.
description: "treatedkinematics.mat" contains aggregated haltere tracking
 data from high-speed lateral aspect videos. It contains the
 "flies" structure array with the following fields: haltroot:
 [x,y] point within video frame marking haltere joint with the thorax
 wingroot: [x,y] point marking the most anterior point in the wing root
 treatment: LEFT or RIGHT depicts which haltere is treated with an iron
 filing vstim: Voltage trace from arena controller showing angular position
 of the stripe stimulus in the yaw aspect (where applicable), with original
 daq sampling rate vspeed: Pattern velocity of visual stimulus in /s, or 0
 for no moving visual stimulus magstim: Voltage trace from DAQ for control
 pulses sent to magnets (where applicable), with original daq sampling rate
 magepoch: Vector labeling time indices with magnetic stimulation applied
 at that time. 36Hz trials are erroneously labeled as 37Hz. 72Hz trials
 erroneously labeled as 75Hz trials. onstartix: Manually-annotated video
 frame indices marking the beginning of segments with acceptable tracking,
 where the magnetic stimulation is active onstopix: Manually-annotated
 video frame indices marking the end of segments with acceptable tracking,
 where the magnetic stimulation is active offstartix: Manually-annotated
 video frame indices marking the beginning of segments with acceptable
 tracking, where the magnetic stimulation is not active offstopix:
 Manually-annotated video frame indices marking the end of segments with
 acceptable tracking, where the magnetic stimulation is not active haltpos:
 Two-column [x,y] haltere position timeseries. Regions outside of those
 annotated by onstartix/onstopix and offstartix/offstopix have not been
 verified to be accurate. wingpos: Two-column [x,y] coarse wing position
 timeseries. sync: daq trace for camera shutter from concurrent top-down
 kinematics camera recording fastecfs: sampling rate for high-speed camera
 from which haltang and wingbeat were processed camfs: sampling rate for
 top-down kinematics camera daqfs: sampling rate for the daq fastect:
 timestamps for high-speed camera frame indices, aligned with concurrent
 timestamps from daq and top-down kinematics camera daqt: timestamps for
 daq, aligned with concurrent timestamps from high-speed camera and
 top-down kinematics camera camt: time-stamps for top-down kinematics
 camera, aligned with concurrent timestamps from high-speed camera and daq
 fname: originating video filename \===
 "untreatedhalteredata.mat" contains manually-annotated
 aggregated haltere tracking data from high-speed lateral aspect videos. it
 contains the "halts" structure array with the following fields
 haltang: Haltere elevation timeseries hpos: haltere position within video
 frame hroot: [x,y] point within video frame marking haltere joint with the
 thorax wroot: [x,y] point marking the most anterior point in the wing root
 hbf: average stroke frequency of the haltere during the annotated epoch
 fps: high-speed camera frame rate fname: originating filename frameidx:
 frame indices of the originating video from which the time series is drawn
 side: indicates which aspect of the fly (LEFT or RIGHT) is in view of this
 video untreatedanimal: boolean value for whether this reflects a haltere
 elevation trace from an untreated animal, or the untreated haltere
 opposite to the treated haltere of a treated animal treat: Haltere
 treatment. 0 for untreated. 1 for left-side iron-filing treated. 2 for
 right-side iron filing treated. 3 for left haltere ablated. 4 for both
 halteres ablated \=== "wingbeatdata.mat" contains aggregated
 wingbeat data from high-speed lateral ascpect videos It contains the
 "wings" structure array with the following fields: beat:
 Z-normalized coarse wingbeat timeseries as detected by machine vision
 script. tstamps: per-frame timestamp vector referenced against the
 timestamps of the associated kinematics camera video fs: sampling rate of
 the high-speed camera, ranging from 750-2000Hz fname: base filenames of
 the the associated kinematics camera video \=== "kinetbl.mat"
 contains aggregated head and wing kinematics data in the form of a table
 variable of the same name. It contains the following columns: WingL: Left
 wing downstroke angle, in degrees, zero-padded to 1000 samples WingR:
 Right wing downstroke angle, in degrees, zero-padded to 1000 samples Head:
 Head yaw angle, in degrees, zero-padded to 1000 samples VStim: Voltage
 trace from arena controller showing angular position of the stripe
 stimulus in the yaw aspect (where applicable), decimated from original
 timeseries to correspond with video frames from each segment MStim:
 Voltage trace from DAQ for control pulses sent to magnets (where
 applicable), decimated from original timeseries to correspond with video
 frames from each segment VSpeed: Pattern velocity of visual stimulus in
 /s, or 0 for no moving visual stimulus MSpeed: Activation frequency of the
 magnetic haltere stimulation in Hz. 0 indicates no magnetic stimulation. 1
 indicates prolonged uniform magnetic stimulation. Treatments: Haltere
 treatment. 0 for untreated. 1 for left-side iron-filing treated. 2 for
 right-side iron filing treated. 3 for left haltere ablated. 4 for both
 halteres ablated SegLen: length of kinematic timeseries without the
 zero-padding [for each row, starting from index 1 to the value in seglen
 gives the original timeseries] SegIndex: frame indicies in the original
 video corresponding to the data in each row Filename: name of original
 filename from which data in each row were aggregated VidID: unique
 numerical name identity for each video from which data were drawn. all
 time series in kinetbl.mat are sampled at 100Hz \===
 "flydlookup.mat" contains unique identifiers for each fly in the
 dataset, enabling individual flies to be identified across multiple
 videos. It contains the following columns "fnames" which
 consists of the base filenames for each video from the low-speed
 kinematics camera "uuids" which contain the matching unique
 identifer \=== Support functions for analysis scripts in this repository
 include: ciplot: plots the mean and confidence interval of aligned traces
 fftmatic: zero-pads and calculates fft and frequency vector for time
 series. multcomparegroups: calculates homogenous subset letters from
 output of the multcompare function or similarly formatted matrix of
 pairwise comparisons and corrected p-values \===
 "RauscherAndFox2024_Videos.zip" contains all videos included in
 the dataset.