PAP
Sections
CPAPDex — Technical Reference

Therapy Pressure, Leak
& Residual Events

Reference for every metric CPAPDex reads from a PAP machine’s nightly therapy log — definitions, formulas, expected ranges, and the evidence base behind each. Most headline numbers are device-scored events the machine’s firmware produced (ingested as ground truth, not recomputed), augmented by direct channel statistics and a few flow-derived and oximetry-lane metrics CPAPDex computes itself. Companion to the analyzer output; not a substitute for your prescribing clinician’s review.

⚠️
Important: CPAP machine-reported events are scored by proprietary firmware and may differ from manual scoring. AHI values from CPAP logs are not equivalent to attended polysomnography and are not a diagnosis. Residual indices also become unreliable when mask leak is high (see Large Leak %). Use these readings to track your own therapy and inform a clinician conversation — not to change therapy on your own.
Evidence Measured Validated Emerging Experimental Heuristic fill = trust · hover a badge for source
ℹ️
Why “measured” for device events? The machine’s firmware-scored EVE/CSL events are the recorded signal — CPAPDex ingests them rather than re-deriving apneas, so they sit on the “measured” rung (the strongest evidence this node offers), while still carrying the firmware caveat above. The few values CPAPDex computes from raw flow or oximetry carry their own grade.
Usage & Adherence
Nightly mask-on duration and long-term compliance
Usage HoursTotal Mask-On Hours
Core

Hours of delivered therapy for the night — the denominator behind every per-hour event index. Mask-on is delivered pressure > 0; brief gaps under ~5 min are not counted as off.

Formula
Usage Hours = count(pressure > 0) / 3600
Usage (hr)Read
< 4Below compliance
4–6Minimum compliance
6–7Good
> 7Excellent
30-Day ComplianceNights Meeting ≥ 4 h Usage
Core

Percentage of nights in the trailing 30 days with at least 4 hours of use — the adherence figure insurers and clinicians track.

Formula
Compliance = nights(≥4 h) / nights_30d × 100
ComplianceRead
< 50%Poor
50–70%Below CMS threshold
70–85%Adequate
> 85%Excellent
Mask-On LatencyTime to First Delivered Pressure
Advanced

Minutes from recording start to the first stable delivered pressure — how long the mask sat unused before therapy began.

Formula
Mask-On Latency = first_index(pressure > 0) / 60
Latency (min)Read
< 30Normal
30–60Delayed
> 60Prolonged
↑ back to index
📊
Pressure Profile
Delivered therapy pressure statistics from the PLD channel
Median PressureP50 of Delivered Pressure
Core

The median delivered pressure across mask-on time — the typical pressure the airway needed.

Formula
Median Pressure = percentile₅₀( pressure[maskOn] )
Median (cmH₂O)Read
< 8Low (typical mild OSA)
8–12Moderate
12–16High
> 16Very high
95th-%ile PressureP95 — Pressure Demand
Core

The pressure exceeded only 5% of the night — the standard summary of an APAP machine’s pressure demand.

Formula
P95 = percentile₉₅( pressure[maskOn] )
P95 (cmH₂O)Read
< 10Low demand
10–14Moderate
14–18High demand
> 18Near machine max
Pressure RangeIQR of Delivered Pressure
Advanced

Interquartile spread of delivered pressure — how much an auto-titrating machine moved through the night.

Formula
Pressure Range = P75 − P25 ( pressure[maskOn] )
IQR (cmH₂O)Read
< 2Very stable
2–4Normal APAP variability
4–7Wide — positional?
> 7Excessive
EPR DeltaExpiratory Pressure Relief Depth
Advanced

Median drop from inspiratory to expiratory pressure — how much the machine eases pressure on exhale for comfort.

Formula
EPR Delta = median( Pressure − EprPress )
0 means EPR is off; higher = more relief (typically 1–3 cmH₂O).
95th-%ile EPAPExpiratory Pressure (P95)
Research

P95 of the expiratory pressure — from a dedicated EPAP lane on bilevel machines, or derived from EPR-relieved expiratory pressure on CPAP/APAP.

