## 2 Materials and Methods  
### Calculating Periodicity Intensity Using Time-Lagged Overlapping Windows  
A periodogram [12] is a well-established technique for exploring the magnitudes of recurring patterns at different frequencies in time series data. A periodogram uses samples in time series data to measure the amplitude vs. the frequency characteristics of an underlying continuous function, and thus, it reveals the spectral power density of the underlying function. If the function is sampled unevenly or there is missing data from the sample, then the Lomb-Scargle periodogram is a well-known algorithm that can cope with such unevenly sampled data [13]. The Lomb-Scargle periodogram has been used widely within those domains where there is an interest in exploring both the frequencies and magnitudes of periodicity, such as data from astronomical observations. In this work, we are interested in the magnitude or amplitude of the data samples only at a known frequency, such as the 24-h circadian rhythm. Software implementations of the Lomb-Scargle periodogram are readily available across multiple platforms, including MatLab and Python. To illustrate how we calculate the magnitude of the periodicity changes at a given frequency throughout a time series using time-lagged overlapping windows, we will use the schematic presented in Figure 1.  
Figure 1a shows a plot of the first 10 days of a longer (synthetic) series of data points, and we can see from the visualisation that there is a noticeable recurring daily pattern, i.e., when the frequency is 24 h, although if we examine it carefully, we see that each day is slightly different from the others. If we compute the magnitude of this 24-h periodicity over the whole time series, it has a value of, let us say, 0.78 on a scale of 0 to 1. While such an analysis has benefit if we have a long period of data (e.g., weeks, months or years, then calculating a single number (0.78 in the diagram) for the 24-h periodicity over the whole duration will hide any variational details within the data, instead, we calculate the 24-h periodicity from a window of the first 7 days only, as shown in Figure 1b, and this generates a value of, say, 0.82. We then shift the 7-day window forward in time by an interval of, say, 1 whole day and recalculate the 24-h periodicity, as shown in Figure 1c, and this generates a value of, say, 0.76. We repeat this process of shifting the 7-day window and recalculating until we reach the end of the time series. Figure 1: Schematic demonstrating the calculation of periodicity intensity throughout a time series using time-lagged overlapping windows. (**a**) shows overall periodicity for a time series, (**b**) shows periodicity calculated for the first 7 days only, (**c**) shows periodicity for 7 days with a shift of 1 day, (**d**) shows some sample raw data and (**e**) shows periodicity intensity calculated for the whole time series. Three important parameters in this process are (1) the frequency of the recurring pattern \(Fo\), often 24 h if we are interested in circadian rhythms but not always so, (2) the size of the window in which the periodicity is calculated \(m\) and (3) the overlap between the windows \(l\), also referred to as stride length, namely the amount by which a window is shifted before calculating a new value for a periodicity window. For a series of \(N\) data points such as that shown in Figure 1d and a window size of \(m\) with a shifting or stride length of \(l\) for each periodicity re-calculation, this generates a time series of \(\lfloor\frac{N-m+1}{l}\rfloor\) data points, as in Figure 1e. This captures gradual behaviour changes in the regularity of the data sampled over time rather than instances of particularly abnormal data values. Periodicity intensity graphs are just one of many possible forms of analysis of time series data but differ from each of the others. While we do perform a spectral analysis [14] of the data, this is not carried out across a full spectrum.