The first step of our heart rate sleep algorithm involves pre-processing the time series by assigning binary wake/sleep labels whenever the participant’s heart rate dips above/below a specificquantile threshold (Q). The threshold value is calculated from the ECDF over 24-hour windows arbitrarily...