Singing behaviour of Ruby-crowned Kinglets (Regulus calendula) in relation to time-of-day, time-of-year, and social context
Data files
Apr 30, 2020 version files 11.57 MB
-
Fahmy_Wilson_RCKI_song_localization.R
-
Microphone_Coordinates.csv
-
RCKI_MasterFile.csv
-
Sunrise.GooseBay.csv
Abstract
Methods
We assessed diel and seasonal patterns of song production by setting up 112 microphone arrays for a minimum of 24 hours each from 16 May to 14 July 2016 (n = 70), and from 16 May to 28 June 2017 (n = 42). Each microphone array comprised three (n=13) or four (n=99) autonomous digital audio recorders (Song Meter SM3; Wildlife Acoustics Inc., Concord, MA, USA) arranged in either an equilateral triangle or square with sides approximately 40m in length. Recorders were programmed to record continuously until stopped, and to create a new stereo audio file every 2 h (WAVE format, 24 kHz sampling rate, 16-bit amplitude encoding). Each array was set up in the morning or early afternoon (0800 – 1400 h), and then left to record in the absence of human observers until at least 17:00 h the following day; therefore, recordings sampled the evening chorus on the day of set-up plus the dawn chorus the following day.
For each set of array recordings, we examined the first 5 min of every 20-min period over a 24-h period that began at 17:00 h on the day the array was set up. Recordings were viewed as multichannel (6 channels for arrays with 3 recorders; 8 channels for arrays with 4 recorders) spectrograms (512-point FFT; Hamming window; gain = 25 dB; range = 78 dB) in Audacity, and songs were annotated when they were visible on one or both channels of at least 3 of the audio recorders composing the array.
Annotated songs were localized automatically using a customized program in MATLAB (MATLAB 6.1; The MathWorks Inc., Natick, MA, 2000). Prior to localization, the program bandpass filtered (2400 – 3000 Hz) songs to minimize background noise created by wind, traffic, or other species. The selected frequency range excluded the faint introductory notes of the song, but included the song’s louder third unit, which was always present (Figure 1). The localization process estimates the GPS coordinates of the origin of a sound and provides a unitless measure of localization error that reflects the confidence of the estimate. The procedure included two steps. First, it identified the channel in which the song was the loudest (i.e. the reference channel), and then used waveform cross-correlation to measure the song's time-of-arrival differences between the reference channel and the other seven channels in the array. This step produced a vector containing seven observed time-of-arrival differences. Second, the program superimposed a three-dimensional lattice, with 2-m resolution, over the entire study site, which was defined as the area bounded by the microphone array, plus a 100-m buffer around the array and a 10-m buffer above and below the array. At each vertex in the lattice, the program used the temperature at the time of recording to calculate the speed of sound and the time it would take for a sound to travel from the vertex to each microphone. Those times were then used to produce a vector containing the seven theoretical time-of-arrival differences between the reference channel and the other seven channels. The vertex that minimized the sum of absolute differences between the observed and theoretical time-of-arrival vectors (i.e. localization error) was selected by the program as the most likely origin of the song. This second step was repeated 100 times, with each iteration using a finer-resolution lattice and a smaller study area (equal to the spatial resolution of the previous iteration) centred on the estimated origin of the song from the previous iteration. The result of the localization process is 'RCKI_Masterfile.csv', which is used in R script for further analysis to determine the diel and seasonal singing patterns.
Usage notes
In R script 'Fahmy Wilson RCKI song localization':
Line 5 - set working directory to the file location containing the required csv files: 'RCKI_MasterFile.csv' and 'Microphone_Coordinates.csv'
Lines 185 and 208 - change to your desired file location to export diel and seasonal plots in pdf format
Required packages to run R script: sp, rgeos, dplyr, ggplot2, ggpubr, plotrix
Sunrise.GooseBay.csv: the start and end times of civil twilight at the study site during the sampling period, as determined by National Research Council Canada; http://www.nrc-cnrc.gc.ca/eng/services/sunrise/. Infromation from this dataset was used to create the dashed vertical lines in the diel pattern plot