WSIT WSIT-RG-5531

WSIT Reference Guide — Sleep EEG Data Analysis Services

Explains commissioning, input validation, processing branches, quality masks, staging review, spectral and event definitions, statistical levels and recomputable delivery for sleep EEG research analysis.

1 Service Uses and Study Design

1.1 Translate the research question into defined analysis tasks

Sleep EEG data analysis services work with previously acquired sleep EEG and associated annotations. They may provide data organization, quality checks, sleep staging, spectral or event analysis, statistical summaries and transferable methods. The commissioning organization should define the study population, observation units and primary outcomes before choosing manual scoring, automated assistance or pipeline development. Completion means that the agreed inputs and methods produce traceable results. The number of plots or length of a report is insufficient evidence of acceptance.

Single-channel wearable EEG, EEG derivations within conventional polysomnography (PSG), and high-density research EEG offer different information. The AASM inter-scorer reliability training example displays EEG, EOG, chin EMG and additional physiological signals and instructs scorers to follow its scoring manual.[1] The commission must therefore identify the channels actually available. Research staging based on EEG alone does not establish completion of all PSG event scoring. Respiratory, movement and clinical diagnostic tasks require separate checks of signals, rules and responsibilities.

Distinguish descriptive research, group or longitudinal comparisons, algorithm validation and clinical use. Band power, spindle density and a model confidence score are not universal disease diagnostic indicators. Where patient-facing clinical interpretation is commissioned, identify the professionals responsible for that additional task, the standards used and applicable local requirements. This guide offers no individual diagnosis or treatment advice and does not treat a research deliverable as evidence of clinical credentials.

Commissioned taskConfirm before workInspectable deliverable
Organize previously annotated dataLabel provenance, scoring rules, recording-to-annotation matchingFile inventory, label mapping, alignment and exception report
Manual or assisted stagingAvailable EEG/EOG/EMG, rule version and review scopeEpoch labels, review history, disagreement handling and versions
Spectral and sleep microstructure researchChannels, stages, bands and event definitionsPower data, event records, valid observation time and configuration
Group or repeated-measure statisticsPrimary outcomes, participants, nights and covariatesAnalysis dataset, model specification, effect estimates and uncertainty
Pipeline development and reproductionRuntime, data permission and transferable code scopeFixed configuration, logs, reproduction procedure and acceptance examples

1.2 Freeze an analysis plan and arrange a pilot run

The plan should specify the population, recording scope, primary and exploratory outcomes, channel selection, staging source, quality exclusions, aggregation level and statistical comparisons. After receipt, pilot a small representative set covering device types, sampling rates, nights, annotation formats and signal quality. The pilot detects mismatches between inputs and methods. A selection of the cleanest recordings cannot demonstrate the quality of the entire project.

Estimate cost and turnaround from recording hours, channel count, manual review, device heterogeneity, annotation needs and reproduction requirements. Recording hours differ from valid analysis hours. Missing labels, alignment errors and extensive artifacts may increase rework. Define how supplemental data, changed metrics and additional manual scoring affect scope, and identify handover contacts, the method approver and exception response times. There is no universal turnaround or minimum effect improvement applicable to every study.

Set acceptance conditions before inspecting group results. When the pilot shows that the original plan is unsuitable, retain the change rationale, approval and affected result versions. Repeatedly changing bands, thresholds or exclusions to obtain significance must not be described as the original analysis. Exploratory adjustments can proceed with their exploratory status and a complete record of attempts.

2 Data Receipt, Channels and Annotation Checks

2.1 Check both file headers and actual waveforms

The intake inventory should link project participant codes, visits or nights, device and software versions, raw files, annotation files and necessary acquisition notes. Freeze the raw files and record checksums; give later conversions separate versions. EDF+ supports signals, annotations and analysis results, including discontinuous recordings. Inspect EDF+C/EDF+D and timing information so that interruptions are not interpreted as continuous sleep.[2]

A filename extension or channel label does not establish usability. Check physical units, digital and physical ranges, per-channel sampling information, prefiltering, recording origin and duration, then inspect waveform amplitude, polarity, flat segments, clipping and time markers. An incorrect unit conversion changes power and amplitude thresholds. Resolve unspecified units using acquisition evidence rather than assigning uV from waveform appearance.

Document electrode positions, signal channels and references separately. The BIDS EEG specification provides fields for referencing, sampling, filtering and channel quality and distinguishes electrodes from channels.[3] A project can use these fields to create a data dictionary. A claim that the complete delivery conforms to BIDS additionally requires validation of its structure and required fields against a specified version. A completed channel table alone is insufficient.