Formula
EPAP95 = percentile₉₅( expiratory pressure )
For machines that titrate inspiratory and expiratory pressure separately.
↑ back to index
Residual Events
Machine-scored respiratory events during therapy — the device firmware is ground truth here
⚠️
Firmware-scored. The indices below are counted by the machine’s own EVE/CSL event scoring; they may differ from manual PSG scoring and tend to undercount. They also become untrustworthy when leak is high — always read Residual AHI alongside Large Leak %. Target on therapy is generally an AHI < 5.
Residual AHIApnea–Hypopnea Index on Therapy
Core

Obstructive + central apneas + hypopneas per hour of use — the headline of how well therapy is controlling sleep-disordered breathing tonight.

Formula
Residual AHI = (OA + CA + H) / Usage Hours
AHI (/hr)Read
< 5Controlled
5–10Mild residual
10–20Moderate — investigate
> 20Severe — possible therapy failure
Central Apnea IndexCentral Apneas per Hour
Core

Central apneas per hour of use. Elevated central events on CPAP can signal treatment-emergent central apnea (TECA) — which may call for a different therapy mode (e.g. ASV) rather than more pressure.

Formula
CAI = CA_count / Usage Hours
CAI (/hr)Read
< 1Normal
1–5Borderline
5–10Elevated — possible TECA
> 10High — clinician / ASV eval
Obstructive IndexObstructive Apneas per Hour
Advanced

Obstructive apneas per hour. Persisting obstructive events suggest the delivered pressure may be inadequate.

Formula
OAI = OA_count / Usage Hours
OAI (/hr)Read
< 1Well controlled
1–5Mild residual
> 5Pressure inadequate?
Hypopnea IndexHypopneas per Hour
Advanced

Partial-airflow reductions per hour. Hypopneas dominate most residual AHI.

Formula
HI = H_count / Usage Hours
HI (/hr)Read
< 5Controlled
5–10Mild residual
> 10Significant residual
RERA IndexRespiratory Effort–Related Arousals per Hour
Research

Arousals from increased respiratory effort that fall short of an apnea/hypopnea, per hour. Estimated from flow-limitation shape; not all machines report it.

Formula
RERA Index = RERA_count / Usage Hours
Softer scoring; read directionally alongside flow limitation.
Periodic Breathing% Therapy in Cheyne–Stokes / PB
Advanced

Share of therapy time scored as Cheyne–Stokes respiration or periodic breathing (waxing–waning crescendo–decrescendo airflow), from the CSL annotation stream.

Formula
PB % = CSL CS/PB span time / therapy time × 100
PB %Read
< 2%Negligible
2–10%Present
> 10%Marked — review (cardiac?)
↑ back to index
🌬️
Flow Limitation & Snore
Sub-event airway narrowing and vibration the machine tracks continuously
Flow LimitationMean Flow-Limitation Index
Advanced

Mean of the machine’s flow-limitation index — a continuous 0–1 measure of inspiratory-flow flattening (a precursor to obstruction). Device-derived and less standardized across manufacturers.

Formula
Flow Limitation = mean( device FL index )
Relative measure — compare across your own therapy nights; no single universal cut-point.
Flow-Limited %% Therapy with FL > 0.3
Advanced

Fraction of therapy time the flow-limitation index exceeded 0.3 — how much of the night the airway was meaningfully narrowed without yet triggering a scored event.

Formula
Flow-Limited % = time(FL > 0.3) / therapy time × 100
Lower is better; device-derived, relative.
Snore %% Therapy with Snore > 0.2
Advanced

Share of therapy time the device’s snore index exceeded 0.2 — airway vibration on the pressure/flow signal. Persistent snore can indicate sub-optimal pressure.

Formula
Snore % = time(snore index > 0.2) / therapy time × 100
Lower is better; persistent snore → consider pressure review.
Snore↔PressureSnore–Pressure Correlation
Research

Pearson correlation between snore index and delivered pressure — a CPAPDex composite probing whether more pressure is suppressing snore (negative) or failing to (flat/positive). Directional, internal.

Formula
r = Pearson( snore index , pressure )
Internal composite — no external source. Directional only.
↑ back to index
💨
Leak Dynamics
Mask seal quality — the gatekeeper for whether the residual indices can be trusted
ℹ️
Unintentional leak only. The intentional vent leak every mask exhales through (~20–40 L/min) is removed by ResMed before reporting, so these figures reflect excess leak. Above the 24 L/min threshold the machine cannot reliably score events — which is why Large Leak % is graded validated and gates the AHI read.
Median LeakP50 Mask Leak
Core

