Behavioral rhythms of animals span a wide range of cycle lengths, including circannual rhythms that vary with the seasons (period of 1 year), changes in activity due to the estrous cycle in rodents (cycle length of 4-5 days), circadian rhythms that track the daily light-dark cycle (period of 1 day), and ultradian rhythms of activity occurring within a single day (typically periods of 8 h or less).

The mammalian circadian pacemaker, the suprachiasmatic nucleus (SCN), governs
circadian rhythms of tissues throughout the body as well as of outputs like activity,
coordinating physiological processes internally and with the external environment by
entraining to light-dark (LD) cycles [

The variability and noisiness of behavioral records creates a challenge in reliably
determining period and phase of activity rhythms, and even more so in finding ways to
quantify other aspects of behavioral patterns. In particular, behavioral records are
typically nonstationary; their frequency content is not constant over time. A variety
of methods have been applied to detect circadian rhythmicity and to measure the
period of circadian rhythms for different types of molecular and behavioral data,
including autocorrelation, Fourier and other periodograms, sine-fitting, cosinor
analysis, maximum entropy spectral analysis (MESA), digital filtering, and
wavelet-based methods [

In the following section, we briefly describe several methods of time-frequency analysis, specifically the Fourier periodogram and discrete and continuous wavelet transforms, and apply them to a numerically-generated time series with known circadian and ultradian periods to illustrate their use. In the Examples and discussion section, we apply the wavelet transforms to activity records from hamsters to demonstrate their efficacy on real data. We conclude with some final remarks, emphasizing a few caveats regarding the effective application of wavelet transforms.

We expect that behavioral patterns will differ between the day and the night, at the very least in magnitude but also possibly in ultradian period. For instance, activity bouts may be briefer and occur more (or less) often during subjective day than during subjective night for a nocturnal rodent. How can we identify these sorts of patterns in an activity rhythm?

The natural place to start when carrying out a mathematical analysis of frequency is a Fourier periodogram. For a record with many cycles, a periodogram can yield good estimates of the dominant frequencies occurring in a stationary time series.

Let a time series be generated by sampling a process every
_{k} the measurement taken after

where

To understand what ultradian frequencies the DFT is able to detect, let’s
examine Equation (1) in the context of a circadian rhythm. Suppose the time series
has a period of _{n}=_{n
mod s} for all

We can apply the geometric sum formula, ^{−2πik/D},
leading to

if ^{−2πim}=1
for all integers

Note that the periodogram applied to real data will display some frequencies other
than the harmonics of

The DFT has an advantage over other periodogram methods in that it can be
inverted. If the circadian pattern of activity is sufficiently regular, like in
the simulated time series in Figure

It is important to keep in mind that the purpose of periodograms like those shown
in Figure

We should note that, while wavelet transforms can provide excellent resolution of how the frequency or period changes over time, all time-frequency analysis must obey the limitations imposed by the Heisenberg uncertainty principle, which in essence says that increasing the time resolution will decrease the frequency resolution, and vice versa. Just as we cannot simultaneously know the exact position and momentum of a quantum particle, in the signal processing context we cannot simultaneously pinpoint time and frequency. The choice of wavelet determines how sensitive the corresponding wavelet transform can be to frequency as opposed to time specificity, but there is no way to obtain perfect resolution in both time and frequency.

Continuous wavelet transforms convolve a time series

Here we focus on a complex-valued wavelet function that is analytic (meaning the
Fourier transform equals zero for negative frequencies) called the Morse wavelet
function [

is referred to as an _{ψ},
where _{ψ} is the mean
frequency of the Morse wavelet function
_{ψ}(_{max}(_{ψ}(_{max}(_{max}(_{ψ}.
The value of
|_{ψ}(_{max}(_{ψ}(_{max}(

As an illustrative example, examine the AWT in Figure

The AWT must be interpreted with care. If the activity of an animal is too
variable, the AWT may not yield anything usable. It suffers problems with
harmonics, which appear as “echoes” in the heat map below the hot
spots marking dominant frequencies. Wavelet transforms, like other filtering
techniques applied to finite length time series, exhibit edge effects due to the
wrap-around nature of the filtering process. Edge effects can be minimized for
activity data by starting and ending the time series to be transformed at
midpoints of rest intervals. See [

The discrete wavelet transform (DWT) is rather different in nature from the
continuous version. In place of a wavelet function, a high-pass wavelet filter and
a low-pass scaling filter are repeatedly applied to yield a set of _{j} is associated with a frequency
band corresponding to periods approximately
2^{j}^{j+1}_{5} covers roughly the period range 3.2-6.4 h. The
value of _{6} corresponds to the period range 16-32 h. If
a particular ultradian rhythm is sought, then it can be helpful to choose a bin
size so that the period range of one of the details is centered on the desired
period.

For this application, we chose a translation-invariant DWT with the Daubechies
least asymmetric filter of length 12, sometimes called

Again consider the simulated time series in Figure _{5} (period range 3.2-6.4 h) reflects the large
activity bouts with ultradian period 5.3 h, while
_{3}−_{4} (period
ranges 0.8-1.6 h and 1.6-3.2 h, respectively) best reflect the ultradian rhythm
with period 1.6 h. To capture the overall pattern occurring in the time series, we
sum _{3}−_{7} together
(roughly covering period range 1-26 h), shown underneath the time series in
Figure

_{1} through _{7} are
shown at the same scale as the time series itself so that the magnitudes can
be directly compared.

_{3}-D_{7} from
Figure

The DWT is also effective at detecting sharp discontinuities in a time series
(with an appropriate choice of filter), such as occur with activity onsets. See
[

The freely available MATLAB wavelet toolbox

Regarding the activity records of Syrian hamsters from Eric Bittman’s lab: All procedures were approved by the animal care and use committee (IACUC) of the University of Massachusetts at Amherst, and conform to all USA federal animal welfare requirements.

Regarding the activity records of Syrian hamsters from Brian Prendergast’s lab: All procedures conformed to the USDA Guidelines for the Care and Use of Laboratory Animals and were approved by the Institutional Animal Care and Use Committee (IACUC) of the University of Chicago.

To demonstrate that the AWT and DWT can be effective in analyzing real behavioral data, we apply the methods described in the previous section to a variety of hamster activity records. We also discuss some of the difficulties that can be encountered when applying these transforms for real data.

The estrous cycle in hamsters typically results in an approximately 4-day pattern
in the amplitude and period of activity (“scalloping”), due in part
to the effects of estradiol [

The wavelet-based analysis can also be effective at detecting changes in ultradian
period across the day. For example, we can apply the AWT to a hamster
wheel-running record to detect a roughly 5 h ultradian period during the night, as
shown in Figure

As another example, consider the three hamster records shown in
Figure

The AWT and DWT offer alternatives to try when other techniques prove insufficient to analyze a time series in the desired manner. We don’t suggest that wavelet transforms be the first techniques to apply when studying a new set of behavioral records, as well-established methods are in many cases sufficient to answer the questions of interest. Wavelet-based methods must be applied and interpreted with care, keeping in mind issues with harmonics and edge effects. In particular, the record must be sufficiently long so that a day or so can be discarded on each end of the resulting wavelet transform since these portions may be distorted by edge effects. If a time series is excessively noisy, has too much missing data, or the rhythms are not focused on particular frequencies, the wavelet transforms may not yield anything useful. However, when used appropriately on relevant datasets, the AWT and DWT can reveal patterns that are not easily extracted using other methods of analysis in common use, thereby expanding the types of questions we can ask a set of behavioral records to answer. The methods presented here offer a means of identifying circadian and ultradian patterns and how they change over time, from day-to-day as well as over the course of a day.

AWT: Analytic wavelet transform; DFT: Discrete fourier transform; DWT: Discrete wavelet transform; LD: Light-dark; MESA: Maximum entropy spectral analysis.

The author declares that she has no competing interests.

I would like to thank the Dean of Faculty’s office at Amherst College for generous support, and Eric Bittman, Emily Manoogian, and Brian Prendergast for stimulating discussions and for providing hamster records for developing and demonstrating the wavelet analysis methods.