Comparing diel activity patterns of wildlife across latitudes and seasons: Time transformations using day length

Camera trapping allows scientists to study activity patterns of animals under natural conditions. However, comparisons of activity patterns across seasons or latitudes can be biased, because activity is often attuned to sunrise and sunset, the timing of which varies with latitude and season. Existing transformation methods to solve this problem have limitations. Here, we explore whether and how activity patterns can be transformed more accurately using two alternative ‘double anchoring’ transformations – equinoctial and average anchoring – that anchor activity time to two chosen anchor points during the study period. Using simulated noisy datasets mimicking species with either crepuscular, diurnal or cathemeral activity patterns, we compared the ability of different transformation methods to extract the latent pattern and activity levels under different study conditions. We found that average anchoring best retrieved the original diel activity pattern and yielded accurate estimates of activity level. Two alternative transformation methods – single anchoring and equinoctial anchoring – performed less well. Bias in estimates from using untransformed clock times was most marked (up to 2.5‐fold overestimation) for longer studies covering 4–5 months either side of an equinox at high latitude, and focusing on crepuscular species. We applied the average anchoring method to 9 months of data on Red deer Cervus elaphus, Wild boar Sus scrofa and Mouflon Ovis amon musimon activity as captured by camera traps in National Park Hoge Veluwe, the Netherlands. Average anchoring revealed more pronounced peaks of activity after sunset than was apparent from untransformed data in red deer and wild boar, but not for mouflon, a cathemeral species. Similarly, activity level was lower when calculated using average anchored time for red deer and wild boar, but no difference was observed for mouflon. We conclude that transformation of time might not be necessary at latitudes below 20°, or in studies with a duration of less than a month (below 40° latitude). For longer study periods and/or higher latitudes, average anchoring resolves the problem of variable day length. Code is provided. The transformation functions are incorporated in the r‐package ‘activity’.


