For the complete documentation index, see llms.txt. This page is also available as Markdown.

How do I build sleep stage charts from hypnogram samples?

Yes, you can build a sleep stage chart from single-timestamp hypnogram samples.

Yes, you can build a sleep stage chart from single-timestamp hypnogram samples. Each sample carries a single start timestamp and forms a continuous series, where the start of each sample is the end of the previous one.

To reconstruct stage intervals (and build an Apple-style sleep stage chart):

1

Treat consecutive sample timestamps as segment boundaries.

2

Run the final sleep stage from its start timestamp to the sleep session's metadata end_time.

The end_time marks the end of the whole session and may include trailing awake time, denoted by a final awake hypnogram sample.

For the sleep payload structure, see the data models reference.

Last updated

Was this helpful?