Typical excess mask leak across the night. Low and steady is the goal.

Formula
Median Leak = percentile₅₀( leak[maskOn] )
Median (L/min)Read
< 5Minimal excess leak
5–15Mild — monitor
15–30Moderate
> 30Severe — mask refit
95th-%ile LeakP95 Mask Leak
Advanced

Peak leak exceeded only 5% of the night — captures intermittent seal breaks a median can hide.

Formula
P95 Leak = percentile₉₅( leak[maskOn] )
P95 (L/min)Read
< 15Good seal
15–30Occasional breaks
> 30Frequent large leaks
Max LeakPeak Mask Leak
Research

The single highest leak value of the night — worst-case seal break, useful context for brief data-quality dropouts.

Formula
Max Leak = max( leak[maskOn] )
Context for dropouts; read with P95 Leak.
Large Leak %% Therapy Above 24 L/min
Core

Fraction of the night above ResMed’s 24 L/min large-leak threshold — the trust gauge for everything else. A high value means the residual AHI should be read with heavy skepticism.

Formula
Large Leak % = count(leak > 24) / total_maskOn × 100
Large Leak %Read
< 1%Negligible
1–5%Minor
5–15%Significant — AHI unreliable
> 15%Severe — data invalid
Leak CVLeak Coefficient of Variation
Research

Standard deviation of leak divided by its mean — a CPAPDex composite for seal stability rather than level. A steady moderate leak scores better than an erratic one.

Formula
Leak CV = SD(leak) / mean(leak) × 100
Internal seal-stability composite — no external source.
↑ back to index
🫁
Ventilation
Breathing volumes and rate reported by the machine’s PLD channel
Resp RateDevice Respiratory Rate (P50)
Advanced

Median breaths per minute reported by the machine. Normal adult sleeping rate is ~12–18.

Formula
Resp Rate = percentile₅₀( device respiratory rate )
Resp (/min)Read
12–18Typical resting
> 20Elevated — arousal / central instability
Resp Rate RangeIQR of Respiratory Rate
Research

Interquartile spread of breathing rate — a steadiness measure. A wide range can reflect periodic breathing or fragmented sleep.

Formula
Resp Rate Range = P75 − P25 ( respiratory rate )
Relative measure — compare across your own therapy nights; no single universal cut-point.
Tidal VolumeDevice Tidal Volume (P50)
Advanced

Median estimated volume per breath. The machine estimates this from flow — a relative trend indicator, not calibrated spirometry.

Formula
Tidal Volume = percentile₅₀( device tidal volume )
Relative trend; not a calibrated spirometry value.
Minute VentilationDevice Minute Ventilation (P50)
Advanced

Median air moved per minute (tidal volume × respiratory rate) — useful for spotting hypoventilation trends across nights.

Formula
Minute Ventilation = percentile₅₀( device minute ventilation )
Relative measure — compare across your own therapy nights; no single universal cut-point.
MinVent StabilityMinute-Ventilation Variability
Research

Coefficient of variation of minute ventilation — a CPAPDex composite flagging unstable breathing (e.g. periodic-breathing crescendos) even when the median looks normal.

Formula
MinVent Stability = CV( minute ventilation )
Internal ventilation-stability composite — no external source.
↑ back to index
🌊
Flow-Derived Breathing
What CPAPDex computes itself from the 25 Hz raw-flow (BRP) channel
ℹ️
CPAPDex’s own detector. Beyond the device’s summary channels, CPAPDex re-derives breaths directly from the 25 Hz raw flow (BRP) by zero-crossing detection on a detrended signal — an independent cross-check the firmware summary alone can’t give.
Breath CountZero-Crossing Breaths on 25 Hz Flow
Research

Total breaths CPAPDex detected from the raw flow waveform — the basis for the flow-derived rate and a data-completeness check.

Formula
Breath Count = positive zero-crossings of detrended 25 Hz flow
Basis for Breath Rate; read together.
Breath RateFlow-Derived Respiratory Rate
Advanced