| INTRODUC TI ON
Diel activity patterns -the distribution of activity throughout the daily cycle -are a key feature of animal behaviour with important implications for a wide range of ecological and physiological processes (Daan, 1981;Halberg, 1960;Kumar, 2017;Refinetti & Menaker, 1992). Diel activity patterns are an adaptation to environmental variability through the day, and reflect a complex compromise between foraging, resting, predator avoidance, competition, social activities and environmental constraints that determine fitness (Halle & Stenseth, 2012;Kronfeld-Schor, Bloch, & Schwartz, 2013). For example, studies on the onset and end of the active phase, as well as the timing of activity peaks have broadened our understanding of entrained circadian rhythms (Aschoff, 1966;Daan & Aschoff, 1975).
Variation in activity level has also been used to study the tradeoff between foraging and exposure to a predator (Anholt, Werner, & Skelly, 2000;Suselbeek et al., 2014) as well as to assess activity levels in the wild using camera traps (Rowcliffe, Kays, Kranstauber, Carbone, & Jansen, 2014), and the amount of activity overlap between species has been proposed as a metric to study temporal niche partitioning or predator-prey interactions (Linkie & Ridout, 2011;Oliveira-Santos, Zucco, & Agostinelli, 2013;Ridout & Linkie, 2009).
In most terrestrial animals, the daily organization of activity is regulated by the endogenous circadian clock and a more direct response to light levels. For example, the relative position of the sun is directly related to the level of illumination and has been used to explain onset of activity in ectothermic organisms, such as lizards (Díaz, 1991) or butterflies (Pivnivk & McNeil, 1987), and in endothermic animals such as marmots (Semenov, Ramousse, Berre, Vassiliev, & Solomonov, 2001). The daily modulation in light intensity serves as a so-called Zeitgeber that entrains the internal clock (Aschoff, 1960).
Activity has mostly been studied in laboratory settings with full control over day length and light levels, usually at the individual level.
However, technological advances offer the opportunity to also study activity patterns of wildlife in the field at natural light levels. For example, radio tags (Cochran, 1972), GPS tags (Fancy, Pank, Douglas, Curby, & Garner, 1988) or accelerometers (Yoda et al., 2001) can be attached to animals to study activity patterns at the individual level. Similarly, other devices that remotely record the presence of active animals, such as camera traps or acoustic sensors, can be used to study activity patterns at the population level (Bridges & Noss, 2011;Croll et al., 2002;Rowcliffe et al., 2014). These techniques offer great potential to study diel activity patterns in free-ranging animals (Frey, Fisher, Burton, & Volpe, 2017).
However, a pertinent problem with activity data from these sensors arises when day length varies across the time or location at which observations are obtained. For example, day length varies twofold over the year at 50° latitude (e.g. Belgium), and even threefold at 60° latitude (e.g. Southern Norway). Animals often adjust their activity to accommodate to the lengthening and shortening of daylight (Boulos & Macchi, 2005;Boulos, Macchi, & Terman, 1996;Daan & Aschoff, 1975). The consequence of studying activity patterns in such environments is that these data cannot simply be lumped across sensors that operate at different day lengths or latitudes, as this results in blurring of activity patterns that are tuned to solar Zeitgebers. Doing so can introduce important biases, such as underestimation of activity peak heights and misinterpretation of timing (Nouvellet, Rasmussen, Macdonald, & Courchamp, 2012), and complicate meaningful comparison of activity patterns across seasons and between sites and studies.
A solution to this problem is to convert the sensors' clock time -a human invention -into some variable that relates to the solar cycle. One way to do so is to express the timing of activity relative to an anchor point in the day that is known or expected to be the key Zeitgeber (e.g. sunrise, sunset, midday or midnight).
This has been defined as the difference in phase angle (Daan & Aschoff, 1975). Henceforth, we refer to synchronizing activity patterns over multiple cycles with a single anchor as 'single anchoring'. Single anchoring was implemented by Nouvellet et al. (2012), who used the NASA almanac to translate the clock time of observation into deviation from either sunrise, sunset or any time of interest (such as a park's opening time), based on the latitude and date of observations, to align activity patterns to one point in the solar cycle. However, this method does not solve the problem of variable day length. For example, if a population with activity peaks at sunrise and sunset is monitored over a period when day length varies from 8 to 12 hr, and the anchor used is sunrise (hour 0), the first peak will be logged near 00:00 every day, while the second peak will be logged near 12:00 on the longest day, and near 08:00 on the shortest. This results in blurring of the second activity peak when calculating an average activity pattern (Daan & Aschoff, 1975;Jagota, Horacio, & Schwartz, 2000). This is problematic because both sunrise and sunset are important Zeitgebers (Aschoff, 1960), and animal activity can be affected by both (Pittendrigh & Daan, 1976). Even when animals do not directly perceive sunrise and sunset (for example in fossorial species), active phase may still vary in response to changes in day length (Hut, van Oort, & Daan, 1999). For this precise reason problem of variable day length. Code is provided. The transformation functions are incorporated in the r-package 'activity'.

K E Y W O R D S
activity level, activity pattern, camera trapping, day length, diel activity, double anchoring, equinoctial anchoring, seasonal variation, mouflon, red deer Daan and Aschoff (1975) proposed to use midday or midnight as individual anchors, however, this would still result in the (less pronounced) blurring of both peaks of activity in this hypothetical bimodal species.
An alternative way of transforming clock time to account for changes in day length during the study is to express timing of activity relative to two anchor points (double anchoring). We see two contrasting ways of doing this. The first is to express time relative to the length of the day or the night, and giving night and day equal lengths. Henceforth, we refer to this method as 'equinoctial anchoring'. A potential problem with equinoctial anchoring, however, is that it stretches and shortens day and night lengths to a constant value regardless of the study time and place, and therefore, regardless of the actual day length during the study period. Equinoctial anchoring might thus introduce bias due to unnecessary stretching and distortion of the pattern. The second double anchoring transformation uses the average moments of sunrise and sunset over the study period as anchoring points. This method, henceforth referred to as 'average anchoring', works with average sunrise and sunset calculated only for the study period, and specifically the portion during which the target species was active (e.g. the species did not go into hibernation). These two methods become equivalent when the average day length in a study period equals 12 hr.
In this paper, we explore whether and how double anchoring of time can be used as a standardized measure of time in studies of wildlife activity with varying day length. We first explain the problem and the principle of two alternative double anchoring methods. Then we use simulations to assess the performance of the two methods and the existing single-anchoring method (Daan & Aschoff, 1975;Nouvellet et al., 2012). For the best-performing method, we verify whether estimates of activity level remain unbiased as study length and/or latitude increase. Finally, apply the best-performing

| TIME TR AN S FORMATI ON ME THODOLOGY
We explore three different transformation methods: the existing single-anchoring (Nouvellet et al., 2012), and two double anchoring methods; equinoctial anchoring and average anchoring.
Single anchoring -Phase angle difference is commonly used to quantify the differences in timing between events (e.g. between activity peaks, between sunrise and activity peak). Nouvellet et al. (2012) proposed looking at activity patterns as derived from camera traps not through the use of clock time, but through the phase angle difference between clock time of the event, and clock time of either sunrise or sunset. Providing the necessary tools to calculate the clock time of sunrise or sunset Zeitgebers for a specific latitude, longitude and date, Nouvellet et al. (2012) proposed anchoring clock time to a single Zeitgeber as: where Z is the clock time of the Zeitgeber, T c is the clock time of activity and T s is the single-anchored time of activity. In order to bring T s values falling outside the time unit of the daily cycle back into the range (i.e. satisfying 0 < T s <2π on the radian scale), we need to wrap values on the circular scale. In practice, wrapping radian values can be achieved by the operation T s mod 2π.
Double anchoring -We propose transforming time with respect to two Zeitgebers by calculating proportional progress through the interval between Zeitgebers within which the activity lies, and projecting this onto a transformed scale with fixed Zeitgeber times.
Given clock time of activity T c , clock times of Zeitgebers preceding and following the activity respectively Z 1 and Z 2 , and the times of those Zeitgebers on the transformed scale Ż 1 and Ż 2 (the anchor times), double anchored time, T d , is given by: The resulting values, as well as the intermediate angle differences, are wrapped to ensure that all of them fall within the unit of the daily cycle. For equinoctial anchoring, we fix transformed Zeitgeber anchor points at π/2 and π3/2 on the radian scale, rendering the day into two equal halves. For average anchoring, we fix transformed anchor points at the mean Zeitgeber times across the study period, weighted by the number of records on each date.
Note that average anchoring equals equinoctial anchoring when the average study length equals exactly 12 hr.

| Transformation performance
To assess how the three methods performed, we simulated data for three different activity patterns, representing the range of typical patterns observed in the wild: (a) sharp activity peaks at sunrise and sunset (crepuscular pattern), (b) activity only during the day, with weak peaks at sunrise and sunset (diurnal pattern), and (c) continuous activity throughout the day and night, with a single peak at sunset (cathemeral pattern). Note that we did not consider a nocturnal pattern since this would simply be a reframing of the diurnal pattern, with the same outcome. For each pattern, we simulated data for the 3 months between a solstice and an equinox, with day length changes representative of 60° latitude (e.g. Southern Norway), and tested how well the three different solar time transformation methods were able to reveal the known, underlying patterns. To do so, we first generated hypothetical activity patterns using Von Mises mixture distributions (Figure 1a; Rowcliffe, 2014;Vazquez, Rowcliffe, Spoelstra, & Jansen, 2019). We then simulated activity data by sampling 5,000 activity events from each distribution across the season with varying day length. Finally, using the 'fitact' function from the r-package 'activity' (Rowcliffe, 2014), we fitted kernel density functions and calculated activity levels  for the untransformed data, as well as to the data after each of the three transformations.
We found that the kernel fitted to untransformed clock times showed activity peaks at approximately the right times, but the peaks were flattened in all three cases, most markedly in the crepuscular pattern ( Figure 1b). Activity levels for crepuscular, diurnal and cathemeral patterns were overestimated by about 30%, 10% and 20% respectively. The kernel fitted to times transformed with single anchoring (Nouvellet et al., 2012) also showed activity peaks at approximately the right times, but here the non-anchoring peaks in double-peaked patterns (crepuscular and diurnal) were flattened, especially so in the crepuscular pattern. This transformation retrieved the true pattern well for the single-peaked cathemeral pattern (Figure 1c), probably because the anchor point was closer to the peak of activity. However, despite the distortion of double-peaked patterns, the fact that one peak was well described meant that activity level estimates were approximately unbiased for all three patterns using single anchoring. Equinoctial anchoring sharpened and slightly shifted the estimated activity peaks for the crepuscular pattern, retrieved the underlying diurnal pattern well, and flattened the frequency away from the peak for the cathemeral pattern ( Figure 1d). As a result, activity level was underestimated by about 15% for the crepuscular pattern, but was approximately unbiased for the other two patterns. Finally, the kernel fitted to data after average anchoring left the original patterns intact (Figure 1e), and the activity level estimates approximately unbiased in all cases. Thus, while all transformations were able to extract the true underlying pattern well in particular cases, only average double anchoring was able to do so in all cases, and was therefore superior to the other transformation methods in both retrieving the original activity pattern from noisy data and yielding an acceptably accurate estimate of activity level.

| Transformation behaviour
For average anchoring, which was the best-performing method, we measured how accurately it was able to estimate activity level under a range of scenarios, comparing this with estimates without data transformation. We generated hypothetical activity patterns of three activity types, as above, but for three different latitudes (20°, 40° and 60°). For each latitude, two study timings were simulated, one centred on an equinox, and one centred on a solstice, representing two studies of similar length, but different variation in day length. The activity data for each of these scenarios was sampled with study period ranging from 60 to 360 days in length. For each combination of study length, timing and latitude, we calculated the estimated activity level using both clock time and average anchored time and expressed it relative to the true underlying activity level used to generate the data.
We found that bias in activity level estimates from untransformed clock time data increased with study length, especially at higher latitudes and for studies centred around an equinox F I G U R E 1 Performance of alternative time transformation methods in recovering diel activity patterns from simulated noisy activity data. Columns represent three activity patterns from which data were generated, from left to right: crepuscular, diurnal and cathemeral. Rows represent: (a) Von Mises mixture distributions used to generate random data, with heat mapping indicating a time progression from the autumn equinox (red) to the winter solstice (blue) at a latitude of 60°. On any given day, the pattern is essentially the same as on any other, but with peaks tracking sunrise or sunset. Distributions of (b) untransformed, (c) single-anchored, (d) equinoctial anchored and (e) average-anchored activity data, showing data frequencies (grey bars) with fitted kernel density distributions (black lines), and the datagenerating instantaneous diel activity pattern (green). Vertical red lines in (c)-(e) represent transformations anchors (Figure 2a-c). This pattern of bias was most marked for the cre-

| APPLI C ATI ON TO WILDLIFE
We tested the average anchoring transformation by applying it to data on activity of Red deer, Wild boar and Mouflon in National Park De Hoge Veluwe, the Netherlands (52.1 N, 5.8 W) . We chose these three species because they show very different activity patterns: Red deer activity is usually crepuscular, with activity peaks at dawn and dusk (Ensing et al., 2014); Wild boar is nocturnal (Caruso et al., 2018), particularly in areas with high human disturbance (Keuling, Stier, & Roth, 2008); and mouflon has been described as cathemeral, and might show increased nocturnal activity during the summer months (Bourgoin et al., 2008).
Activity data were obtained from infrared triggered camera traps (Reconyx HC500), which photograph warm-bodied animals that move in front of a passive infrared motion sensor, and store date and time as image metadata. If camera traps are placed randomly with respect to activity locations, the distribution of time stamps of photographs reflects the timing of activity .
Cameras were set to take a series of 10 photographs upon every trigger, without delay between triggers, and operated day and night.
Time stamps of events were recorded in Central European time (CET) throughout the year, that is, ignoring wintertime-summertime.
Images were grouped into sequences and annotated by volunteers with the aid of the online image processing and archiving system Agouti of Wageningen University (www.agouti.eu).
We used data gathered between 1 August 2013 and 31 July 2014 from 48 permanent camera trap stations, 70 cm above the ground, that were distributed according to a stratified random design (see more information in Appendix A) which resulted in a total of 944 random records for the Red deer, 229 for the Wild boar and 405 for the mouflon (Appendix B). These data are not enough to carry out a thorough analysis on the ecology of these species, but they are sufficient to illustrate the effects of time transformation.
To illustrate the variation in day length present at this latitude, we calculated the activity patterns separately for two 6-month periods: one centred around the autumn equinox (with a variation in day length of over 9 hr) and another 6-month period centred around the winter solstice (with a variation in day length of around 4:30 hr).
The data for the latter were not collected chronologically, since data from the months of June and July were gathered in 2014. All analyses were carried out using r (R Core Team, 2017). Times of sunrise and sunset for the duration of the study were obtained using the 'Daylength' function in the 'insol' package in r (version 1.1.1; Corripio, 2014). We used these times to transform event clock times using average anchoring (Equation 2; Figure F1). We then fitted circular kernel models to both clock and transformed event times using the 'fitact' function in the 'activity' package (version 1.2; Rowcliffe, 2014), estimating error by bootstrapping with sampling from the data. We also did this for each season (summer was considered to F I G U R E 2 Estimates of activity level, expressed relative to the actual level, as a function of study length, for locations at different latitudes, and depending on the distribution of day length in the study, using either (a, c) clock time, or (d-f) average-anchored time. Columns represent the three underlying activity patterns illustrated in Figure 1,  We found that the activity pattern of Red deer peaked around sunrise and just after sunset, the latter showing the most prominent peak (Figure 3). Both peaks were slightly higher when using average anchored time compared to untransformed time. The effect of the transformation was more apparent for the 6-month study period centred on the autumn equinox (Figure 3e-h). While clock time suggested a diffuse activity peak in the evening (Figure 3g), average anchoring of time revealed a well-defined, higher peak around sunset (Figure 3h). The effect of the transformation was similar for Wild boar ( Figure F2a,d), where the evening peak of activity became much more pronounced after transformation in both study timings, but particularly equinox centred.
In the case of the Mouflon, there appeared to be activity peaks around sunrise and sunset in the solstice-centred data, and a single diffuse activity peak in the afternoon in the equinox-centred data, but the effects of the transformation seemed minimal in both study timings ( Figure   F2e-h).
Analysis of the Red deer activity level during these study periods using clock time suggested that activity was higher during the equinox-centred than during the solstice-centred study period, although this difference was not statistically significant (Wald test, W = 3.52, p = .06; Figure 4a). Transformation to average anchored time indicated that the Red deer activity level was in fact more similar between the two study periods (Wald test, W = 1.21, p = .27; Figure 4a).
The comparison between study periods for Wild boar also showed a larger drop in activity level estimate on transformation for the equinox-centred season than for the solstice-centred season such that the relative seasonal activity levels reversed (while remaining not F I G U R E 3 Diel activity patterns of Red deer (Cervus elaphus) in National Park Hoge Veluwe, the Netherlands, captured by camera traps. Patterns are shown in untransformed clock time (left column) and in average anchored time (right column). The four uppermost panels (a-d) show data for the 6 months centred around the winter solstice, while lower panels (e-h) show data for the 6 months centred around the autumn equinox. Activity patterns are shown as both actograms illustrating both seasonal and diel variation (a, b, e and f) and frequencies (grey step functions) with fitted Von Mises kernel distributions (red lines, including dashed lines giving 95% confidence limits), illustrating diel variation aggregated across the season (c, d, g and h). Light grey regions on frequencies (c and g) indicate the range of sunrise and sunset times during the season, while dark grey regions indicate night hours. In (e) and ( For Red deer analysing seasonal patterns, using clock and average anchored time led to different conclusions: clock time suggested statistically significantly lower activity levels during the winter than during the autumn and spring, while these differences were not statistically significant when activity levels were calculated using average anchored times ( Figure F6a). There appeared to be no seasonality to Wild boar activity levels ( Figure F6b), and no apparent differences between the seasonal activity levels calculated using clock time and average anchored time. Mouflon had the lowest activity level during the summer and highest during spring, but similar activity levels were calculated for the solstice-centred and equinoxcentred study periods ( Figure F6c).

| D ISCUSS I ON
Comparisons of activity patterns of free-ranging animals across seasons or latitudes are complicated because day length varies, and animals tune their activity to this variation. We explored whether and how activity patterns can be standardized using two alternative 'double anchoring' transformations. Through simulations, we found that anchoring activity to the average sunrise and sunset times during the study period (average anchoring transformation) yielded accurate diel activity patterns and estimates of activity level for all hypothetical species, even those with sharp activity peaks that shift in response to sunrise and sunset times, despite substantial variation in day length. This transformation made the greatest difference to a strongly crepuscular activity pattern observed over 6 months or more centred on an equinox, thereby maximizing variation in day length.
Applied to real data of three ungulate species from camera traps in National Park Hoge Veluwe, the Netherlands, average anchoring revealed more pronounced peaks of activity than were apparent from untransformed data. The differences between the clock time and average anchored time activity patterns observed in the real data were less dramatic than those observed in the simulations, reflecting the fact that none of the species tested showed such strong activity peaks, or a pattern of activity as consistent as those presented in the simulation. In line with the predictions of the simulations, the greatest effects of transformation were seen in the study windows with the strongest variation in day length (the solstice-centred study period), and in Red deer and Wild boar, the two species which did have clear peaks of activity. While the effects of the transformation where most dramatic in species with two peaks of activity, without transformation or when single anchoring, the second peak of activity can disappear. The same can happen to bouts of activity that occur later than the anchor point. We, therefore, suggest that time transformation is done regardless of the apparent shape of the activity pattern extracted using clock time.
We found that estimation of activity level, the proportion of the day animals are active, was consistently accurate only after average anchoring of time, although for species with only one peak of activity single anchoring (when the anchoring is made at the time of the peak) also provided accurate activity level estimates. Analyses based on untransformed clock time overestimated activity levels due to flattening of the apparent activity pattern. Single anchoring (Nouvellet et al., 2012) and equinoctial anchoring also performed poorly in some cases. Single anchoring only aligns patterns to a single point, so does not control for variation in day length, which may be important when species activity allocation is sensitive to both sunrise and sunset. This approach remains useful to study the timing of specific behaviours within part of the daily cycle, for example, the responses of a morning activity peak to time of sunrise, or the effects of disturbance events on the timing of a specific behaviour, but in the case of studying activity patterns over the full daily cycle, it can lead to wrong conclusions by distorting behavioural responses to the key Zeitgebers. Equinoctial double anchoring showed improved detection of the full diel activity pattern, but did not yield accurate activity level estimates, tending to oversharpen the peaks of activity.
F I G U R E 4 Comparison of the activity level of Red deer Cervus elaphus, wild boar Sus scrofa and mouflon Ovis amon musimon between two different periods using clock time (CT) and average-anchored time (AAT). Activity levels calculated using clock time (CT) suggested that the activity level was higher during the equinox-centred study period. After transformation to average-anchored time (AAT), this difference became smaller for red deer and wild boar, but not for mouflon However, we also found that transformation was not always nec-  (Ensing et al., 2014;Gaynor, Hojnowski, Carter, & Brashares, 2018). Average anchored times could aid in analysing these factors, by changing anchors to, for example, a park's opening and closing times. Likewise, studies of activity patterns in the polar circle might require anchoring to the highest and lowest sun position or some other Zeitgeber. Similarly, for analyses of crepuscular species, one might want to consider using a specific illumination level as anchor points, rather than the proposed sunrise or sunset anchors to better accommodate the moment of highest activity. Both choices will help define the peak, although, if the studied time period is too long, the amplitude of the curves under the peaks might widen to represent a higher activity level with increasing twilight duration.
The daily distribution of activity may be a consequence of other external cues (weather conditions, seasonal changes in temperature, habitat type; Hoogenboom, Daan, Dallinga, & Schoenmakers, 1984; van der Vinne et al., 2014)) and internal cues (such as reproductive status, age or sex; Conde et al., 2010). In these cases, analysing long periods of time together might introduce unnecessary noise in the pattern. Consequently, depending on the question at hand, the data may be better analysed using separate time periods, spatial scales or, if possible, classes of animal.
In conclusion, average anchoring of time resolves the problem of variable day length in studies of animal activity across seasons and latitudes, and allows peaks in activity to be identified more clearly and without bias. This may enable us to perform more robust comparisons of activity patterns and levels across sites and species in order to better understand ecological and human drivers of these processes. The method is especially valuable for studies at higher latitudes across multiple months.

ACK N OWLED G EM ENTS
We thank National Park De Hoge Veluwe, its volunteers and Yorick Liefting for help with collecting and processing the camera trap data. Data collection was financially supported by the Province of Gelderland.

DATA AVA I L A B I L I T Y S TAT E M E N T
Data and example code for the wildlife example, as well as example code for the simulations can be found in Dryad Digital Repository