DOI: 10.5061/dryad.70rxwdcbf
title: Use of a pronotal shield as an extraretinal short-wavelength filter for the dorsal compound eye of an insect

description: Adaptations of nocturnal insects’ visual systems to dim light environments
 include increased photon capture and sensitivity. Yet this risks
 saturation, which is countered by screening pigments limiting the photons
 reaching the photoreceptors. Male glow-worms must detect the females’
 green bioluminescent glow at night to mate. In addition to screening
 pigments, males possess a differentially pigmented pronotal shield (PS)
 beneath which they can retract their compound eyes. The possible role of
 the PS in behavioural regulation of the light reaching their eyes has not,
 to our knowledge, been investigated. Here, we characterise the spectral
 filter properties of the PS and combine this with behavioural assays of
 males’ response to light exposure. We show that the PS acts as a
 differential filter transmitting longer-wavelengths of light to the
 compound eyes beneath while blocking shorter-wavelengths. Male glow-worms
 in the dark or in the presence of green light extend their head but
 rapidly retract it beneath the PS when exposed to white and UV light
 thereby shielding their compound eyes. Thus, our findings show the PS is a
 novel, behaviourally implemented extraretinal optical filter for the
 compound eye.
description: # Use of a pronotal shield as an extraretinal short-wavelength filter for
 the dorsal compound eye of an insect Dataset DOI:
 [10.5061/dryad.70rxwdcbf](10.5061/dryad.70rxwdcbf) ## Description of the
 data and file structure In this study we combine measurements of light
 transmission through the darkly pigmented and translucent regions of male
 glow-worms’ pronotal shield with behavioural assays of the effects of
 UV/white light exposure to test the potential role of the pronotal shield
 in reducing the intensity of light reaching the compound eye, and
 it's behavioural implementation. We demonstrate that the pronotal
 shield of glow-worms acts as an extraretinal short wavelength filter for
 the dorsal compound eye. ### Files and variables #### File:
 Trackball_raw_data.zip **Description:** Contains all videos that were
 manually analysed to obtain males' head position (retracted or
 extended from beneath the headshield) under different light conditions.
 Trials all include an initial control trial trial where males are
 presented with a dummy female (green LED), followed by a test trial where
 males are exposed to UV or white light. Both light condition are separated
 into two folders, each containing individual subfolders for all tested
 males. **Files description:**  For each males, folders contain: *
 **"Trackball_GW_cam[...].avi"**: the raw video file *
 **"Trackball_GW_cam[...].csv"**: a file containing the list of
 frames and timestamps of the video *
 **"Trackball_GW_LED_stim[...].csv":** LED file corresponding to
 the timestamps of the light stimulation Variables are described below when
 used in the relevant scripts in "Trackball_analysis.zip". ####
 File: Trackball_analysis.zip **Description:** This folder contains all the
 R scripts used to analyse the trackball data. The data folder contains the
 manually labelled frames for each video, indicating head position which is
 subsequently analysed in the script "03-Analysis.Rmd". #####
 Subfolders & file description: 1. **Code:** * **Data_preprocessing:**
 Contains 3 scripts for pre-processing the raw data : *
 **"00-Extract_frame_of_LED.Rmd"**: Extract the frames relevant
 to the current analysis from the camera file and merge with times of LED
 stimulation *  **"01-Extract_CAM_file_before_after.Rmd":**
 Create a file of the relevant frames with an empty column for
 "Head_position" to be filled in manually. *
 **"02-Create_summary_files.Rmd"**: After manual entry of head
 position for each frames, this script creates summary files containing the
 retraction latency and duration per male per trial and averaged across all
 males. * "**03-Analysis":** .Rmd script to analyse glow-worms
 head position (output from script 02-). .html is the output of the plots.
 2. Data: * **"UV/" and "White/" folders**: Contain the
 raw data obtained from the trackball. For each tested glow-worms, the
 folders contain 3 files : * **"GW[...]_head_in_time.csv" and
 "GW[...]_LED.csv":** Raw data from the trackball -containing the
 time of each frame, and from the LED stimulator -containing the time at
 which the LEDs where switched ON/OFF. Both the file are merged in script
 00- to extract relevant frames. The relevant variables are described in
 below the "**GW[...]_CAM_short.csv**" and
 "**GW[...]_UV_LED_frames.csv**"  descriptions. *
 **"GW[...]_CAM_short.csv"** = the camera showing each frame and
 before manually assessing head location. Variables are: * GW = Glow-worm
 ID number * frame_nbr = the frame number * interframe_interval = the time
 between current frame and the previous frame (in seconds) * Time_norm =
 the time in seconds, normalised to the time the LED changes from green to
 white/UV. * Side = the side the green LED was presented (L/R for left or
 right) * LED = the colour of the LED currently ON (G for green, W for
 white and UV for ultraviolet) * head_position = empty column added for
 filling with manual assessment of head position. *
 **"GW[...]_UV_LED_frames.csv"**:  contains the times at which
 the LEDs where switched ON/OFF, variables are: * LED = the colour and side
 of the LED currently ON (0 for all LEDs off, L/R or Left_green/Right_green
 for green on the left or the right side, W for white and Right_UV or
 Left_UV for ultraviolet) * Time_stamp = the time recorded by the LED
 stimulator * **"Manual_analysis_time_head_out" "/UV"
 and "/White"**: Contains a copy of the previously generated
 "**GW[...]_CAM_short.csv**" files. Head position has been
 manually assessed and entered in the last empty column
 "head_position": * head_position = "i" for inside
 (i.e., retracted beneath the pronotal shield) and "o" for
 outside (i.e,. extended out from under the shield) * All other .csv files
 are collation or summaries of the previous files: *
 **"UV_all_GW.csv" and "White_all_GW.csv"**: Collated
 data from all **"GW_CAM_short.csv"** files. One variable is
 added: * Head_status = head_position expressed as binary data (0 = head
 out, 1 = head in) * **"UV_latency_summary.csv" and
 "White_latency_summary.csv"**: Summary table showing the time
 males spent with the head in or out of the pronotal shield in the
 different lighting conditions. Variables are: * Latency_to_head_retraction
 = average time before the male retracted the head under the pronotal
 shield (in seconds). * time_in_ctrl = time the male spent with the head
 retracted beneath the pronotal shield when the green light is on *
 time_out_ctrl = time the male spent with the head outside of the pronotal
 shield when the green light is on * time_in_alan = time the male spent
 with the head retracted beneath the pronotal shield when the white or UV
 light is on * time_out_alan = time the male spent with the head outside of
 the pronotal shield when the the white or UV light is on 3.
 **"TB_head_retraction.Rproj"**: The R project used to read and
 run all scripts described above. #### File:
 Spectrometry_data_and_analysis.zip **Description:** This folder contains
 all the data and scripts used to analyse the optical measurement data. Raw
 data obtained by the powermeter and spectrometer are located at
 "Data/Power/" and "Data/Spectrum/" respectively. After
 preprocessing the raw data (scripts 00-, 01-, and 02-), analysis is done
 for the spectrum (script 03-) and power (script 04-). ##### Subfolders
 & file description: 1. **Code:** * **Data_preprocessing:** Contains 3
 scripts for data pre-processing the raw data *
 **"00-Extract_all_power_photon.Rmd"**: extracting power values
 in photons * **"01-Calculate_photon_ratio_attenuation.Rmd"** :
 calculating the photon attenuation ratio *
 **"02-Extract_all_spectrum.Rmd"**: extracting the spectrums from
 the raw spectrometry data * **"03-Spectrum_analysis"**: .Rmd
 script to analyse the spectrum output from script 02-. .html is the output
 of the plots. * **"04-Power_analysis.Rmd"**: .Rmd script to
 analyse the power output from script 00- and 01-. .html is the output of
 the plots. 2. **Data:** * **Power/Recordings**: Contains all the raw power
 recordings for each glow-worm (GW) pronotal shield (.csv). In each GW
 folder, .csv files correspond to the recording of the tested wavelength,
 going through the control slide (S1) or the pronotal shield slide (S2).
 For the pronotal shield slides, loc_A corresponds to a recording in the
 light area of the pronotum, while loc_B corresponds to a recording in the
 dark area. Loc_A and loc_B in the S1 slides are the corresponding control
 recordings. * **File name format:** Male glow-worm ID number \_ tested
 wavelength \_ slide number \_ powermeter wavelength setting \_ recording
 location. NB : the recordings were all tested with both 200 nm (default
 powermeter setting) and the actual tested wavelength, only the later was
 used for analysis. * **File content:** the first few lines of the file are
 the settings of the powermeter. From line 15, variables are : * Samples:
 ID of the sampled point * Date * Time * Current (A) * Power (W) *
 Irradiance (W/cmÂ²) * Power (dBm) * Saturation (%) *
 **Spectrum/Recordings**: Contains all the spectrum for each glow-worm (GW)
 pronotal shield at each tested wavelength. In each GW folder, .spf2 are
 the spectrum in the native trace format used by the ThorSpectra software,
 and the .txt files contain the raw points for use in analysis. Loc_A
 corresponds to a recording in the light area of the pronotum, while loc_B
 corresponds to a recording in the dark area. * **File name format:** Male
 glow-worm ID number \_ tested wavelength \_ recording location. * **File
 content:** For each narrowband LED and the white broad spectrum LED
 recorded at the same integration time, variables are : * V1, V3, V5, V7,
 V9, V11: Wavelength (nm) * V2, V8: Intensity control with LED off * V4,
 V6: Intensity measured through the control slide * V10, V12: Intensity
 measured through the pronotal shield. For recordings of the white broad
 spectrum LED, measured through the dark region only and with the maximum,
 integration time ("whitemax" files) variables are : * V1:
 Wavelength (nm) * V2: Intensity * All other files in the data folders are
 the power and spectrum data output obtained by processing the raw data
 using scripts 00-, 01- and 02- and are the ones used by the analysis
 script. Variables are described below (only the first time they appear) :
 * **"All_GW_attenuation.csv"** contains the mean percentage of
 attenuation for each GW at each wavelength, variables are: * gw = ID of
 the glow-worm * recording_area = dark or light recording area *
 tested_wavelength = the theoretical LED wavelength in nanometres. *
 percent_left = the percentage of light going through the pronotal shield
 compared to the control (%) * attenuation = the percentage of attenuation
 (100-percent_left, in %) * **"All_GW_power_W.csv" and individual
 "GW[...]_power_W.csv"**:  contains the mean power for each GW at
 each wavelength, or the individual power recordings per GW, respectively.
 Variables have the same structure: * nm_setting = the wavelength setting
 of the powermeter, value is 200 nm (default) or the actual tested
 wavelenght. Only the actual values are used for the analysis. * test = 
 whether the value is from a control slide or the pronotal shield slide. *
 Time_sec = time in seconds * Power_W = Power in Watts * Photon_flux = in
 photon/seconds * "**All_GW_spectrum_colours.csv" and 
 "All_GW_spectrum_whites.csv"**: all spectrums for all males.
 Variables are: * lamba = recorded wavelength in nanometers * off =
 Intensity control measured with LED off * ctrl: Intensity measured through
 the control slide * shield: Intensity measured through the pronotal
 shield. * **"2025_Headshield_spectrometry.Rproj":** The R
 project used to read and run all scripts described above. ## Code/software
 All analysis was performed in R 4.3.2. Packages used are indicated at the
 top of each script, and all scripts are annotated. Additional information
 can be found in the previous section describing each file.