Input informationCheckHandling a discrepancy
Participant, visit and nightCompare inventory, file associations and duplicate checksumsQuarantine unresolved records and retain reasons for duplicates or replacement
Channel type and referenceCompare acquisition montage, header and waveformDistinguish EEG/EOG/EMG and derived channels; document aliases
Units and amplitude calibrationCompare physical and digital ranges with decoded valuesCorrect only with evidence; restrict affected metrics when unresolved
Sampling and acquisition filteringCheck each channel's rate, hardware and software filtersDo not interpret an interpolated rate as original information bandwidth
Timing and continuityCheck origins, gaps, triggers and annotation coveragePreserve time mappings; do not concatenate across unconfirmed gaps
Stage and event filesCheck scorer, rule version, epoch length and labelsRetain original labels and explicit conversion and unscored states

MNE's EDF reader documentation states that loading channels with different sampling rates causes the Raw object to upsample them to the highest loaded rate.[5] Record the reader version, selected channels and decoded representation, especially when interpreting interpolated auxiliary signals. Successful loading does not establish correct classification, calibration or alignment.

2.2 Preserve label meanings and permitted use

Annotations should retain provenance, scoring rules and version, time origin, epoch length, meanings of unknown or movement labels, and revision history. The public Sleep-EDF description includes manual annotations based on Rechtschaffen and Kales rules, with original labels W, R, 1, 2, 3, 4, M and an unscored state.[4] Merging historical stages 3 and 4 into N3 can serve a specified comparison, but it does not mean the recording has been rescored under another rule version. Dataset names, numeric codes and contemporary stage names must not be assumed equivalent.

When signals and annotations originate in different files or systems, check time zero, cropping, overnight date changes and clock offsets. Sample the recording start, stage transitions, event locations and recording end. Matching array lengths do not establish correct timing. Cropping the beginning without moving annotations can misalign the entire remaining night. Preserve original and corrected times, supporting evidence and the person responsible.

Permission should cover the actual study purpose, contractor access, computing environment, secondary use, retention and external delivery. Control identity mappings separately from analysis files, retaining participant or institution identifiers only as needed for the study. Inspect headers, filenames, annotation text and screenshots for identifying information before delivery. Public datasets also require compliance with their licenses and attribution terms. Neither a file format nor de-identification alone establishes legal compliance across jurisdictions.

3 Preprocessing and Valid Data Quality

3.1 Create processing branches for the intended analysis

Specify operation order and applicable branches, documenting unit conversion, channel selection, referencing, filtering, resampling, bad-segment annotations and cropping. Re-referencing requires recorded signals and reference relationships that support the transformation. A single saved bipolar difference cannot recover the individual electrode potentials that were never retained. MNE describes implementations of several reference transformations.[6] Select a method according to the question and available signals rather than an unexamined software default.

Record passbands, transition bands, filter type, length or order, phase handling and boundary treatment. Choose mains-notch processing from acquisition location and observed interference rather than applying 50 Hz or 60 Hz to every recording. Downsampling needs anti-aliasing and checks of event-time mappings. MNE's tutorial explains filtering within resampling and limitations affecting timing and segment boundaries.[7] Upsampling cannot recover frequencies absent from the acquisition or removed by its filters.

Offline zero-phase operations and features using future epochs have different temporal availability from a causal pipeline. An online algorithm or stimulation-response study needs separate validation of available history, latency and boundaries. Results from an offline overnight analysis do not directly establish real-time performance.

Staging, spectral analysis and event detection may require different signal branches. YASA SleepStaging documentation specifically instructs users not to apply additional z-scoring or filtering before that module and describes internal processing and prediction review.[11] Where filtered spindle analysis is also required, derive distinct branches from the validated input and record the branch behind each output. A generic file called cleaned EEG is not automatically appropriate for every algorithm.

3.2 Record exclusions and retention with quality masks

Localize quality decisions by channel, start and end time, issue type and action. Checks commonly include electrode loss or flat signals, clipping, abrupt changes, movement, muscle contamination, mains interference and device interruptions. Automated rules should flag candidates followed by the agreed scope of human review. Thresholds need to match device, units and analysis purpose. One amplitude cutoff cannot serve as a quality standard for every age, derivation and study.

Represent bad channels, bad intervals, unscored epochs and algorithm-ineligible intervals separately. MNE's tutorial describes annotation and rejection settings for excluding bad spans.[8] Check each downstream function's use of those annotations rather than assuming every statistic automatically excludes a bad interval. Filtering, interpolation and component removal do not establish recovery of the original neural activity. Compare target waveforms, spectra and event counts before and after processing for unexpected changes.

