ESRI
The Entrainment Signal Regularity Index (ESRI) is a metric of circadian health introduced by Moreno et al. 2023 in the article Validation of the Entrainment Signal Regularity Index and associations with children’s changes in BMI. This metric quantifies how much light schedules entrain circadian rhythms. The ESRI metric uses a decoupled Hannay19
model: both the coupling between individual oscillators (parameter K
) and frequency heterogeneity (parameter gamma
) are set to 0. To calculate ESRI, fixed windows of a given light schedule are simulated, and the final amplitude of the decoupled model is taken as the ESRI value. This amplitude is close to 1 for highly entraining and regular schedules, and close to 0 for non-entraining schedules, like a train of random pulses. For more details see the original article.
The interface for calculating ESRI is given by esri
. For example, we can compare the metric for four different light schedules:
- A regular schedule with 8 hours of darkness and 16 hours of light
- A shift work schedule with 5 days on and 2 days off
- A random schedule created with pulses of random start times and durations
- A constant darkness schedule
import matplotlib.pyplot as plt
from circadian.metrics import esri
from circadian.lights import LightSchedule
= 0.1 # hours
dt = 14
days = np.arange(0, 24*days, dt)
time = 2.0 # hours
esri_dt # regular schedule
= LightSchedule.Regular(lux=1000)
regular_schedule = regular_schedule(time)
regular_light = esri(time, regular_light, esri_dt=esri_dt)
esri_time_regular, esri_array_regular # shift work schedule
= LightSchedule.ShiftWork(lux=1000)
shift_schedule = shift_schedule(time)
shift_light = esri(time, shift_light, esri_dt=esri_dt)
esri_time_shift, esri_array_shift # irregular schedule
= 8
n_pulses = LightSchedule(0.0)
schedule for n in range(n_pulses):
= np.random.uniform(0, 24*days)
start = np.random.uniform(10.0, 1000.0)
lux = np.random.uniform(5.0, 16.0)
duration += LightSchedule.from_pulse(lux, start, duration)
schedule = schedule(time)
irregular_light = esri(time, irregular_light, esri_dt=esri_dt)
esri_time_irregular, esri_array_irregular # darkness schedule
= LightSchedule(0.0)
darkness_schedule = darkness_schedule(time)
darkness = esri(time, darkness, esri_dt=esri_dt) esri_time_darkness, esri_array_darkness
This result shows the ESRI value for each start time of the analysis window. The default window length is 4 days, and the default window step is 1 hour. That’s why ESRI is only calculated for half of our simulation time (8 days). In the following plot, we see that the overall ESRI value for a highly regular schedule is larger than for a random schedule, and that the ESRI value for constant darkness is 0.1 which matches the default starting amplitude for the model. Both the window length and default starting amplitude can be changed with the analysis_days
and initial_amplitude
parameters.