Breaths per minute from CPAPDex’s own flow detection — an independent cross-check against the machine’s reported respiratory rate. Close agreement validates both.

Formula
Breath Rate = Breath Count / therapy minutes
vs device RRRead
within ±1Detectors agree
> ±2Inspect flow quality
I:E RatioInspiratory:Expiratory Time Ratio
Research

Ratio of inspiratory to expiratory flow time per breath. Shifts can reflect airway resistance or expiratory effort; method-dependent.

Formula
I:E = inspiratory flow time / expiratory flow time
Typical ~1:2 at rest; relative, method-dependent.
↑ back to index
🩸
SA2 Oximetry Lane
Available only when a pulse oximeter is connected — self-gated before scoring
ℹ️
Oximeter self-gate. When the SA2 channel is present, CPAPDex runs the same perfusion/plausibility self-gate as OxyDex before counting desaturations, so a squeeze- or motion-artifact dip is rejected. These metrics only appear when an oximeter was attached.
ODIOxygen Desaturation Index (3%)
Advanced

Self-gated AASM 3% desaturation events per hour — an independent corroboration of residual events from the oxygen side.

Formula
ODI = desats ≥ 3% (self-gated) / valid hours
ODI (/hr)Read
< 5Normal on therapy
5–15Mild residual desaturation
> 15Significant — corroborate AHI
T90% Time SpO₂ Below 90%
Advanced

Share of valid oximetry samples below 90% saturation — the standard cumulative-hypoxemia burden. Near zero on effective therapy.

Formula
T90 = valid samples(SpO₂ < 90%) / valid samples × 100
T90Read
< 1%Negligible
1–5%Mild burden
> 5%Significant hypoxemia
SpO₂ NadirLowest Valid Saturation
Advanced

The lowest valid SpO₂ reading after self-gating — the worst oxygen point that survived artifact rejection.

Formula
min( valid SpO₂ )
NadirRead
≥ 90%Reassuring
85–89%Mild dips
< 85%Significant desaturation
Mean SpO₂Mean Valid Saturation
Advanced

Average valid oxygen saturation across the night — the baseline oxygenation therapy is sustaining.

Formula
mean( valid SpO₂ )
Mean SpO₂Read
≥ 94%Normal
90–93%Mildly low
< 90%Low — review
PulseMedian In-Band Pulse Rate
Advanced

Median heart rate from the oximeter (physiologically plausible in-band values) — context for the oxygen trace, not a substitute for the cardiac nodes.

Formula
Pulse = median( in-band pulse )
Context only; see ECGDex/PulseDex for cardiac analysis.
Pulse RangeP95−P5 of In-Band Pulse
Research

Spread of the in-band pulse rate — a coarse variability indicator; wide swings can accompany arousals or residual events.

Formula
Pulse Range = P95 − P5 ( in-band pulse )
Relative measure — compare across your own therapy nights; no single universal cut-point.
↑ back to index
🔌
Pipeline & Data Provenance
How a ResMed therapy log becomes the numbers above
ℹ️
Input format. CPAPDex reads the machine’s on-card EDF / EDF+ files — BRP (25 Hz raw flow), PLD (~0.5 Hz pressure / leak / RR / TV / MV / snore / flow-limitation), SA2 (1 Hz SpO₂ / pulse when an oximeter is attached), and the EVE / CSL annotation streams that carry firmware-scored events. Nothing else in the suite reads EDF.
EDF / EVE / CSLBinary Decode & Event Annotations
Core

CPAPDex decodes the EDF header (labels, sample rates, physical scaling) and each signal’s records, then parses the EVE/CSL annotation TALs into classed events with absolute timestamps. Physical units are validated on decode.

Method
header → signals → EVE/CSL TAL parse → classed events
Decode integrity check; pressure in cmH₂O, leak in L/min validated.
Clock & SessionsOne Night, Multiple Sessions
Core

The EDF start date/time maps to a floating wall-clock anchor per the Clock Contract (read back with UTC getters so displayed time is viewer-timezone-independent). A night can contain multiple sessions separated by an off-mask gap — CPAPDex stitches them while preserving the gap.

