Reports
Create report
Asleep.createReports()
var config: Asleep.Config?
var reports: Asleep.Reports?
if let config {
reports = Asleep.createReports(config: config)
}| Property Name | Type | Description |
|---|---|---|
| config | Asleep.Config | Enter Asleep.Config instance |
Get a single report
Asleep.Reports.report()
var reports: Asleep.Reports?
let sessionId: String
// Closure
reports?.report(sessionId: sessionId, completionBlock: { (report: Asleep.Model.Report?, error: Asleep.AsleepError?) in
if let error {
print(error)
return
}
if let report {
}
})
// Async
Task {
do {
let report = try await reports?.report(sessionId: sessionId)
} catch {
print(error)
}
}| Property Name | Type | Description |
|---|---|---|
| sessionId | String | sessionId that can be received when stopping tracking |
| completionBlock | Asleep.Model.Report? | If nil, an error occurs. |
| Asleep.AsleepError? | Error Codes |
Get multiple reports
Asleep.Reports.reports()
var reports: Asleep.Reports?
let fromDate: String = "2023-05-01"
let toDate: String = "2023-05-07"
// Closure
reports?.reports(fromDate: fromDate, toDate: toDate, completionBlock: { (reportSessions: [Asleep.Model.SleepSession]?, error: Asleep.AsleepError?) in
if let error {
print(error)
return
}
if let reportSessions {
}
})
// Async
Task {
do {
let reportSessions = try await reports?.reports(fromDate: fromDate, toDate: toDate)
} catch {
print(error)
}
}| Property Name | Type | Description |
|---|---|---|
| fromDate | String (YYYY-MM-DD) | View date start |
| toDate | String (YYYY-MM-DD) | View date end |
| orderBy | Asleep.Model.OrderBy | Default value: .descending Options: .ascending, .descending DESC: Descending order ASC: Ascending order |
| offset | Int | Default value: 0 Number of reports to skip |
| limit | Int | Default value: 20 Maximum number of report (0~100) |
| completionBlock | Array of SleepSession | If nil, an error occurs |
| AsleepError | Error Codes |
Get average stats
Asleep.Reports.getAverageReport()
var reports: Asleep.Reports?
let fromDate: String = "2023-05-01"
let toDate: String = "2023-05-07"
// Closure
reports?.getAverageReport(fromDate: fromDate, toDate: toDate, completionBlock: { (averageReport: Asleep.Model.AverageReport?, error: Asleep.AsleepError?) in
if let error {
print(error)
return
}
if let averageReport {
}
})
// Async
Task {
do {
let averageReport = try await reports?.getAverageReport(fromDate: fromDate, toDate: toDate)
} catch {
print(error)
}
}| Property Name | Type | Description |
|---|---|---|
| fromDate | String (YYYY-MM-DD) | The starting time for the period you want to check the average |
| toDate | String (YYYY-MM-DD) | The ending time for the period you want to check the average |
| completionBlock | Asleep.Model.AverageReport? | If nil, an error occurs. |
| Asleep.AsleepError? | Error Codes |
Delete report
Caution: Data DeletionWhen session data is deleted from the Asleep server upon a request, it becomes difficult to provide specific evidence for the deleted sessions during subsequent billing usage analysis.
Asleep.Reports.deleteReport()
var reports: Asleep.Reports?
let sessionId: String
// Closure
reports?.deleteReport(sessionId: sessionId, completionBlock: { (error: Asleep.AsleepError?) in
if let error {
print(error)
return
}
})
// Async
Task {
do {
try await reports?.deleteReport(sessionId: sessionId)
} catch {
print(error)
}
}| Property Name | Type | Description |
|---|---|---|
| sessionId | String | sessionId to be deleted |
| completionBlock | Asleep.AsleepError? | Error Codes |
Reanalyze
Reanalyzes a session that has already ended. If you specify an analysis period (start and end time), only that period is reanalyzed. For example, use it when the user corrects the "time they fell asleep ~ time they woke up" after the measurement has ended.
Asleep.Reports.reanalyze()
var reports: Asleep.Reports?
let sessionId: String
let analysisStartTime: Date
let analysisEndTime: Date
// Closure
reports?.reanalyze(sessionId: sessionId,
analysisStartTime: analysisStartTime,
analysisEndTime: analysisEndTime,
completionBlock: { (sessionId: String?, error: Asleep.AsleepError?) in
if let error {
print(error)
return
}
if let sessionId {
// Reanalysis request completed
}
})
// Async
Task {
do {
try await reports?.reanalyze(sessionId: sessionId,
analysisStartTime: analysisStartTime,
analysisEndTime: analysisEndTime)
} catch {
print(error)
}
}To reanalyze the whole measurement without specifying a period, call it without the time parameters.
// Closure
reports?.reanalyze(sessionId: sessionId, completionBlock: { (sessionId: String?, error: Asleep.AsleepError?) in
// ...
})
// Async
Task {
try await reports?.reanalyze(sessionId: sessionId)
}| Property Name | Type | Description |
|---|---|---|
| sessionId | String | The session ID to reanalyze |
| analysisStartTime | Date | Start time of the analysis period |
| analysisEndTime | Date | End time of the analysis period. It must be later than analysisStartTime |
| completionBlock | String? | The requested session ID on success |
| Asleep.AsleepError? | Error on failure (Error Codes) |
Notes
reanalyzereturns as soon as the reanalysis request is accepted. Get the updated result withreport(sessionId:), and checksession.stateto see whether the analysis has finished.- The analysis period is newly determined on every request. If you call
reanalyze(sessionId:)without a period, the previously specified period is not kept and the whole measurement is reanalyzed. To keep a period, pass the same period again. - The
configused to createReportsmust have a userId. If it does not, the request is not sent and it fails withreanalyzeFailed. completionBlockis not guaranteed to be called on the main thread. Switch to the main thread when you update the UI.
Changing the period with a reanalysis does not bring the recording files back.Recording files are selected when the first analysis completes, against the period analysed at that time, and the files outside that period are deleted then. A reanalysis only sends a request to the server and never touches the files on the device, so recordings that were already deleted do not come back.
- Widening the period: there are no recordings for the part that was added
- Moving to a period that does not overlap the first one: there are no recordings at all
- Narrowing to a part of the first period: only the files that were kept in the first place are available
audio_segments.jsonstill lists a row for every segment of the whole recording; only the file path is empty for the segments that were not kept. An app cannot tell "no recording was ever made here" apart from "the recording was cleaned up".If you need the recordings for a wider period, request that period when you stop the measurement.
Error codes
| AsleepError | HTTP | SDK error code (Beta) | Situation |
|---|---|---|---|
| invalidParameter | - | - | The start time is later than or equal to the end time (checked before the request) |
| reanalyzeFailed | - | - | The config used to create Reports has no userId |
| unknown | - | - | Network error (in async, the system error is thrown as is) |
| httpStatus | 400 | 30400 | Invalid start or end time |
| httpStatus | 401 | 30401 | Authentication failed |
| httpStatus | 403 | 30403 | No permission to reanalyze |
| httpStatus | 404 | 30404 | Session not found |
| httpStatus | 409 | 30409 | Cannot reanalyze at the moment (reanalysis already in progress, etc.) |
| httpStatus | 410 | 30410 | Data retention period expired |
| httpStatus | 422 | 30422 | The session is still being tracked |
| httpStatus | 5xx | 30500 | Server error |
The SDK error code is the 5-digit code delivered in the errorCode of httpStatus (Beta). For now we recommend branching on the HTTP status code.
Avoid retrying indefinitely when you receivehttpStatus(code: 409).It can be returned continuously not only while reanalysis is in progress, but also for sessions that cannot be reanalyzed at all. If you retry, fix the number of attempts and the interval.
Data Type
Asleep.Model.Report
struct Report {
let timezone: String
let peculiarities: [Peculiarity]
let missingDataRatio: Float
let session: Session
let stat: Stat?
let analysis: Analysis?
}
enum Peculiarity {
case inProgress
case neverSlept
case tooShortForAnalysis
case tooLongForAnalysis
case tooManyDefectsInSleepStages
case noBreathingStability
case noRealtimePolling
}| Property Name | Type | Description |
|---|---|---|
| timezone | String | The adjusted time zone of the analysis result e.g. UTC, Asia/Seoul (Timezone List) |
| peculiarities | [Asleep.Model.Peculiarity] | A field for describing any specific details or peculiarities of the sleep session. This field can include multiple labels below: IN_PROGRESS: If the session is OPEN, CLOSED NEVER_SLEPT: If it is determined that there was no sleep at all during the session measurement time TOO_SHORT_FOR_ANALYSIS: When the measurement time is too short to conduct a valid analysis (currently less than 20 minutes) TOO_LONG_FOR_ANALYSIS: Analysis has been conducted successfully, but the session measurement time is excessively long, making it difficult to trust (currently exceeding 24 hours) TOO_MANY_DEFECTS_IN_SLEEP_STAGES: When the error rate is high due to factors like missing audio uploads, resulting in insufficient sleep analysis results NO_BREATHING_STABILITY: When the customer's contract conditions do not support breathing stability analysis |
| missing_data_ratio | Float (0~1 range, decimal points) | The error rate in sleep analysis results due to reasons such as missing audio uploads |
| session | Asleep.Model.Session | Session Report information |
| stat | Asleep.Model.Stat | Analysis Report information |
| analysis | Asleep.Model.Analysis? | Information about the period the server analyzed. If the session is still being tracked, the period is not determined yet and this is nil |
Asleep.Model.Session
struct Session {
let id: String
let state: State
let startTime: Date
let endTime: Date?
let unexpectedEndTime: Date?
let createdTimezone: String
let sleepStages: [Int]?
let breathStages: [Int]?
let snoringStages: [Int]?
let sleepStageProbs: [[Float]]?
let breathStageProbs: [[Float]]?
let snoringStageProbs: [[Float]]?
let measurementStartTime: Date?
let measurementEndTime: Date?
}
enum State {
case open
case closed
case complete
}| Property Name | Type | Description |
|---|---|---|
| id | String | Session Id |
| state | Asleep.Model.State | Sleep session state (OPEN, CLOSED, or COMPLETE) |
| startTime | Date | Start time of the analysis period. If no period was specified, it is the same as the measurement start time |
| endTime | Date? | End time of the analysis period. If no period was specified, it is the same as the measurement end time |
| unexpectedEndTime | Date? | If a session fails to proceed and terminate properly due to app crashes or similar issues, and the client later executes initConfig to terminate the session, the time at which this happens is recorded. In this case, the "end_time" is calculated based on the sequence number of the last uploaded audio file. Therefore, if "end_time" is not null, it indicates an abnormal session. |
| createdTimezone | String | Timezone of session creation (Timezone List) |
| sleepStages | Array<Int> | Sleep stages -1: error 0 : wake 1 : light 2 : deep 3 : rem |
| breathStages | Array<Int> | Breathing stability stages |
| snoringStages | Array<Int> | Snoring stages -1: error 0 : no snoring 1 : snoring |
| sleepStageProbs | [[Float]]? | Probability values of the sleep stages for each epoch |
| breathStageProbs | [[Float]]? | Probability values of the breathing stability stages for each epoch |
| snoringStageProbs | [[Float]]? | Probability values of the snoring stages for each epoch |
| measurementStartTime | Date? | The time the measurement (recording) actually started, regardless of the analysis period |
| measurementEndTime | Date? | The time the measurement (recording) actually ended, regardless of the analysis period |
Asleep.Model.Stat
struct Stat {
let sleepEfficiency: Float?
let sleepLatency: Int?
let sleepTime: Date?
let wakeupLatency: Int?
let wakeTime: Date?
let lightLatency: Int?
let deepLatency: Int?
let remLatency: Int?
let timeInWake: Int?
let timeInSleepPeriod: Int?
let timeInSleep: Int?
let timeInBed: Int?
let timeInRem: Int?
let timeInLight: Int?
let timeInDeep: Int?
let timeInStableBreath: Int?
let timeInUnstableBreath: Int?
let timeInSnoring: Int?
let timeInNoSnoring: Int?
let wakeRatio: Float?
let sleepRatio: Float?
let remRatio: Float?
let lightRatio: Float?
let deepRatio: Float?
let stableBreathRatio: Float?
let unstableBreathRatio: Float?
let snoringRatio: Float?
let noSnoringRatio: Float?
let unstableBreathCount: Int?
let breathingPattern: BreathingPattern?
let breathingIndex: Float?
let sleepCycle: Int?
let sleepCycleCount: Int?
let sleepCycleTime: [Date]?
let wasoCount: Int?
let longestWaso: Int?
let sleepIndex: Int?
let snoringCount: Int?
}| Property Name | Type | Description |
|---|---|---|
| sleepEfficiency | Float? | The percentage of time you actually slept during sleep measurement |
| sleepLatency | Int? | time it took to fall asleep |
| sleepTime | Date? | The time it takes to fall asleep after the start of sleep measurement |
| wakeupLatency | Int? | The time it takes to wake up and end your sleep measurement |
| wakeTime | Date? | wake up time |
| lightLatency | Int? | The time it takes to the first Light after the start of sleep. |
| deepLatency | Int? | The time it takes to the first Deep after the start of sleep. |
| remLatency | Int? | The time it takes to the first REM after the start of sleep. |
| timeInWake | Int? | wake during sleep |
| timeInSleepPeriod | Int? | During sleep measurement time, excluding the time it took from the start of the sleep measurement to fall asleep and the time it took from the wake to the end of the sleep measurement |
| timeInSleep | Int? | During sleep measurement time, the time you were actually sleeping Classified into three stages: deep, light, rem |
| timeInBed | Int? | The time from the start of the sleep measurement to the end of the sleep measurement |
| timeInRem | Int? | Total time the sleep phase progressed to rem |
| timeInLight | Int? | Total time the sleep phase progressed to light |
| timeInDeep | Int? | Total time the sleep phase progressed to deep |
| timeInStableBreath | Int? | Total time of stable breathing |
| timeInUnstableBreath | Int? | Total time of unstable breathing |
| timeInSnoring | Int? | Total time of snoring |
| timeInNoSnoring | Int? | Total time of no snoring |
| wakeRatio | Float? | Rate of waking time in the middle during sleep stage |
| sleepRatio | Float? | The percentage of time you sleep without waking during the sleep phase |
| remRatio | Float? | Rate of REM sleep during sleep stage |
| lightRatio | Float? | Rate of light sleep during sleep stage |
| deepRatio | Float? | Rate of deep sleep during sleep stage |
| stableBreathRatio | Float? | The percentage of time during the sleep phase that breathing was stable |
| unstableBreathRatio | Float? | The percentage of time during the sleep phase that breathing was unstable |
| snoringRatio | Float? | The percentage of time during the sleep phase that there was a snoring section |
| noSnoringRatio | Float? | The percentage of time during the sleep phase that there was no snoring. |
| unstableBreathCount | Int? | The number of times unstable breathing occurred |
| breathingPattern | Asleep.Model.BreathingPattern? | Breathing pattern (STABLE_BREATH, MILDLY_UNSTABLE_BREATH, MODERATELY_UNSTABLE_BREATH, SEVERELY_UNSTABLE_BREATH) |
| breathingIndex | Float? | Breathing index |
| sleepCycle | Int? | The average duration of one sleep cycle. |
| sleepCycleCount | Int? | The number of sleep cycles. |
| sleepCycleTime | [Date]? | Transition time for sleep cycles [First sleep cycle onset time, first sleep cycle end time, second sleep cycle end time, ..., last sleep cycle end time] |
| wasoCount | Int? | The number of times 'wake' occurred during the sleep period |
| longestWaso | Int? | The duration of the longest 'wake' during the sleep period |
| sleepIndex | Int? | The metric that comprehensively represents sleep quality, defined by learning from the distribution of sleep data |
| snoringCount | Int? | The number of times snoring occurred |
Asleep.Model.Analysis
struct Analysis {
let startEpochIndex: Int
let endEpochIndex: Int
let epochDurations: [Int]
let totalEpochCount: Int
var epochCount: Int { get }
func contains(seq: Int) -> Bool
}| Property Name | Type | Description |
|---|---|---|
| startEpochIndex | Int | The index of the first epoch of the analysis period (based on the whole measurement, inclusive) |
| endEpochIndex | Int | The index after the last epoch of the analysis period (exclusive) |
| epochDurations | Array<Int> | The duration (in seconds) of each epoch in the period. If the period boundaries do not match the epoch boundaries, the first and last values can be less than 30 |
| totalEpochCount | Int | The number of epochs of the whole measurement |
| epochCount | Int | The number of epochs included in the period |
| contains(seq:) | Bool | Whether the epoch index seq, based on the whole measurement, is included in the analysis period |
When an analysis period is specified, the index of the stage array is not based on the start of the measurement.
sleepStages[i]is the (startEpochIndex+ i)-th epoch (30 seconds) of the whole measurement. AddstartEpochIndexwhen you calculate a time from an array index or match it with a recording file.
Asleep.Model.SleepSession
struct SleepSession {
let sessionId: String
let state: State
let sessionStartTime: Date
let sessionEndTime: Date?
let createdTimezone: String
let unexpectedEndTime: Date?
let lastReceivedSeqNum: Int?
let timeInBed: Int?
}
enum State {
case open
case closed
case complete
}| Property Name | Type | Description |
|---|---|---|
| sessionId | String | Sleep session ID |
| state | Asleep.Model.State | Status of Session 'OPEN': An in-progress session, with audio uploads available 'CLOSED': The session terminated by sending an end session request. Unable to upload audio files. Analysis of uploaded sleep audio is still in progress 'COMPLETE': All sleep analysis completed after the end of the session |
| sessionStartTime | Date | Session start time |
| sessionEndTime | Date? | Session end time |
| createdTimezone | String | Timezone of session creation (Timezone List) |
| unexpectedEndTime | Date? | If a session fails to proceed and terminate properly due to app crashes or similar issues, and the client later executes initConfig to terminate the session, the time at which this happens is recorded. In this case, the "end_time" is calculated based on the sequence number of the last uploaded audio file. Therefore, if "end_time" is not null, it indicates an abnormal session. |
| lastReceivedSeqNum | Int? | The sequence number of the last uploaded audio file |
| timeInBed | Int? | The time from the start of the sleep measurement to the end of the sleep measurement |
Asleep.Model.AverageReport
struct AverageReport {
let period: Period
let peculiarities: [Peculiarity]
let averageStats: AverageStats?
let neverSleptSessions: [NeverSleptSession]
let sleptSessions: [SleptSession]
}| Property Name | Type | Description |
|---|---|---|
| period | Asleep.Model.Period | Timezone (Timezone List) |
| peculiarities | \[Asleep.Model.Peculiarity] | Special considerations when calculating the average of sleep sessions NO_BREATHING_STABILITY: When the customer's contract conditions do not support breathing stability analysis |
| averageStats | Asleep.Model.AverageStats? | An object containing the averages of sleep metrics for "sleptSessions" |
| neverSleptSessions | \[Asleep.Model.NeverSleptSession] | A list of sessions during which it is determined that no sleep occurred at all during the measurement time. |
| sleptSessions | \[Asleep.Model.SleptSession] | A list of sessions during which it is determined that sleep occurred during the measurement time. |
Asleep.Model.Period
struct Period {
let timezone: String
let startDate: Date
let endDate: Date
}| Property Name | Type | Description |
|---|---|---|
| timezone | String | requested timezone e.g. UTC, Asia/Seoul |
| startDate | Date | requested start date |
| endDate | Date | requested end date |
Asleep.Model.AverageStats
struct AverageStats {
let startTime: String
let endTime: String
let sleepTime: String
let wakeTime: String
let sleepLatency: Int
let wakeupLatency: Int
let timeInBed: Int
let timeInSleepPeriod: Int
let timeInSleep: Int
let timeInWake: Int
let timeInLight: Int?
let timeInDeep: Int?
let timeInRem: Int?
let timeInSnoring: Int?
let timeInNoSnoring: Int?
let sleepEfficiency: Double
let wakeRatio: Double
let sleepRatio: Double
let lightRatio: Double?
let deepRatio: Double?
let remRatio: Double?
let snoringRatio: Double?
let noSnoringRatio: Double?
let wasoCount: Int
let longestWaso: Int
let sleepCycleCount: Int?
let snoringCount: Int?
}| Property Name | Type | Description |
|---|---|---|
| startTime | String(hh:mm:ss) | Session start time |
| endTime | String(hh:mm:ss) | Session end time |
| sleepTime | String(hh:mm:ss) | The time it takes to fall asleep after the start of sleep staging |
| wakeTime | String(hh:mm:ss) | Wake time |
| sleepLatency | Int | Time to fall asleep |
| wakeupLatency | Int | The time it takes to wake up and end your sleep measurement |
| timeInBed | Int | The time from the start of the sleep measurement to the end of the sleep measurement |
| timeInSleepPeriod | Int | During sleep measurement time, excluding the time it took from the start of the sleep measurement to fall asleep and the time it took from the wake to the end of the sleep measurement (time_in_bed - sleep_latency - wakeup_latency) |
| timeInSleep | Int | During sleep measurement time, the time you were actually sleeping This time is divided into three stages: deep,light,and rem |
| timeInWake | Int | Wake time during sleep |
| timeInLight | Int? | Total time the sleep phase progressed to light |
| timeInDeep | Int? | Total time the sleep phase progressed to deep |
| timeInRem | Int? | Total time the sleep phase progressed to rem |
| timeInSnoring | Int? | Total time of snoring |
| timeInNoSnoring | Int? | Total time of no snoring |
| sleepEfficiency | Double | The percentage of time you actually slept during sleep measurement |
| wakeRatio | Double | Rate of waking time in the middle during sleep phase |
| sleepRatio | Double | During sleep stage, sleep ratio, not wake |
| lightRatio | Double? | Rate of light sleep during sleep phase |
| deepRatio | Double? | Rate of deep sleep during sleep phase |
| remRatio | Double? | rem sleep ratio |
| snoringRatio | Double? | The percentage of time during the sleep phase that there was a snoring section |
| noSnoringRatio | Double? | The percentage of time during the sleep phase that there was no snoring. |
| wasoCount | Int | The number of times 'wake' occurred during the sleep period |
| longestWaso | Int | The duration of the longest 'wake' during the sleep period |
| sleepCycleCount | Int? | The number of sleep cycles. |
| snoringCount | Int? | The number of times snoring occurred. |
Asleep.Model.NeverSleptSession
struct NeverSleptSession {
let id: String
let startTime: Date
let endTime: Date
let completedTime: Date
}| Property name | Type | Description |
|---|---|---|
| id | String | session id |
| startTime | Date | Session start time |
| endTime | Date | Session end time |
| completedTime | Date | Time of session analysis completion |
Asleep.Model.SleptSession
struct SleptSession {
let id: String
let createdTimezone: String
let startTime: Date
let endTime: Date
let completedTime: Date
let sleepEfficiency: Double
let sleepLatency: Int?
let wakeupLatency: Int?
let lightLatency: Int?
let deepLatency: Int?
let remLatency: Int?
let sleepTime: Date?
let wakeTime: Date?
let timeInWake: Int
let timeInSleepPeriod: Int
let timeInSleep: Int
let timeInBed: Int
let timeInRem: Int?
let timeInLight: Int?
let timeInDeep: Int?
let timeInSnoring: Int?
let timeInNoSnoring: Int?
let wakeRatio: Double
let sleepRatio: Double
let remRatio: Double?
let lightRatio: Double?
let snoringRatio: Double?
let noSnoringRatio: Double?
let sleepCycle: Int?
let sleepCycleCount: Int?
let wasoCount: Int?
let longestWaso: Int?
let snoringCount: Int?
}| Property name | Type | Description |
|---|---|---|
| id | String | session id |
| createdTimezone | String | Timezone of session creation (Timezone List) |
| startTime | Date | Session start time |
| endTime | Date | Session end time |
| completedTime | Date | Time of session analysis completion |
| sleepEfficiency | Double | The percentage of time you actually slept during sleep measurement |
| sleepLatency | Int? | Time to fall asleep |
| wakeupLatency | Int? | The time it takes to wake up and end your sleep measurement |
| lightLatency | Int? | The time it takes to the first Light after the start of sleep |
| deepLatency | Int? | The time it takes to the first Deep after the start of sleep |
| sleepTime | Date? | The time it takes to fall asleep after the start of sleep staging |
| wakeTime | Date? | Wake time |
| timeInWake | Int | Wake time during sleep |
| timeInSleepPeriod | Int | During sleep measurement time, excluding the time it took from the start of the sleep measurement to fall asleep and the time it took from the wake to the end of the sleep measurement (time_in_bed - sleep_latency - wakeup_latency) |
| timeInSleep | Int | During sleep measurement time, the time you were actually sleeping This time is divided into three stages: deep,light,and rem |
| timeInBed | Int | The time from the start of the sleep measurement to the end of the sleep measurement |
| timeInRem | Int? | Total time the sleep phase progressed to rem |
| timeInLight | Int? | Total time the sleep phase progressed to light |
| timeInDeep | Int? | Total time the sleep phase progressed to deep |
| timeInSnoring | Int? | Total time of snoring |
| timeInNoSnoring | Int? | Total time of no snoring |
| wakeRatio | Double | Rate of waking time in the middle during sleep phase |
| sleepRatio | Double | During sleep stage, sleep ratio, not wake |
| remRatio | Double? | rem sleep ratio |
| lightRatio | Double? | Rate of light sleep during sleep phase |
| deepRatio | Double? | Rate of deep sleep during sleep phase |
| snoringRatio | Double? | The percentage of time during the sleep phase that there was a snoring section |
| noSnoringRatio | Double? | The percentage of time during the sleep phase that there was no snoring. |
| sleepCycle | Int? | The average duration of one sleep cycle |
| sleepCycleCount | Int? | The number of sleep cycles |
| wasoCount | Int? | The number of times 'wake' occurred during the sleep period |
| longestWaso | Int? | The duration of the longest 'wake' during the sleep period |
| snoringCount | Int? | The number of times snoring occurred. |
Updated 10 days ago