Quality issueSpecific analysis effectEvidence to retain
Wrong units or clippingAlters absolute power, slow-wave amplitudes and threshold detectionCalibration check, affected channels and intervals, correction or exclusion rationale
Movement or muscle contaminationMay alter high-frequency power and create false candidatesArtifact masks, waveform examples, review and processing versions
Mains interference or filter edgesAffects local spectra and event morphologyConfiguration, boundary buffers and before/after comparisons
Misaligned labels or unknown stagesChanges within-stage power and density denominatorsAlignment evidence, unknown-label inventory and stage coverage
Bad channels and interpolationAffects spatial comparison, reference and connectivity interpretationOriginal bad channels, interpolation scope and neighboring information used
Extensive stage-specific exclusionChanges the composition of usable observations between groupsValid time and exclusion reasons by participant, night, channel and stage

Report raw duration, scoreable duration, annotated stage durations, valid durations for each analysis branch and exclusion proportions separately. For multiple channels, state whether masks use the common valid intersection or independent channel-specific observations. If a stage has no usable interval, its power or density is missing or not computable rather than zero.

Valid time also affects group interpretation. Extensive exclusion caused by more movement or poorer stage-specific signals in one group can leave observations representing different conditions. Show quality and missingness distributions, perform planned sensitivity analyses and state the scope of the main results. Reducing the usable sample solely to produce smoother plots is not a quality objective.

4 Sleep Staging and Algorithm Validation

4.1 Establish a reviewable manual reference and revision process

Fix the rule source, age scope, channel combination, epoch length, scorer requirements and handling of uncertain segments. AASM's public reliability training example uses W, N1, N2, N3 and R with a 30-second view.[1] That example cannot replace the complete manual version adopted by the project. Historical label mapping, rescoring under current rules and research-specific labels are distinct operations and should be distinguished in the delivery.

A manual reference can include independent scoring, disagreement review and adjudication. Sampling should cover common and rare stages, transitions, poorer recordings and the target population; agree its fraction and selection rules. For a blinded independent reference, retain the original scorer decisions before adjudication and avoid influence from prior inspection of algorithm predictions. Adjudication establishes a project reference version while preserving the original disagreement.

Agreement reporting should include overall agreement, stage confusion, counts for each stage and relevant measures such as Cohen's kappa, stating the comparison objects and denominators. A high overall agreement may be driven by common stages and does not establish equal reliability for every stage. Separately report epochs that cannot be scored or were excluded from comparison, with reasons, rather than silently omitting them and presenting a higher agreement.

4.2 Validate automated outputs in the commissioned setting

Retain software versions, model identifiers or checksums, selected channels, internal and external preprocessing, label order and predictions. YASA documents epoch probabilities and calls for trained visual review, particularly for low-confidence predictions, with thorough inspection in settings such as naps, sleep disorders or suboptimal recording systems.[11] This supports review and setting-specific validation rather than adopting a tool's published performance as a promise for every commissioned dataset.

The validation set should answer the intended application question. For generalization to new participants, split by participant so that adjacent windows or different nights from the same person do not appear in both development and independent testing. For new devices or centers, arrange relevant held-out or external validation. Data used for tuning or investigating errors cannot continue to be described as an untouched independent test set.

Validation stepObserveAcceptance interpretation
Labels and timelineStage coding, epoch origins and incomplete final epochsMatch the project reference epoch by epoch; retain unknown states
Stage recognitionConfusion matrix, per-stage recall and precision, macro-F1Include stage counts and uncertainty rather than only overall accuracy
Probabilities and reviewLow-confidence epochs, scores and error distributionScores are not individual diagnostic probabilities; review selection is traceable
GeneralizationPopulation, device, derivation, center and quality strataState covered settings and unvalidated conditions
Manual revisionsLabels before/after changes, reviewer and rationaleDistinguish original algorithm performance from final revised staging quality

Agree thresholds, review volume and performance requirements from the study purpose and pilot. Do not invent an industry-wide accuracy cutoff. If available signals cannot meet the objective, narrow the claim, obtain additional data or change the task. When human corrections complete the delivery, do not attribute all final agreement to the algorithm itself.

5 Spectra, Spindles and Slow Waves

5.1 Report computational definitions as well as band names

Power analysis should identify the signal branch, channel or region, stage mask, window duration, window function, overlap, detrending, estimator, frequency scope and aggregation. Welch estimation aggregates window spectra; SciPy distinguishes the scaling and units of a power spectral density from those of a power spectrum.[9] For inputs in V, density is expressed in V²/Hz; for inputs in uV, the corresponding unit is uV²/Hz. State frequency integration for band power rather than labelling a per-Hz density value as the power of the entire band.