Method
t0Ms = Date.UTC(startdate, starttime); sessions stitched on off-mask gap
One night = N sessions; gaps preserved, not merged away.
Oximeter Self-GatePerfusion / Plausibility Pre-Filter
Core

On the SA2 lane, CPAPDex applies the same self-gate as OxyDex before counting desaturations — rejecting perfusion-collapse and edge artifacts so a squeeze-artifact dip never inflates the ODI. Missing samples surface as gaps, never fabricated.

Method
gate desats on perfusion + edge-collapse plausibility before ODI
Mirrors the OxyDex self-gate; absence stays visible.
↑ back to index
✔️
Validation Status Matrix
What is device-scored / literature-validated versus experimentally derived

Validation refers to the scoring convention or threshold’s standing in guidelines/literature, and does not imply validation of the CPAPDex implementation against attended polysomnography.

Metric CategoryStatusBasis
Residual AHI / CAI / OAI / HI / RERA / PB● Device-scored (ingested)Machine firmware EVE/CSL scoring — AASM scoring conventions
Pressure, leak, EPR, RR, TV, MV, snore, SpO₂/pulse● Direct measurementDirect PLD / SA2 channel statistics
30-day compliance; Large Leak %; ODI / T90; flow-derived breath rate● Literature / standardCMS NCD 240.4; ResMed 24 L/min spec; AASM oximetry
Flow limitation, Flow-Limited %, I:E ratio◐ EmergingDevice-derived / method-dependent
Leak CV; MinVent stability; Snore↔Pressure○ Experimental compositeCPAPDex internal composites; no independent validation
Metric Tier Definitions
TierMeaningExamples
CoreHeadline therapy outcomesUsage, Compliance, Residual AHI, Median P, Median/Large Leak
AdvancedFuller therapy analysisOAI/HI, EPR, P95/median leak, ventilation, ODI/T90
ResearchExploratory / emerging / compositesRERA, EPAP95, Leak CV, MinVent stability, I:E
↑ back to index
🗺️
Formula → Citation Map
Every computed metric mapped to its primary source
Metric / RulePrimary CitationCategory
AHI / OAI / CAI / HI / RERA / CS-PB scoringAASM Scoring Manual (Berry et al.)AASM
OSA severity gradesICSD-3 (AASM 2014)AASM
30-day compliance (≥4 h / ≥70%)CMS NCD 240.4Adherence
ODI (3%) / T90AASM oximetry scoringOximetry
Treatment-emergent central apneaMorgenthaler 2006Central apnea
EDF+ (BRP/PLD/SA2/EVE/CSL)Kemp & Olivan 2003Format
24 L/min large-leak threshold; EPRResMed AirSense spec (manufacturer)Device spec
Flow limitation; I:E; flow-derived breath rateStandard flow signal processing — CPAPDex impl.Method
Leak CV; MinVent stability; Snore↔PressureCPAPDex internal — no external sourceInternal
↑ back to index
𝑓
Formula Provenance Index
Compact audit index — every external rule mapped to its source
Rule / FormulaSource / AuthorYearReference
Event scoring (apnea/hypopnea/RERA/CS)AASM (Berry et al.)v2.xAASM Manual for the Scoring of Sleep
OSA severity classificationAASM2014ICSD-3
PAP adherence (≥4 h / ≥70% / 90 d)CMSNCD 240.4
Treatment-emergent / complex central apneaMorgenthaler et al.2006Sleep. 29(9):1203–9
EDF+ file formatKemp & Olivan2003Clin Neurophysiol. 114(9):1755–61
Large-leak threshold (24 L/min); EPRResMed (manufacturer)AirSense / AirView clinical documentation
↑ back to index
⚠️
Known Limitations
The interpretation context for CPAP therapy-log analysis
ℹ️
These limitations are inherent to machine therapy-log analysis. They do not invalidate CPAPDex outputs but define the appropriate interpretation context.
🧰 Source & Scoring
  • Events are scored by proprietary firmware, not a technologist
  • Machine AHI tends to undercount vs attended PSG
  • Hypopnea/RERA scoring varies by manufacturer and model
  • Tidal volume / minute ventilation are flow estimates, not spirometry
💨 Leak & Validity
  • Above 24 L/min large leak, event scoring is unreliable
  • Intentional vent leak is mask-dependent and removed before reporting
  • SA2 oximetry metrics exist only when an oximeter is connected
