IMU Sleep Analysis (skdh.sleep)#

Pipeline sleep processing#

Sleep([start_buffer, stop_buffer, ...])

Process raw accelerometer data from the wrist to determine various sleep metrics and endpoints.

Sleep Endpoints#

TotalSleepTime()

Compute the total time spent asleep from 1 minute epoch sleep predictions.

PercentTimeAsleep()

Compute the percent time spent asleep from 1 minute epoch sleep predictions.

NumberWakeBouts()

Compute the number of waking bouts during the total sleep opportunity, excluding the first wake before sleep, and last wake bout after sleep.

SleepOnsetLatency()

Compute the amount of time before the first sleep period in minutes.

WakeAfterSleepOnset()

Compute the number of minutes awake after the first period of sleep, excluding the last wake period after sleep.

AverageSleepDuration()

Compute the average duration of a sleep bout.

AverageWakeDuration()

Compute the average duration of wake bouts during sleep.

SleepWakeTransitionProbability()

Compute the probability of transitioning from sleep state to awake state

WakeSleepTransitionProbability()

Compute the probability of transitioning from awake state to sleep state.

SleepGiniIndex()

Compute the normalized variability of the sleep bouts, also known as the Gini Index from economics.

WakeGiniIndex()

Compute the normalized variability of the awake bouts, also known as the Gini Index from economics.

SleepAverageHazard()

Compute the average hazard summary of the hazard function as a function of the sleep bout duration.

WakeAverageHazard()

Compute the average hazard summary of the hazard function as a function of the awake bout duration.

SleepPowerLawDistribution()

Compute the scaling factor for a power law distribution over the sleep bouts lengths.

WakePowerLawDistribution()

Compute the scaling factor for a power law distribution over the awake bouts lengths.

Background Information#

TODO

Adding Custom Sleep Metrics#

TODO