Select band boundaries from the study question and relevant literature, specifying treatment of shared edges. Relative power requires a stated denominator frequency interval, excluded bands and stage scope. A delta proportion computed with a different denominator is not directly comparable. State whether ratios are calculated for each window and then averaged, or calculated after pooling powers. Document the logarithm base, reference quantity and handling of zeros or missingness; a dB axis needs its definition.

MNE's Welch interface exposes FFT length, actual segment length, overlap, window and aggregation separately.[10] Zero-padding makes the frequency grid denser without lengthening the observation. Across nights or devices, state actual window duration and usable bandwidth rather than requiring only an identical FFT point count. Flag metrics with insufficient valid stage time under prespecified rules and retain the available amount.

5.2 Preserve event definitions, timestamps and density denominators

For spindle analysis, record derivations, included stages, frequency passband, duration, candidate thresholds, merging intervals, artifact exclusion and cross-channel matching. YASA supports stage restrictions and requires uV for array input, while MNE Raw input is automatically converted from V to uV.[12] Converting already converted data again or supplying a V array to an interface expecting uV changes amplitude-related processing. Verify units at the interface boundary.

Slow-wave analysis should define negative and positive peaks, peak-to-peak amplitude, duration and slope, including the signal and units used, and retain each event's boundaries and peak times. YASA exposes filtering, amplitude and duration parameters and calculates some event properties on the filtered signal.[13] Software parameters are not universal physiological definitions across devices, derivations or populations; default thresholds must not be presented as clinical normal ranges. Standardized amplitudes cannot be mixed directly with uV thresholds.

MetricDefinition that must accompany itFrequent interpretation limit
Absolute and relative band powerUnits, integration interval, denominator and aggregation orderDifferent references, filters and valid stages are not automatically equivalent
Spindle densityEvent count, detection stages, valid minutes and channel counting ruleValid N2, NREM and total sleep time denominators produce different measures
Spindle amplitude and frequencyDetector, amplitude signal, frequency estimator and unitsChanging the detector changes the set of included events
Slow-wave amplitude, duration and slopePolarity, filtering branch, peak or zero-crossing definitionsA count change alone does not establish improved sleep
Slow-wave/sigma couplingEvent pairing, window, phase and amplitude definitionsPhase averaging needs suitable circular statistics; co-occurrence is not causation
Within-stage time trendsTime origin, stage masks, valid quantities and binningDuration, overnight stage composition and missingness affect comparisons

Event records should include participant, night, channel, stage, times relative to the original recording, event properties and detector version. Specify whether a candidate present on multiple channels counts more than once. For example, state density as the number of events within valid N2 minutes on a given channel divided by those valid N2 minutes, and deliver numerator and denominator together. Zero density is appropriate only when there are zero events and nonzero valid observation time. With no valid time, density is not computable.

For coupling or co-occurrence, prespecify matching windows, signal branches, phase estimates, amplitude bands and edge exclusions, considering an appropriate control or surrogate-data design. YASA's slow-wave documentation calls for circular statistics for phase outputs.[13] A sigma peak near a particular phase or event co-occurrence alone does not demonstrate memory consolidation, treatment efficacy or a causal mechanism. Accept this extension separately from basic event detection.

6 Statistics, Delivery and Method Changes

6.1 Match statistical levels to the design

Multiple nights from one participant, windows from one night and events within a window usually form repeated or nested observations. Lazic discusses pseudoreplication caused by treating non-independent observations as independent samples.[14] More sleep windows do not directly mean more independent participants. Specify the comparison unit and, as appropriate to the design, consider participant-level summaries, repeated-measure models or other ways to address dependence, with review by someone competent in the statistical methods used.

Report participant, night, valid-window and event counts together. Confidence intervals, resampling and data splits should match the intended inference level. For participant-population inference, avoid simply resampling all windows independently. Longitudinal work should document pairing, missing follow-up and night selection; multicenter work should check whether equipment or center factors are confounded with study groups.

Prespecify primary outcomes, covariates and the number of band, stage and channel comparisons, and document multiplicity handling. Provide effects, intervals and model checks, marking exploratory findings. A failure to detect a difference does not establish equivalence; significance does not directly establish individual diagnosis or intervention efficacy. Retain unestimable results and reasons for insufficient data, extreme missingness or unstable models instead of filling reports with arbitrary values.

6.2 Deliver recomputable results and complete version relationships

The acceptance package should link raw input versions, quality masks, staging versions, processing branches, event and spectral data, analysis datasets, parameters and final figures. Each metric should be traceable to its included participants, nights, channels and intervals and its denominator. The commissioner should be able to recompute the principal summaries from delivered data. Where licenses restrict transfer of code or models, define transferable configuration, methods, execution interfaces and reproduction evidence in the contract.