📊 Algorithmic
  • Leak CV, MinVent stability and Snore↔Pressure are internal composites
  • Flow limitation / I:E are method-dependent
  • Normative bands are general guidance, not device-calibrated
⚖️ Regulatory
  • Not FDA cleared or CE marked as a medical device
  • Not for clinical diagnosis or self-directed therapy changes
  • Pressure / mode changes are a prescribing clinician’s decision
  • Personal, research, and wellness use only
↑ back to index
📚
Academic References
Primary sources for the scoring conventions, thresholds, and formats CPAPDex relies on
⚠️
Provenance note. Device thresholds (24 L/min large-leak limit, EPR behaviour) are manufacturer specifications, labelled as such. Internal composites (Leak CV, MinVent stability, Snore↔Pressure) carry no external source.
Method / ThresholdPrimary CitationCategory
AHI / OAI / CAI / HI / RERA / Cheyne–Stokes scoringBerry RB, Brooks R, Gamaldo CE, et al. The AASM Manual for the Scoring of Sleep and Associated Events. American Academy of Sleep Medicine; v2.x. aasm.orgAASM
OSA severity grades (AHI ≥30 severe)American Academy of Sleep Medicine. International Classification of Sleep Disorders (ICSD-3). AASM; 2014.AASM
PAP adherence (≥4 h on ≥70% nights / 90 d)Centers for Medicare & Medicaid Services. National Coverage Determination 240.4 — CPAP Therapy for Obstructive Sleep Apnea. cms.govAdherence
Oxygen desaturation index (3%) & T90Berry RB et al. AASM Manual for the Scoring of Sleep and Associated Events (oximetry scoring rules). AASM.Oximetry
Treatment-emergent / complex central apneaMorgenthaler TI, Kagramanov V, Hanak V, Decker PA. Complex sleep apnea syndrome: is it a unique clinical syndrome? Sleep. 2006;29(9):1203–9. doi: 10.1093/sleep/29.9.1203Central apnea
EDF+ file format (BRP / PLD / SA2 / EVE / CSL)Kemp B, Olivan J. European data format ‘plus’ (EDF+)… Clin Neurophysiol. 2003;114(9):1755–61. doi: 10.1016/S1388-2457(03)00123-8Format
Large-leak threshold (24 L/min); EPR behaviourResMed. AirSense / AirView clinical documentation — manufacturer specification (not a peer-reviewed threshold).Device spec
Flow-limitation index; I:E ratio; flow-derived breath rateStandard respiratory-flow signal processing — method-dependent; CPAPDex implementation.Method
Leak CV; MinVent stability; Snore↔PressureCPAPDex internal composites — no external source. Directional only.Internal
↑ back to index
🔠
Abbreviation Index
Every acronym used in this guide — searchable, jump to its section
terms
↑ back to index
📋
Project Credits
Authorship, contributions, and open-source provenance
Author
Michal Planicka
Concept · Architecture · Algorithms
Implementation · Validation · UI/UX
Assisted Development
AI-Assisted
Code review · Documentation
Literature synthesis · Reference formatting
Licence & Suggested Citation
Apache-2.0 Open-source
Planicka M. CPAPDex: CPAP/PAP Therapy-Log Analysis Node. Version 1.0.0. 2026.
↑ back to index
Reference Guide Version: 1.0.0  ·  Node: CPAPDex — ResMed AirSense EDF  ·  Last Literature Review: June 2026  ·  Apache-2.0 Licence
Intended use & safety

Tepna computes biometric patterns from your wearable and sensor data to support personal self-quantification. It is not a medical device, does not diagnose, treat, cure, screen for, or prevent any disease or condition, and is not a substitute for professional clinical evaluation. It has not been reviewed or cleared by the FDA, CE, or any regulatory body. Always consult a qualified healthcare provider about your health. Use at your own risk. For research and personal use only. 100% local — no data leaves your device.

T Tepna physiological-signal suite
© 2026 Michal Planicka — Concept · Architecture · Algorithms Not a medical device · does not diagnose or treat · not FDA/CE cleared · research & personal use only · ◈ Made in Asheville, NC
licenceApache-2.0