DeliverableIncludeAcceptance action
Input and quality reportChecksums, dictionary, exceptions and valid quantitiesCheck recording links and sample raw waveforms and excluded intervals
Staging and revisionsOriginal labels, mapping, final labels, scorer and revision versionsInspect epoch correspondence, disagreements and unscored states
Spectra and event recordsUnits, channel, stage, time, parameters and denominatorsRecompute selected metrics and compare events with waveforms
Statistics and figuresAnalysis set, independent sample counts, models and uncertaintyCompare with the plan and recompute primary outcomes and key comparisons
Executable methodsCode or usable interface, dependencies, configuration and model versionRerun agreed examples in the specified environment and compare outputs
Changes and closureInput replacements, method revisions, retention and access terminationConfirm affected outputs are updated and preserve approvals and handover

Reproduction checks should fix inputs and runtime and compare principal values, event times, labels and summaries. Floating-point or platform differences can occur; specify tolerances and comparison objects beforehand rather than relaxing them after an error is found. Manual scoring needs separate decision and revision evidence; a new manual scoring exercise need not reproduce every label identically.

When software, models, labels, references, filters, masks or statistical methods change, list the affected outputs, choose representative regression examples and recheck major findings. Do not overwrite old and new products under one name and lose their relationships. Even a text-only report revision needs a check for changes to numeric interpretation, captions or the conditions under which conclusions apply.

At closure, hand over permitted research products, access lists, retention periods and expiry arrangements, and terminate contractor access as agreed. Research quality, data permission and clinical applicability concern different evidence and responsible parties, which should be identified in the contract and report. This draft provides a commissioning and methods review framework that still requires actual acquisition information, a study protocol and human editorial review.

7 References and Verification Scope

These sources support scoring examples, file formats, analysis interfaces and statistical limitations. Commissioning tables, acceptance procedures and version management in this guide are practical recommendations derived from that evidence, rather than uniform procurement standards issued by the cited organizations. Public AASM examples do not replace its full scoring manual. Online software documentation changes; freeze the actual versions and parameters used. No participant data were processed, and no provider's or device's clinical performance was validated for this draft.

[1] AASM: Inter-scorer Reliability General Instructions. Used for example signal combinations, stage labels and viewing duration, not as the current complete source of event thresholds.

[2] EDF+: Full Specification. Continuous/discontinuous recordings, headers, timing and annotation structure.

[3] BIDS: Electroencephalography, stable specification. Electrodes, channels and acquisition metadata; fix and validate the version for a BIDS delivery.

[4] PhysioNet: Sleep-EDF Database Expanded. Derivations, sampling and original manually scored labels; this example does not represent all sleep datasets.

[5] MNE: read_raw_edf. Mixed sampling rates, missing units and EDF annotation reader behavior.

[6] MNE: Setting the EEG Reference. Implementations of reference transformations; selection depends on recordings and study aims.

[7] MNE: Filtering and Resampling Data. Filtering, resampling, anti-aliasing and timing limitations.

[8] MNE: Rejecting Bad Data Spans and Breaks. Annotation and rejection methods; not an assumption that every function uses identical masks.

[9] SciPy: signal.welch. Density/spectrum scaling, units and segment averaging.

[10] MNE: psd_array_welch. Segment, FFT, overlap and aggregation parameters.

[11] YASA: SleepStaging. Input, internal processing, epoch outputs and manual review guidance; published results are not a case-specific performance promise.

[12] YASA: spindles_detect. Input units, stage restriction and detector parameters.

[13] YASA: sw_detect. Slow-wave properties, parameters and circular statistics for coupling phase.

[14] Lazic (2010): The Problem of Pseudoreplication in Neuroscientific Studies. Original methodological discussion supporting repeated and nested observation precautions, not normal ranges for sleep metrics.

- This guide is a reference document under the World Sleep Industry Technology System (WSIT), intended for sleep industry professionals worldwide. It does not constitute certification, recommendation or endorsement of any product or service, and does not replace the laws, regulations or regulatory requirements applicable where a business operates. - Regulatory requirements for consumer electrical appliances vary across countries and regions. Product development, manufacturing, labeling, claims and sales must comply with the regulations applicable where a business operates. - Specific technical parameters, functions and instructions for use are subject to the product’s actual instruction manual and the currently effective regulations applicable where a business operates. © 2026 World Sleep Center. All rights reserved. [worldsleep.com](https://worldsleep.com) When citing this guide, include Document ID WSIT-RG-5531 and version V1.0.