Validation

How each result is compared with a reference tool, and what is not compared yet.

  1. 1
    Same input

    A public recording, or a test signal with a known answer.

  2. 2
    Two tools

    EEG TraceLab and one reference tool, side by side.

  3. 3
    Every value

    Compared one by one, none sampled.

  4. 4
    Set limit

    A result passes only inside a limit chosen beforehand.

883automatic unit tests
280automatic interface tests
5.7 GBlargest test file: 2 hours, 128 channels, 2,048 Hz

Last updated 4 December 2026.

About these checks

What this page covers

EEG TraceLab is an app for iPhone, iPad and Mac that opens EDF, BDF and CSV EEG recordings. Nothing on this page is a clinical claim.

This page is about numerical agreement. When we say a result agrees with SciPy or MATLAB, we mean that the app and that tool give the same numbers from the same input, within a stated tolerance. Agreement does not show that a recording is clean, that an analysis suits your question, or what a result means for a person.

The app computes every result on the device, in its own Swift code, with Apple’s Accelerate framework for the FFT. SciPy, MATLAB, MNE-Python and EEGLAB ran on a separate Mac, only to check the app’s outputs. The app does not include them or call them.

The checks on this page cover:

  • Reading EDF, BDF and CSV files, and exporting segments.
  • Welch power spectral density (PSD) and band power.
  • Re-referencing and voltage unit conversion.
  • The optional paired-subject statistics in Channel Group Band Power Comparison.
  • Recording Overview.
  • Research Handoff folders, loaded with the included MNE-Python and EEGLAB loader scripts.
  • Saved analysis runs, provenance records and file integrity checks.
  • The cleaning steps: suggested bad channels, interpolation, bad stretches, ICA, scalp maps and the line-noise notch.

The comparisons use test signals with known values and public recordings: PhysioNet’s EEG Motor Movement/Imagery Dataset and EEGMAT, EEGLAB’s sample data and a BioSemi test file. A few recordings of the developer’s own were used and are not published.

Dates: the spectra, re-referencing, statistics and Handoff comparisons ran on the app code of 22 September 2026. The other sections give their own dates. See “Changes since the last full run” below.

How we compare

Each run records the tool versions, and SHA-256 hashes of the inputs, the scripts and the app source files that were compiled.

The reference scripts do not import app formulas or app-made expected values. One thing is shared on purpose. For Welch PSD, the references use the segment length, overlap and FFT length that the app chose. The comparison therefore checks the spectrum for those settings. It does not check the app’s rule for choosing them.

Tools and versions
RoleToolVersion
App under testEEG TraceLab Swift code, with the Apple Accelerate (vDSP) FFTCode of 22 September 2026, built with Xcode 26.2 and run in the iPhone 17 Pro Simulator, iOS 26.3.1
Welch PSD referenceSciPy, scipy.signal.welchSciPy 1.18.1, NumPy 2.5.3, Python 3.13.13
Welch PSD referenceMATLAB pwelchMATLAB R2022b Update 4 (9.13.0.2166757), Signal Processing Toolbox 9.1
Statistics referenceMATLAB signrank (exact method) and full enumerationMATLAB R2022b Update 4, Statistics and Machine Learning Toolbox 12.4
Re-referencing referenceMATLAB arithmetic written for the checkMATLAB R2022b Update 4
Loader checkMNE-PythonMNE 1.13.2, NumPy 2.5.3, Python 3.13.13
Loader checkEEGLABEEGLAB 2023.0 on MATLAB R2022b Update 4
Committed PSD fixturesSciPy, scipy.signal.welchSciPy 1.17.1 for two of the three; the third did not record its version. Committed in June 2026.
The reference tools ran on a Mac with macOS 26.1. The app ran in the iPhone Simulator on the same Mac, not on a physical iPhone.
Pass rules
CheckWhat must matchRule
Welch PSD, full spectraNumber of bins, every frequency and every PSD valueFrequency within 1 × 10⁻⁹ Hz. PSD within 1 × 10⁻⁹ µV²/Hz + 1 × 10⁻⁷ × |value| in each bin.
Committed SciPy fixturesSegment, overlap and FFT length, lengths, frequencies, every PSD value, peak, band powers and which bands are availableFrequency within 1 × 10⁻⁹ Hz. PSD within 1 × 10⁻⁸ µV²/Hz and 8% relative. Peak within one frequency step. Band power within 8%.
Fixture regenerationLengths, frequencies, PSD values and band powersWithin 1 × 10⁻¹² absolute and 1 × 10⁻¹⁰ relative
Re-referencingEvery output sample, channel order, sample rate, start time and first sample indexWithin 1 × 10⁻¹² µV
Exact p valuesThe p value of each caseIdentical
Bootstrap intervalsBoth ends of each intervalWithin 1 × 10⁻¹² of the exact discrete quantiles
MNE-Python loadEvery sample, channel names, sample rate, sample times and eventsSamples within 1 × 10⁻¹⁵ V + 1 × 10⁻¹² relative. Times and event times within 1 × 10⁻¹² s. After a FIF save and reload, event times within 1 µs.
EEGLAB loadEvery sample, sample rate, sample count and eventsSamples within 1 × 10⁻¹⁰ µV. Event latencies and durations within 1 × 10⁻¹⁰ samples.
Corrupted bundlesEach loader must refuse each corrupted bundleAny accepted bundle fails the run
Relative differences use a floor of 1 × 10⁻¹² µV²/Hz in the denominator, so bins close to zero do not inflate them. The floor is used only for reporting.

These checks found real problems during development. An approximate formula gave wrong p values. A band power timeline stopped after the first 735 s of a one-hour recording. Channels with an unknown unit were treated as microvolts. Each was fixed before the runs reported here. Earlier failed runs are kept in our records, and no tolerance was widened to make a run pass.

We round numbers to two or three significant figures. Full precision is in the source result files.

Signal and spectra

Reading EDF, BDF and recordings with gaps

The app and the Online EEG Reviewer read EDF, EDF+C and EDF+D (16-bit samples) and BDF, BDF+C and BDF+D (24-bit samples). Both readers follow the same rules:

  • A BDF header starts with byte 0xFF and “BIOSEMI”. Each sample is a 3-byte little-endian two’s-complement integer from −8,388,608 to 8,388,607; it is never rounded to 16 bits.
  • Every sample becomes (d − dmin) × (pmax − pmin) / (dmax − dmin) + pmin, with the channel’s own digital and physical ranges, then µV for voltage units.
  • A BioSemi “Status” channel is never a voltage channel. A trigger event starts at each sample where its lower 16 bits change to a code other than 0; bits 16 to 23 (device status) never make events; a code already present at the first sample is the starting state.
  • EDF+C and BDF+C record onsets must follow each other exactly. In EDF+D and BDF+D each record starts at the onset of its own time-keeping annotation; a later onset starts a new segment, and onsets within 1 µs of the previous record’s end are writer rounding, not a gap.
  • A header that says EDF+C or BDF+C but has no annotation signal (some tools write these, such as the Julia library EDF.jl) is read as a plain continuous file, as EDFlib does. EDF+D or BDF+D without one is declined, because its record times are unknown.
  • Gaps stay on the time axis. A sample’s index is its time × sample rate, so indexes after a gap keep their meaning; a record that starts between two samples is placed on the nearer sample, at most half a sample period away.
  • A record that starts before the previous shown record ends overlaps it, which EDF+ does not allow. It is left out and counted, never moved, and the next record starts a new segment, because the data jumps there.
  • Every read, display filter, spectrum and analysis lies inside one continuous segment. A range that crosses a gap is refused with the segments to choose from; it is never shortened, padded or joined.
  • The annotated copy of a BDF file is BDF+ with a 3-byte “BDF Annotations” signal. The copy of an EDF+D or BDF+D file stays EDF+D or BDF+D and writes every record’s onset back as read, the left-out records included.
Checks on generated files with known values (24 November 2026)
FileWhat is knownResult
BDF, 2 channels, 1,024 samplesA full-scale ramp with both extremes and 20 byte-boundary values (−1, 0, 255, 256, 32,767, 32,768, 65,536 and others)Every value exact in the app; exact in Float32 in the Reviewer
BDF with a Status channel4 trigger codes at known samples, a code at the first sample, a status-bit change and a Status channel labelled in µV4 events at their samples; Status never a voltage
BDF+CAnnotations in 3-byte units, first record at 0.5 sOnsets relative to the first record; samples exact
EDF+DGaps of 0.625 s, 9.5 s and 1 h; one record at 25.123456789 s, between two samples at 8 Hz4 segments; that record placed 1.5 ms away, on the nearer sample; reads across a gap refused
BDF+D24-bit values near both extremes after the gaps; triggers after a gapExact values; triggers at 4.125 s and 100 s
EDF+D, overlapping recordA record that repeats the previous onsetLeft out and counted; every other record keeps its time
Annotated copiesBDF → BDF+C, EDF+D → EDF+D, BDF+D → BDF+DEvery signal byte unchanged; every record onset read back unchanged

An independent decoder written from the format specifications with NumPy 2.4.4, sharing no code with the app or the Reviewer, read the same files. It agreed with the app and with the Reviewer on format, time axis, segments, left-out records, annotation onsets, trigger times and every compared sample value (the first 64 samples of a window at the start of each of the first four segments, every channel).

Agreement with the NumPy decoder
FilesComparedResult
6 generated files (above)592 sample values, segments, 6 annotation onsets, 6 trigger timesEqual in the app and in the Reviewer
A real 20-minute EDF+D recording, 95 signals at 1,024 Hz (not published)24,320 sample values; 1,208 records in 4 segments; 3 records that repeat the previous onset left outEqual in the app and in the Reviewer
2 real EDF+C recordings (not published)9,088 sample values and their annotation onsetsEqual in the app: continuous files read as before
A large BDF: 128 EEG channels and Status at 2,048 Hz, 1 hour, 2.85 GB (generated)
StepTimePeak memory
Import: copy, de-identify, read 1,799 Status triggers19 s90 MiB
Viewer window: 10 s of 128 channels0.18 s101 MiB
Power Spectral Analysis: 5 min of 20 channels, in 4 chunks; peak found at 10 Hz16 s166 MiB
App Debug build in the iOS Simulator on a Mac, not a physical iPhone; a Release build computes several times faster. A 30-second window of all 128 channels needs 360 MiB of working memory, above the Viewer’s 192 MiB: the Viewer says so and offers the longest window that fits (15 s) or the number of channels that fit (68). It never thins the data out to make it fit.
Cross-checks with MNE-Python and EDFlib, and public test files (24 November 2026)
FilesCompared withResult
17 public test files from BioSemi, MNE-Python, pyedflib, edfReader, EDF.jl and biosigio (BDF, BDF+C, BDF+D, EDF+C, EDF+D)The NumPy decoderThe app and the Reviewer agree on all 17: format, segments, annotation onsets, Status triggers and samples. The BDF file whose header says EDF+C but has no annotation signal (from EDF.jl) is read as plain BDF, as MNE-Python and EDFlib read it; before 24 November both refused it
The 6 generated files above, the 16 public files and 3 real recordingsMNE-Python 1.13.2 (records in file order)45,202 sample values equal
The 13 of them EDFlib opensEDFlib (Teunis van Beelen, BSD-3-Clause), through a small reading tool9,494 sample values equal
EDFlib refuses EDF+D and BDF+D files by design, and files whose header fields do not follow EDF+ (the generated test files use placeholder patient fields). MNE-Python reads the records of an EDF+D file one after another, without the gaps, so it was compared in file order, and it resamples channels whose rate is below the file’s highest, so those were compared in EDFlib and NumPy only. EDFbrowser was not used.

The figures above are from generated files, public test files and three real recordings; files from other systems may use features not covered here.

Converting Muse recordings and other CSV files

The app and the Online EEG Reviewer convert a CSV of EEG samples into a new EDF+ file (or 24-bit BDF+ when 16 bits would round the values), which then opens like any EDF. Both use the same rules, written separately in Swift and TypeScript:

  • A Muse headband recording in the layout Mind Monitor writes is recognised by its TimeStamp and RAW_TP9, RAW_AF7, RAW_AF8, RAW_TP10 columns; the rate is 256 Hz (220 Hz for the 2014 Muse) when the timestamps give it within 3 %.
  • A Muse recording opens with the 0.5 Hz display high-pass on, in the app’s Viewer and in the Reviewer, because its EEG sits around 800 µV, the headband’s mid-scale. This changes the drawing only: analyses and exports read the recorded samples.
  • The samples follow the headband’s clock. Mind Monitor stamps rows on Bluetooth arrival, so each sample’s lag behind the 256 Hz clock is tracked; its lowest value over 10 s is the delivery delay. A pause that is caught up leaves it unchanged, while missing samples raise it for good: a rise of at least 30 ms (or half the 99th-percentile jitter, if larger) is a gap of that many samples.
  • Rows the headband did not deliver, written with NaN, are a gap of that many samples when the timestamps agree, otherwise of the time the timestamps show (a long dropout is written as fast NaN rows, then a jump).
  • Markers and events are placed by their timestamps less the delivery delay; they can be off by the Bluetooth latency itself, usually some tens of milliseconds.
  • A general CSV is read as one sample per row, at the rate the user enters; an empty or non-numeric cell in a chosen column stops the import with its row number.
  • Values are stored to within half a digital step: 16-bit EDF+ when its step is at most a quarter of the smallest difference between the column’s values, otherwise 24-bit BDF+. A data record holds a whole number of samples (0.125 s at 256 Hz); the last samples of a stretch that do not fill one are left out and counted.
Generated CSV files with known values (24 November 2026)
FileWhat is knownResult
Muse, 70 s at 256 Hz, 12-sample packets stamped on arrival2 s and 0.25 s lost, two NaN packets, a 0.35 s stall, 3 markers, a connection event, 2 s with the headband offGaps of 512, 64, 12 and 12 samples where they were; every stored value at its true sample time; markers within 10 ms of their time less the delay
Muse, a dropout written as 500 fast NaN rows768 samples lostOne gap of 768 samples (± 1)
Muse, no dropoutsClock 150 ppm fast, stalls of 0.3 and 0.2 sNo gaps; drift reported
Muse, re-saved by a spreadsheetMinute:second stamps in tenths, an hour rollover, 3 s lostOne gap within 0.06 s of 3 s
Band powers only; one row a secondNo raw EEGDeclined with a reason
General CSV, 1 and 4 decimalsKnown values at 250 HzEDF+ and BDF+; every value within half a digital step
Six public Mind Monitor recordings
RecordingSamplesResult
import_muse example (2019, BSD-3-Clause)36,360 (2.4 min)No gaps; pauses up to 0.27 s caught up
EEGLAB Muse Monitor plugin example (2017, BSD-3-Clause)26 rows, one a secondDeclined: no raw EEG
Exam stress study, S19 (2024, CC BY 4.0)12,192 (48 s)No gaps; a connection event and 26 blink and jaw-clench detections
Muse 2 with PPG columns (2026, CC BY 4.0)134,856 (8.8 min)No gaps; 57 events and detections
Decision study, museData6 (2023, CC BY 4.0)519,480 (34.5 min)162 gaps, 44.1 s in all: 161 NaN runs and one 11.6 s break; the timeline after the gaps drifts smoothly, without steps
Muse-Analysis-Tools example (2020)767,100 (50 min)No gaps; pauses up to 0.40 s caught up; clock drift 0.35 s
An independent reader in Python (its own CSV and EDF decoding) and MNE-Python 1.13.2 read the five converted files: every stretch held the CSV’s sample rows in order, 5,870,336 values within half a digital step. EDFlib opened the four continuous ones as EDF+. The Online EEG Reviewer’s conversion of the same five files is identical to the app’s, byte for byte (17.3 MB).

Welch PSD against SciPy and MATLAB

Power Spectral Analysis uses Welch’s method by default. The table lists what the app does.

Welch PSD in the app
SettingValue
WindowSymmetric Hann: w[n] = 0.5 − 0.5 cos(2πn / (L − 1))
Mean removalThe mean of the whole window, then the mean of each segment, before windowing
Overlap0, 25, 50 or 75% of the segment; 50% by default
Segment length, Balanced averaging (default)Aims for max(64, round(2 × fs)) samples, about 2 s
Segment length, Maximum frequency resolutionAims for at least fs / 0.016 samples, to reach the infraslow band
Segment length, both strategiesThe aim is capped at 16,384 samples and rounded up to a power of two. If that is longer than the window, the app uses the largest power of two that fits. The minimum is 16 samples.
FFT lengthEqual to the segment length, so there is no zero padding
ScalingOne-sided density, |X(f)|² / (fs × Σw²), doubled at every bin except 0 Hz and Nyquist, in µV²/Hz
AveragingPlain mean of all full segments. Samples after the last full segment are not used.
Frequency stepfs / FFT length
UnitsV, mV, µV and nV are converted to µV first. Unknown units are refused.

Test signals. Every input uses the same formula, in µV:

x(t) = 2 sin(2π × 10.37 t) + 0.3 sin(2π × 0.02 t) + 0.005 t + 0.2 u(t)

u(t): uniform noise in [−0.5, 0.5) from a 64-bit linear congruential generator
  state ← state × 6364136223846793005 + 1442695040888963407  (mod 2⁶⁴)
  u = (state >> 11) / 2⁵³ − 0.5
  seed = 0x454547 + case number (0 to 3)

The 10.37 Hz tone falls between frequency bins, so it tests spectral leakage. The 0.02 Hz sine and the linear term add slow drift, which tests mean removal. The 64 and 200 Hz inputs were given in µV. The 128 and 257 Hz inputs held the same signal in mV, which tests unit conversion. Each input ran with both segment strategies and 50% overlap. That gives 8 spectra for each reference tool, 16 in all.

App against MATLAB and SciPy, 22 September 2026
Sample rateSamples (duration)StrategySegment (samples)BinsLargest difference, MATLABLargest difference, SciPy
64 Hz257 (4.0 s)Balanced128654.4 × 10⁻¹⁶4.4 × 10⁻¹⁶
64 Hz257 (4.0 s)Maximum resolution2561291.8 × 10⁻¹⁵2.7 × 10⁻¹⁵
128 Hz, mV input1,023 (8.0 s)Balanced2561295.6 × 10⁻¹⁷4.4 × 10⁻¹⁶
128 Hz, mV input1,023 (8.0 s)Maximum resolution5122575.3 × 10⁻¹⁵8.9 × 10⁻¹⁶
200 Hz6,001 (30 s)Balanced5122572.7 × 10⁻¹⁵8.9 × 10⁻¹⁶
200 Hz6,001 (30 s)Maximum resolution4,0962,0491.1 × 10⁻¹⁴1.1 × 10⁻¹⁴
257 Hz, mV input33,001 (128 s)Balanced1,0245138.9 × 10⁻¹⁶8.9 × 10⁻¹⁶
257 Hz, mV input33,001 (128 s)Maximum resolution16,3848,1934.8 × 10⁻¹³1.8 × 10⁻¹⁴
Differences are absolute, in µV²/Hz. The frequency grid matched exactly in every case, and all 11,592 bins per tool met the rule. The largest relative differences were 2.4 × 10⁻¹² (MATLAB) and 1.7 × 10⁻¹² (SciPy). The number of averaged segments ranged from 1 to 63.

How the references compute. SciPy removes the global mean and runs scipy.signal.welch with the same Hann window, segment length, overlap and FFT length, constant detrend and density scaling. MATLAB removes the global mean, then calls pwelch on each full segment separately after removing that segment’s mean, and averages the results. Neither uses app code.

Committed SciPy fixtures. The app’s unit tests also compare the app with three spectra that SciPy made and that are stored with the tests. Two record SciPy 1.17.1. The third repeats the first and did not record its SciPy version. It was once labelled a MATLAB fixture by mistake, but SciPy made it. Its label was corrected and its numbers were left unchanged.

App against the committed SciPy fixtures, September 2026 test runs
FixtureSignalWelch settingsPSD, largest absolutePSD, largest relativePeak errorBand power, largest relative
Alpha and beta, 128 Hz2.0 sin(2π × 10 t) + 0.45 sin(2π × 20 t + 0.2), 8 sSegment 1,024, 50% overlap, FFT 1,024, step 0.125 Hz8.9 × 10⁻¹⁶ µV²/Hz1.7 × 10⁻¹⁰0 Hz5.3 × 10⁻¹¹
Infraslow and alpha, 64 Hz1.4 sin(2π × 0.0625 t) + 0.25 sin(2π × 10 t), 256 sSegment 4,096, 50% overlap, FFT 4,096, step 0.0156 Hz5.3 × 10⁻¹⁵ µV²/Hz6.7 × 10⁻¹⁰0 Hz9.1 × 10⁻¹³
Repeat of the first (old MATLAB label)As the firstAs the first8.9 × 10⁻¹⁶ µV²/Hz1.7 × 10⁻¹⁰0 Hz5.3 × 10⁻¹¹
The test’s pass rule is much wider than these differences. The fixtures have no physical unit; the test feeds them to the app as µV. Both signals fit a whole number of cycles in every segment, so these fixtures cannot reveal errors in per-segment mean removal. The off-grid inputs above can.

We also regenerate the fixtures with SciPy and compare them with the stored files. On 22 September 2026, SciPy 1.18.1 reproduced all three within 1.4 × 10⁻¹⁴ µV²/Hz. On 23 November 2026, SciPy 1.17.1 reproduced them exactly.

We also cross-checked the references against each other. On 22 September 2026, MATLAB’s pwelch reproduced the first SciPy fixture in all 513 bins, within 3.6 × 10⁻¹⁵ µV²/Hz. The rule was 1 × 10⁻¹⁰ absolute and 1 × 10⁻⁷ relative.

Re-referencing and unit conversion against MATLAB

Preprocess offers four manual steps: bad-channel exclusion, detrend, high-pass and re-reference. The original samples are never changed. A saved preprocessing run stores the raw recording ID, the steps and their parameters, and is computed again from the raw data.

Re-referencing and unit conversion have a reference comparison. Detrend and high-pass do not (see “What is not validated”).

Test input: three channels, five samples each, at 4 Hz, first sample at 0.25 s (sample index 1)
ChannelUnitSamplesSame samples in µV
C3µV100, −80, 25, 0, 7100, −80, 25, 0, 7
M1mV0.1, −0.04, 0.005, 0.002, −0.003100, −40, 5, 2, −3
M2nV20000, −30000, 15000, −2000, 100020, −30, 15, −2, 1
App against MATLAB, 22 September 2026
TransformOutput channelsValues comparedLargest error
Unit conversion to µV3150 µV
Common average (all three channels)3151.4 × 10⁻¹⁴ µV
Single reference (M1)3150 µV
Linked mastoids (mean of M1 and M2)3150 µV
Bipolar (C3 − M1 and C3 − M2)2100 µV
All 70 values met the 1 × 10⁻¹² µV rule. MATLAB also checked the channel order, the sample rate, the start time and the first sample index, and that each bipolar output kept its own identity. For example, 100 µV minus 0.1 mV gives exactly 0 µV.

The arithmetic used in this check has not changed since 22 September 2026. How montages are put together has changed. Automatic bipolar pairs now follow the standard double-banana chain for scalp recordings. In the Viewer, channels without a voltage unit are shown as recorded inside a montage, and analyses leave them out. These rules have no reference comparison.

Analysis modules

Band power and the other analysis modules

Band power is the sum of the PSD bins inside a band, times the frequency step. Relative power divides that by the power of all bins above 0 Hz, up to Nyquist. So the bands do not add up to 1, and bins between 0.1 and 0.5 Hz belong to no band. The peak frequency is the bin with the highest PSD above 0 Hz.

Frequency bands
BandRangeNeeds
Infraslow0.016–0.1 HzA segment resolution (fs / segment length) of 0.016 Hz or finer. Meaningful only for DC-coupled recordings.
Delta0.5–4 HzNyquist of 4 Hz or more
Theta4–8 HzNyquist of 8 Hz or more
Alpha8–13 HzNyquist of 13 Hz or more
Beta13–30 HzNyquist of 30 Hz or more
Gamma30–80 HzNyquist of 80 Hz or more, so a sample rate of 160 Hz or more
Each band includes its lower edge and excludes its upper edge. Gamma also includes 80 Hz. Every band also needs at least one bin inside it.

A band that fails these rules is marked unavailable, with a reason. Unavailable values are blank in CSV files and null in JSON. They never enter means, ratios or the choice of dominant band. A true zero stays a valid zero. Relative power is unavailable when the total power is zero.

Band power has no separate reference run. It is checked in three ways:

  • Against SciPy band powers in the two committed fixtures. The largest relative difference was 5.3 × 10⁻¹¹, and the pattern of unavailable bands matched.
  • Against a known answer. A 10 Hz sine of amplitude 1 µV has a power of 0.5 µV². The preview spectrum in Preprocess is a single Hann-windowed FFT of the whole window. It gave 0.5 ± 0.002 µV² for total and alpha power, with the peak within one bin of 10 Hz. This held for 30 cases: 6 sample rates from 32 to 512 Hz, each with 5 window lengths from 4 to 120 s.
  • Indirectly, through the full PSD comparison, because band power is a sum of those bins.
Analysis modules
ModuleHow it computesReference comparisonKnown-answer checks in the app’s tests
Power Spectral Analysis, WelchAs described aboveSciPy and MATLAB, every bin, 22 September 2026The committed SciPy fixtures. Inputs in V, mV, µV and nV give the same spectrum within 1 × 10⁻⁸ µV²/Hz + 1 × 10⁻¹⁰ relative.
Power Spectral Analysis, FFT optionOne Hann-windowed periodogram of the whole window, zero-padded to a power of twoNoneTotal power within 8% of the time-domain power for a 10 Hz sine
Band Power Timeline and Time-Frequency Analysis (one shared analyser)One Welch PSD per time bin, bins of up to 30 s, with the last bin anchored to the end of the rangeNone for the timeline as a whole. Each bin uses the Welch code compared above.One hour at 32 Hz, with the amplitude doubled at 55 min. 239 bins end at exactly 3,600 s. Alpha power goes from 0.500 to 2.00 µV², a ratio of 4 within 1 × 10⁻⁸.
Channel Group Band Power ComparisonWelch PSD per window, then means per channel groupThe optional paired-subject statistics, against MATLAB (next section)Channels, groups and windows keep separate identities and numbers after renaming
Aperiodic / Spectral Slope AnalysisLeast-squares line through log10 PSD against log10 frequency, 1–45 Hz by default, no kneeNoneOnly the sign of the slope, on one synthetic signal
SpectrogramShort-time FFT with a Hann window, in dB, for up to 8 channels and 400 time binsNonePeak near 10 Hz for a steady 10 Hz sine
Time-Domain Signal MetricsMean, minimum, maximum, peak-to-peak, RMS, variance, zero-crossing rate, flat-line and clipping flagsNoneExact values for one short known signal
Known-answer checks compare with values worked out by hand, not with another tool. Their last archived run was on the app code of 22 September 2026.

Paired-subject statistics against MATLAB

Channel Group Band Power Comparison can test a difference between two windows across independent subjects. You paste one baseline value and one comparison value per subject, with a subject ID. Channels from one recording are never treated as subjects; their summaries stay descriptive.

Both tests are two-sided. The Wilcoxon signed-rank test gives tied values their average rank and drops zero differences. The sign-flip test uses the absolute sum of the paired differences. With up to 20 non-zero pairs, the app enumerates every sign assignment, so the p value is exact. With more, it draws 9,999 seeded random assignments and reports (extreme + 1) / (9,999 + 1). The 95% interval is a paired percentile bootstrap of the mean difference, with 9,999 resamples and linear interpolation between ordered values.

App against MATLAB, 22 September 2026
CasePaired differencesSign assignmentsWilcoxon pSign-flip pApp 95% intervalExact discrete quantiles (MATLAB)
Five positive1, 2, 3, 4, 5320.06250.06251.8 to 4.21.8 to 4.2
Tied values1, 1, 280.250.251 to 21 to 2
With a zero0, 1, 1, 280.250.250.25 to 1.750.25 to 1.75
Mixed signs1, 1, −2811−2 to 1−2 to 1
One pair1211Not availableNot available
All equal2, 2, 280.250.252 to 22 to 2
All zero0, 0, 011 (app convention, not compared)10 to 00 to 0
Every compared p value was identical in the app and in MATLAB: 6 Wilcoxon values (MATLAB signrank, exact method) and 7 sign-flip values (full enumeration). With all differences zero there are no ranks to test; the app reports p = 1 by its own convention, and MATLAB was not asked to confirm it. The app’s interval ends matched the exact discrete quantiles within 2.2 × 10⁻¹⁶.

A second way of reading the exact distribution gives different ends in two cases. It uses linear interpolation over the list of all nⁿ possible resamples, where n is the number of pairs. For 1, 1, 2 it gives an upper end of 1.78 instead of 2. For 1, 1, −2 it gives a lower end of −1.35 instead of −2. We report this difference rather than hide it. It comes from two definitions of a quantile on a very small discrete distribution. These examples do not show that random bootstrap intervals always equal exact ones.

Why this check exists. An earlier development version used one approximate formula for both tests. For 1, 2, 3, 4, 5 it gave 2.7 × 10⁻⁵, where the exact value is 0.0625, and it labelled a normal-theory interval of 1.61 to 4.39 as a bootstrap. We reproduced those figures from the old source formula, not by running the old app.

  • The MATLAB comparison used 7 small examples with up to 5 pairs, so only exact enumeration was compared. The random branch for more than 20 non-zero pairs has a reproducibility check only.
  • p values are not adjusted for multiple comparisons.
  • Independence of subjects and exchangeability of signs are your declarations. The app cannot check them.

Recording Overview

Recording Overview is a compressed spectral array of a whole recording, computed on the iPhone. The rules checked:

  • Each window follows Power Spectral Analysis: the next power of two of about 2 s of samples, the app’s Hann taper, the window’s own mean removed, one-sided PSD in µV²/Hz, 50% overlap.
  • Windows lie inside one continuous stretch of data and never cross a gap; records that overlap the record before (EDF+D, BDF+D) are not read.
  • Time is cut into columns of a whole number of window steps, at most 1,200 and at most 3,000,000 values in all. A window feeds the column that holds its centre; a column is the mean of its windows. A column without a window has no data.
  • Summary rows are the mean of their channels’ power: left and right hemisphere (and midline) when most labels are 10-20 / 10-10 positions, one per electrode shaft when most labels are depth contacts (heart, muscle, eye and marker inputs such as EKG1-EKG2 in none), otherwise every channel. Colour runs from the 5th to the 95th percentile of the dB values shown.
The app against NumPy and SciPy (24 November 2026)
File and requestGridResult
EDF+C, 256 Hz, 4 channels, 1 h of known tones and bursts6 rows × 1,200 columns × 60 frequencies, 21 readsEvery column’s window count identical; PSD within 5.9 × 10⁻⁸ (relative), 2.6 × 10⁻⁷ dB
The same, 1,000–2,000 s, 1–45 Hz6 × 500 × 89, 5 readsIdentical counts; within 5.9 × 10⁻⁸, 2.6 × 10⁻⁷ dB
BDF, 2,048 Hz, 8 channels of 2 µV tones and a burst, 0.5–30 Hz and 2–100 Hz9 × 300 × 60 and 9 × 300 × 197, 40 and 75 readsIdentical counts; within 6.0 × 10⁻⁸, 2.6 × 10⁻⁷ dB
EDF+D with three gaps, a 1 s stretch and a left-out overlapping record; whole file, 550–1,750 s, and a segment 0.3 sample late3 × 900 × 60, 3 × 600 × 60, 3 × 900 × 60Identical counts; within 5.7 × 10⁻⁸, 2.5 × 10⁻⁷ dB; all 250 columns inside the gaps blank
A real SEEG recording (not published), 84 channels at 1,024 Hz, 20 min 10 s, the Pro defaults94 × 404 × 60, 36 readsIdentical counts; within 6.0 × 10⁻⁸, 2.6 × 10⁻⁷ dB
The differences are the 32-bit floats the grid is stored in. The CSV, with 6 decimals, agrees within 7.6 × 10⁻⁷ dB, and the colour limits within 3.4 × 10⁻⁶ dB. Every column’s time bounds are identical, and so are the summary rows and their channels: left and right hemisphere for the tones file, the average for the BDF and EDF+D files, ten shafts for the SEEG recording.

Known content: in every column that lies inside a stretch of known content, the strongest frequency is the tone that was put there (7,224 columns of the three whole-file runs, no exception), including a 15 Hz burst of 30 s and the 6 to 20 Hz change at 30 minutes. The overlapping record left out of the EDF+D file holds a 200 µV 25 Hz tone: the strongest 25 Hz value anywhere is −70.4 dB, where a leak would be above +37 dB.

The reference recomputes everything from the source files with its own EDF, BDF and EDF+D reader (checked against MNE-Python 1.13.2 within 6 × 10⁻¹² µV) and scipy.signal.spectrogram, with SciPy 1.18.1 and NumPy 2.5.5. The app’s run read the synthetic files in chunks of a few megabytes, so the comparison also covers the chunked reading.

A long, dense recording: a generated 2-hour BDF of 128 channels at 2,048 Hz (5.7 GB) gave 129 rows × 379 columns of 19 s × 60 frequencies from 7,199 windows per channel, read in 720 chunks, in 14 minutes in the app’s Debug build in the iPhone simulator. The process stayed within 64 MiB of where it started, inside the app’s 192 MiB analysis budget. A longer recording keeps the same grid size, so memory does not grow with its length. This run was measured before the summary rows were added; with them the same file has 132 rows and 360 columns of 20 s, inside the same limit.

Not checked: a physical iPhone (speed and memory there), saved preprocessing runs and montages against NumPy (unit tests only), and MNE-Python, EEGLAB or MATLAB computing the same overview.

Saved runs, provenance and file integrity

A saved analysis run is a frozen copy of a completed result. It keeps the full numerical arrays, the parameters, the display settings and the exact recipe: recording, montage, preprocessing and filters. All eight modules save this way. Reopening a run shows the stored numbers and does not compute them again. Computing again creates a new run. Older summary-only records stay readable and are labelled as legacy.

Each run carries a SHA-256 checksum of its stored content. The app checks it before it shows or exports the run, and refuses a run whose content no longer matches. The checksum detects accidental change or damage. It is not a digital signature and does not prove who made a file.

Provenance. Results, saved runs and exports record:

  • the data source: raw, or a saved preprocessing run;
  • the raw recording ID and the run ID;
  • the steps and their parameters, bad channels and excluded windows;
  • the filter and reference state, and any warnings;
  • the app version and build, and a non-clinical statement.

Each PSD channel also records its original and converted unit, the scale factor, the actual time and index of its first sample, and the algorithm version.

The app’s tests check the points below. They include 36 persistence tests, and they ran on the app code of 22 September 2026.

  • The app writes to disk first and shows “Saved” only after the write succeeds. A failed write keeps the earlier data and shows an error.
  • Files are written atomically, with the previous version kept. A damaged file is preserved with a recovery copy, never overwritten.
  • Data in a newer, unknown format version is never overwritten.
  • Each export has its own folder, relative paths and a SHA-256 list of every file. Sharing checks every byte first. A missing or changed file is reported as missing, never as ready.
  • A Batch Handoff job freezes its request. A retry reuses only finished parts whose files still verify, rebuilds damaged ones, and never puts raw data in place of a missing preprocessing source.
  • Cancelling a long analysis stops the work and keeps the previous completed result.

These are software checks in the iPhone Simulator. We have not measured behaviour on a physical iPhone, such as suspension in the background.

Exports

Exporting a segment

Export Segment saves a time range of chosen channels, at the original or a lower sample rate, as a de-identified EDF+ or BDF+ file. The app and the Online EEG Reviewer follow the same rules:

  • Whole data records: the copy starts at the beginning of the record that holds the start time and ends at the end of the record that holds the end time, so no sample moves. Records that overlap the record before (EDF+D, BDF+D) stay out.
  • A range with no gap gives EDF+C or BDF+C. A range that spans a gap gives EDF+D or BDF+D, in which every record keeps its onset, counted from the new start.
  • At the original rate every kept sample is copied byte for byte; 24-bit BDF stays 24-bit.
  • A lower rate is the fastest channel’s rate divided by a whole number (whole Hz, at least 32 Hz, whole samples per record). Before every Mth sample is kept, a linear-phase FIR low-pass with a Kaiser window, designed as SciPy’s kaiserord and firwin design it for 81 dB, removes what lies above the new Nyquist frequency. The new digital values keep each channel’s calibration. The filter reads real samples beyond the cut within the same recorded segment and mirrors the signal at a segment’s ends; it never runs across a gap.
  • Channels at or below the new rate are copied byte for byte; a BioSemi Status channel keeps every Mth value without filtering.
  • Annotations that overlap the copy are written with onsets from its start and cut at its edges. The header is de-identified as in the De-identified EDF Copy.
The anti-aliasing filter, measured on a 131,072-point frequency grid
PropertySpecificationMeasured
Taps against SciPy 1.17.1 (kaiserord + firwin)The same formulaThe formula in NumPy matches SciPy’s taps within 2.8 × 10⁻¹⁷ for factors 2 to 64; every low-passed sample of the app equals SciPy’s (below)
Stopband, from the new Nyquist frequencyAt least 80 dB downAt least 80.8 dB for every factor from 2 to 128
Passband, to 0.4 × the new rateWithin 0.01%Within 0.0091%
−6 dB point0.45 × the new rate0.45 × the new rate
DelayNone (odd length, centred)Symmetric taps; a constant stays exact
Checks on generated files with known values (24 November 2026)
File and requestWhat is knownResult
EDF, three rates, 2 of 3 channels, 2.5–6.2 sWhole records 2 to 6EDF+C from 2 s to 7 s; every byte of the 2 channels unchanged
EDF+C, BDF (full-scale 24-bit ramp), BDF+CRecord bytes and annotationsEvery byte unchanged; 24-bit kept; annotations from the new start
EDF+D across 2 gaps (0.625 s and 9.5 s)Source onsets, one between two samplesEDF+D, every onset kept to 10⁻⁹ s; a range inside one segment gives EDF+C
BDF+D with a Status channelTrigger codes after the gapsBDF+D, every byte unchanged, the same triggers
EDF+D with a record that repeats the previous onsetThat record overlapsLeft out and counted; the others follow without a gap: EDF+C
Annotations: 8, one deleted, one edited, two added5 of the 7 listed overlap 2–6 s, 2 of them across an edge5 written with onsets from the new start, 2 cut at an edge; events.tsv keeps the original times
10 Hz tone, 8,000 units, 256 to 64 HzThe tone itselfWithin 2 digital units away from the recording’s ends
40 Hz tone, above the new 32 Hz Nyquist frequencyEvery 4th sample alone shows it at 24 Hz (over 5,000 units)At most 2 units left (80 dB is 0.8)
A cut against the whole recording, both downsampledThe same stretchIdentical digital values: the cut uses real samples beyond its edges
EDF+D, 1,000 before a gap and −1,000 after, to 32 HzConstantsExactly 1,000 and −1,000: nothing crosses the gap
BDF with Status and a 32 Hz channel, 512 to 128 HzCodes and bytesStatus every 4th value; the 32 Hz channel byte for byte; 24-bit tone within 250 of 2,000,000

Every segment above, and segments of three real recordings, were then read by the independent NumPy decoder and checked sample by sample from the source files alone: the records a request covers, the record onsets, byte-for-byte channels, Status values, and every low-passed sample recomputed with SciPy and NumPy (reflection at segment ends, convolution, every Mth sample, rounded half away from zero). The app and the Online EEG Reviewer then made the same segments of the same files and were compared byte for byte.

Agreement (24 November 2026)
FilesComparedResult
9 generated files2,836 samples, 1,280 of them low-passed; record choice, onsets, annotationsEqual to NumPy and SciPy, largest difference 0
3 real recordings (not published): 2 EDF+C, 1 EDF+D; 7 segments of 6 channels600,192 samples, 140,160 of them low-passed (1,024 to 256 Hz); one segment across a left-out recordEqual to NumPy and SciPy, largest difference 0
The app against the Online EEG Reviewer, the same 16 segmentsRecords, header bytes, annotations and 603,028 samplesIdentical
17 segments of a second run, including a real BioSemi BDF and two public EDF+D and BDF+D test files with gapsRead back with MNE-Python 1.13.2 (all 17) and EDFlib (the 14 without a gap; EDFlib refuses files with gaps): 4,168 valuesIdentical

The MNE-Python and EDFlib check found one fault, fixed on 24 November 2026: copies of a BioSemi BDF file kept the word “Reserved” in each channel’s reserved header field. Plain BDF allows it, EDF+ and BDF+ do not, and EDFlib refused those copies. The app and the Online EEG Reviewer now write spaces there, in the segment and in the annotated copy, and EDFlib opens them.

Speed and memory: a whole 20-minute recording (84 channels, 1,024 Hz, 245 MB) exports in 6.8 s at the original rate and in about 30 s at 256 Hz on the iPhone simulator, and the app’s memory stays level from one export to the next. This timing found that long exports kept every block they had read until the end, about the size of the file; since 24 November each block is released before the next one is read, in the app’s segment and annotated copy.

Not checked: a physical iPhone (the times above come from the simulator on a Mac) and EDFbrowser (EDFlib, by the same author, was used instead). Gaps were checked on generated files and on public test files from another library, not on a real recording.

Loading Research Handoff files in MNE-Python and EEGLAB

A Research Handoff is a folder of plain files. It holds:

  • the signal as a long CSV table;
  • channel and event tables;
  • a signal contract with units, sample rate and the time of the first sample;
  • a manifest and a checksum list with the SHA-256 hash of every file;
  • loader scripts for MNE-Python and EEGLAB.

The loaders check the files before they build anything. MNE-Python receives volts. EEGLAB receives microvolts.

Test bundles. The app’s tests built real bundles from a synthetic recording, once at 4 Hz and once at 128 Hz. Each has two channels, both labelled Fp1, with four samples. One channel is in µV (100, −100, 25, 0) and the other in mV (0.1, −0.1, 0.025, 0), so both should load as the same physical values. The first sample is at 10.25 s. The tests also built a one-recording Batch Handoff of the same data.

Five events test the edges of the window. They are a point event at the start, an event that crosses the start, an event that crosses the end, a local note, and a point event at the exclusive end. The last one must be left out.

Loader checks, 22 September 2026
CheckToolResult
Valid bundle, single loader, 4 and 128 HzMNE-Python 1.13.22 × 4 samples loaded. Largest amplitude error 1.4 × 10⁻²⁰ V. 4 events at their exact times.
Valid Batch bundle, 4 and 128 HzMNE-Python 1.13.2, Batch loaderOne recording loaded with the same values. No samples dropped or padded.
Save as FIF and reloadMNE-Python 1.13.2Same values. Event times exact at 4 Hz and within 0.50 µs at 128 Hz. Exact event times kept in the file description.
Valid bundle, save as .set/.fdt and reload, 4 and 128 HzEEGLAB 2023.0Amplitude error 0 µV. 4 events at the expected latencies and durations.
21 kinds of corrupted bundle, for each of 3 loaders at 2 sample ratesMNE-Python and EEGLAB126 of 126 refused
All checks132 of 132: 6 valid loads and 126 refusals

Each corrupted bundle has one fault. Most of them had their checksums recomputed after the change, so the loader has to find the fault itself. The 21 faults are:

  • A deleted row.
  • A duplicated time.
  • A row moved to another channel.
  • A time off the sample grid.
  • An unknown channel.
  • An extra channel.
  • A unit that conflicts with the contract.
  • A non-finite sample.
  • Rows out of order.
  • A wrong recording sample index.
  • A checksum mismatch.
  • An unsupported schema version.
  • A file path outside the bundle.
  • A reordered channel table.
  • A wrong declared sample count.
  • A shifted start time in the contract.
  • An unknown unit in the contract.
  • A missing checksum entry.
  • A value that overflows on unit conversion.
  • A start time that contradicts its sample index.
  • A non-finite event latency.

In EEGLAB, the bundle with a path outside the folder was refused by a general MATLAB error (“Dot indexing is not supported for variables of this type.”). This happened before the loader reached its own path check. The refusal counts, but this case does not show the EEGLAB path check at work.

Shared ZIP. When you share a saved Handoff, the app makes a temporary ZIP of the saved folder. We unpacked one on a Mac. All 15 files matched their recorded SHA-256 hashes, and the ZIP checksums passed. The included MNE-Python loader read the same 4 samples at 4 Hz, with an amplitude error of 1.4 × 10⁻²⁰ V.

  • EEGLAB stores data in single precision. The test values are exact in single precision, so the 0 µV result says nothing about rounding of other values.
  • The FIF format stores event times to the microsecond. The exact times are kept separately in the file description.
  • The test bundles held 4 samples per channel and no optional PSD results file.
  • The checks used bundles from the app code of 22 September 2026. Since then the bundle text files and the waveform figure have changed, and the optional EDF copy now replaces identifying channel labels and annotation text as well as header fields. The loaders do not read that copy. The loader scripts and the signal contract have not changed.
  • A successful load shows that the files are intact and consistent. It does not check the science of what is inside them.

Cleaning

Suggested bad channels, compared with pyprep, MNE-Python and EEGLAB

A synthetic recording first: 32 channels at 256 Hz for 120 s, six smooth sources shared by every electrode plus each channel’s own noise, and one fault in each of seven channels (flat for 20 s, broadband noise, a 50 Hz hum, a channel unlike its neighbours, six times the amplitude, clipping, a copy of a neighbour). At Standard every fault is found by its own check and no clean channel is suggested; Lenient suggests fewer, Strict more.

Then 12 PhysioNet recordings (S001 to S003, runs 1 to 4; 64 channels at 160 Hz). The app’s scan at the Standard limits against pyprep 0.10.0 and MNE-Python 1.13.2, summed over the 12 files:

Channels suggested by the app and by the reference
CriterionBothApp onlyReference only
Amplitude unusual (pyprep deviation)1621
High-frequency noise (pyprep HF noise)1936
Uncorrelated (pyprep correlation)1944
Bridged (MNE-Python)840
Where they differ: a channel one window over 1 % (1 of 61 windows is 1.6 %), or a high-frequency z near 5. The 4 bridged pairs only the app finds (F2 and F4, FC4 and FC6 in runs 1 and 2 of S003) are the pairs MNE-Python finds in runs 3 and 4 of the same session. The bridging limit was set from this comparison: at 5 % the app also suggested three pairs MNE-Python does not; at 2 % it does not.

Against EEGLAB’s clean_rawdata (EEGLAB 2023.0, its defaults, each check run alone), on the same 12 files. The two ask different questions: the app, like PREP, whether a channel is unlike every other channel in more than 1 % of 1 s windows; clean_rawdata whether the other channels predict it.

The app and clean_rawdata
The app’s check (clean_rawdata’s)BothApp onlyclean_rawdata only
Flat (flatline)000
Uncorrelated (correlation), Standard1494
High-frequency noise (line noise), Standard20226
High-frequency noise (line noise), Strict27819
The 9 channels only the app finds are uncorrelated in 1 or 2 windows of 61. clean_rawdata marks more channels with muscle noise near the temples and the neck; their high-frequency z in the app is 1.8 to 4.8, under Standard’s 5, and Strict takes 8 of them. No file has a flat channel.

Known faults in real recordings: one fault put into each of 7 channels of every file (flat for 20 s, 20 µV of white noise, a 60 Hz sine of 20 µV, a disconnected channel, six times as large, clipped, a copy of its neighbour), in channels the app does not suggest in the clean file.

Files of 12 in which the fault was found: by its own check, by any check
FaultLenientStandardStrict
Flat12, 1212, 1212, 12
Broadband noise6, 69, 119, 11
Mains hum (60 Hz)12, 1212, 1212, 12
Disconnected12, 1212, 1212, 12
Six times as large12, 1212, 1212, 12
Clipped12, 1212, 1212, 12
Bridged12, 1212, 1212, 12
20 µV of white noise is a small fault next to the temporal muscle of these recordings: Standard and Strict miss it in one file. Of the channels left clean, the files with faults gain one suggestion at Standard (of 600 channels) and none at Lenient or Strict.

Data: PhysioNet EEG Motor Movement/Imagery Dataset v1.0.0 (Schalk et al., IEEE TBME 2004; Goldberger et al., Circulation 2000), licence ODC-By 1.0. The app ran in the iPad simulator; pyprep, MNE-Python and EEGLAB ran on a Mac.

Interpolation, compared with MNE-Python

Interpolation is off unless you switch it on. Unit tests on the 19 electrodes of the 10-20 system: the weights of each rebuilt channel sum to 1; a smooth field left out at C3, Pz, F4 or Cz is rebuilt within 0.15 µV; no channel is rebuilt when 5 of 19 are bad, or when it has fewer than three good neighbours or no known place.

PhysioNet S001R01, the first 60 s: each channel rebuilt from the other 63, by the app and by MNE-Python 1.13.2’s interpolate_bads with the standard 10-05 montage.

Rebuilt channels
Channelr, app with MNE-PythonDifference, share of MNE’s RMSr, app with the recorded channelr, MNE with the recorded channel
C30.99875.2 %0.9860.984
Cz0.99904.6 %0.9750.976
Fz0.99904.5 %0.9950.995
Pz0.99943.6 %0.9940.994
Oz0.99934.1 %0.9630.962
Fp10.99991.6 %0.9890.989
T70.99875.1 %0.9430.946
T100.982419.2 %0.3760.378
Iz0.989817.4 %0.7530.772
Inside the cap the two agree to r ≥ 0.998; at its edge (T10, Iz) to r 0.98 to 0.99, where a rebuilt value is an extrapolation and the two place the electrodes slightly differently. Both match the recorded channel equally well. T10 is the channel the app suggests on this file, so neither rebuilds what it recorded.

Bad stretches before ICA

A synthetic recording with a movement (3 s on 20 channels), a pulled cable (1 s on 12 channels), a blink every 5 s and a step of the reference in every channel: at every sensitivity each second of the movement and the cable is marked and nothing else, not the blinks and not the step. Reading the recording in pieces of 7.3 s or 60 s gives the same result, and a stretch keeps its own times on both sides of an EDF+D gap.

The 12 PhysioNet files, with the suggested bad channels left out, against the same rule written again in Python on the same channels:

Bad stretches found
FileStandard, the appWritten againStrict, the app
S001R01nonesame38 to 39 s, 40 to 41 s
S001R02 to R04nonesamenone
S002R018 to 9, 20 to 21, 52 to 54, 58 to 59 ssameand 36 to 37 s
S002R02nonesamenone
S002R03116 to 120, 121 to 122 ssameand 99 to 100, 104 to 105, 108 to 109 s
S002R0445 to 46, 51 to 52, 58 to 59, 69 to 70, 77 to 78, 83 to 84, 100 to 102, 117 to 118 ssameand 112 to 113 s
S003R01 to R04nonesamenone
The app and the rule written again agree at every sensitivity of every file: 36 of 36. Of the 31 windows marked at Strict, none is a blink alone.

Why the rule changed before release: a first version (more than 10 % of the channels over z 4, against the average reference) marked 54 windows on the same files, 8 of them blinks alone, because the average reference spread a large blink a little into every channel. With the median reference and a quarter of the channels, no window of S001 or S003 is marked at Standard.

ICA on known sources and the PhysioNet files

Six independent sources (two super-Gaussian, four sub-Gaussian) mixed into 6 channels: each source is found again with a correlation over 0.95, the Amari index is under 0.05 and the fit converges. The same data and seed give the same result. Removing the component of the sine leaves under 1 % of its power and every other source with a correlation over 0.98. Each rule for suggesting a component labels the synthetic component it is written for.

On PhysioNet S001R01, with F8, T8 and T10 left out, the app fits 22 components and its largest is an Eye component with 35 % of the signal. On S002R01 it fits 21 components and settles after 219 passes; an Eye component holds 40 %, and four components are Muscle. The next section compares these decompositions with MNE-Python and EEGLAB.

ICA against MNE-Python, EEGLAB and ICLabel

The 12 PhysioNet files, with the Standard bad channels and stretches left out. A script made the app’s fit data again from each EDF file, and MNE-Python 1.13.2 (extended Infomax, two seeds) and EEGLAB 2023.0 (runica, extended) fitted the app’s number of components on exactly those data. Maps were matched one to one by their absolute correlation over the channels.

All 315 components of the 12 files
Maps matchedMedian correlation10th percentileOver 0.9Largest 10 of each file: median
The app with EEGLAB0.99960.994799.7 %0.9999
The app with MNE-Python0.9610.83278 %0.988
MNE-Python with itself (two seeds)0.9570.72271 %0.992
MNE-Python with EEGLAB0.9620.83378 %0.987
The app’s decomposition is runica’s: 296 of 315 maps agree to over 0.99, and only one is under 0.9 (0.79, a component with 0.9 % of the signal). MNE-Python’s larger learning steps leave each of its fits at a different point among the small components: the app is as close to MNE-Python as MNE-Python is to itself.

Convergence: the app settled in 5 of the 12 files and stopped at 1,000 passes in the other 7; runica settled in 5, 4 of them the same files with similar counts. The app stops when the weights change by less than 4e-7 over a pass, which is runica’s 1e-7 at the app’s scale of the data, so the two stop at the same point.

Share of the 0.5 to 4 Hz power at Fp1 taken out with the eye components
FileThe app’s Eye componentsThe appEEGLABMNE-Python
S001R01IC00, IC0391.7 %91.7 %91.7 %
S001R02IC04, IC0572.0 %71.8 %71.9 %
S001R03IC00, IC0390.8 %90.8 %90.8 %
S001R04IC00, IC0486.3 %86.3 %86.1 %
S002R01IC0097.7 %97.7 %97.8 %
S002R03IC00, IC0196.3 %96.3 %96.1 %
S002R04IC00, IC0295.5 %95.5 %95.6 %
S003R01IC00, IC0194.5 %94.5 %93.2 %
S003R03IC00, IC0397.2 %97.3 %97.3 %
S003R04IC00, IC03, IC0593.7 %93.6 %93.7 %
The components matched to the app’s were taken out of EEGLAB’s and MNE-Python’s decompositions. The three agree within 1.3 points at Fp1 and Fp2 in every file. S002R02 and S003R02 have no Eye component.

Labels against ICLabel 1.4 (EEGLAB 2023.0), which labelled the app’s own components. The app’s labels are rules of thumb, and you decide what is removed.

The app’s label against ICLabel’s most likely class
App labelBrainMuscleEyeLine NoiseChannel NoiseOther
Eye (20)3017000
Muscle (37)7220008
Line noise (2)000200
One channel (10)300043
Brain (246)11523121113
ICLabel calls no component Heart: these files have no ECG channel, and the app labels Heart only from one. Suggested for removal (any label but Brain) against ICLabel’s artifact classes: the same answer for 87 % of the 315 components (Cohen’s kappa 0.60), 45 of 63 of ICLabel’s artifact components suggested, 228 of 252 of its brain components kept. ICLabel’s Other class (124 components, most of them small) has no counterpart in the app; counted as not brain, the agreement falls to 50 %.

Where the labels differ: 3 of ICLabel’s Eye components lie on the forehead but have less than half of their power below 4 Hz; 7 components the app calls Muscle lie over the motor strip or the back of the head, most likely beta rhythms of the movement task, which a spectrum alone does not tell from muscle; ICLabel’s line-noise components mostly hold under 2 % of the signal and have no clear 50 or 60 Hz peak. These files are sampled at 160 Hz, so ICLabel judges each component on its spectrum up to 80 Hz only.

A first run on 29 November 2026 led to two changes before release: the stop at 4e-7 instead of 1e-7, and two label rules (a look to the side; a muscle limit of 45 % of the power above 20 Hz instead of 35 %). Its maps matched runica’s to the same median, and its labels gave ICLabel’s answer for 81 % of the components.

Topography: the Electrode Map’s colours and Scalp Topography

PhysioNet S001R01 (eyes open) and S001R02 (eyes closed), the first 60 s of all 64 channels, against MNE-Python 1.13.2 and SciPy 1.17.1.

  • The spectra and band powers at the electrodes: Welch spectra against scipy.signal.welch with the same settings, the largest relative difference over every bin of the 128 spectra 1.8 × 10⁻¹⁴; the five band powers to 1.1 × 10⁻¹⁵.
  • The fill between the electrodes: each map’s 120 by 120 grid against MNE-Python’s spherical splines (stiffness 4, 50 Legendre terms, as the app’s), solved exactly: r = 1.000000000 in all ten maps, the largest difference 2.0 × 10⁻⁵ of the map’s range.
  • The picture against mne.viz.plot_topomap, which interpolates its own way: inside the electrodes r 0.975 to 0.999, with a median difference of 0.3 to 0.9 % of the map’s range; the largest differences lie next to single electrodes whose values stand far from their neighbours’, at the edge of the cap.
Ten maps
FileBandApp with MNE-Python’s exact splinesApp with plot_topomap inside the electrodes: r, median difference
S001R01Delta1.0000000000.996, 0.3 %
S001R01Theta1.0000000000.997, 0.4 %
S001R01Alpha1.0000000000.999, 0.4 %
S001R01Beta1.0000000000.986, 0.9 %
S001R01Gamma1.0000000000.978, 0.8 %
S001R02Delta1.0000000000.994, 0.5 %
S001R02Theta1.0000000000.999, 0.5 %
S001R02Alpha1.0000000000.998, 0.3 %
S001R02Beta1.0000000000.994, 0.5 %
S001R02Gamma1.0000000000.975, 0.8 %
MNE-Python’s interpolate_bads adds a small value to its matrix, which smooths the surface between the electrodes; the app draws the exact surface, which passes through each electrode’s own value. Channels marked bad are drawn as red dots and left out of the fill.

Eye and Heart from EOG and ECG channels

Two recordings that have EOG or ECG channels: EEGLAB’s sample recording (32 channels with EOG1 and EOG2, 128 Hz, 238 s) and PhysioNet EEGMAT (Zyma et al. 2019, ODC-By 1.0; 19 channels and an ECG channel at 500 Hz; two subjects, at rest and doing mental arithmetic). MNE-Python’s own extended Infomax and its find_bads_eog and find_bads_ecg ran on the same channels.

Components found
RecordingChannels fittedThe app’s Eye and HeartMNE-Python
EEGLAB sample30IC01 Eye by its map (71 % on the forehead); correlation with EOG 0.33The same component by its z-score of the EOG correlation
EEGMAT 0, rest15IC12 Eye; no Heart (largest ECG correlation 0.55)2 ECG components by phase, 1 by correlation
EEGMAT 0, arithmetic16IC03 EyeNo ECG component
EEGMAT 1, rest17IC14 Heart, ECG correlation 0.96The same component by all three ECG methods
EEGMAT 1, arithmetic18IC00 Eye, a look to the sideNo ECG component
The heartbeat is found where it has a component of its own. With so few channels, the two decompositions of subject 0 at rest differ more (their maps match to a median of 0.75), and the app suggests no Heart there. EEGLAB’s EOG1 and EOG2 are electrodes near the eyes, not a bipolar EOG, which is why the blink correlates with them at only 0.33.

A long recording: time, memory and cancelling

A synthetic BioSemi BDF of the size a research lab records: 2 hours of 128 channels at 2,048 Hz, 5.7 GB, with one noisy channel, one flat channel and a 3 s movement at 3,600 s. iPad 13-inch simulator, the app’s code built as for release, each step run as Preprocess Signal runs it and also cancelled part-way.

Each step on the whole recording
StepTimeMemory above the startStopped after Cancel within
Suggest Bad Channels163 s95 MiB0.19 s
Find Bad Stretches118 s105 MiB0.07 s
Run ICA, reading its fit samples89 s276 MiB, with three passes0.07 s
Found: the noisy and the flat channel at Standard, and the stretch from 3,600 to 3,603 s. ICA fits 97 components, the number the size of its fit allows, and says so. One pass of the fit takes 2.9 s on a Mac in the slowest case and 0.25 s once it settles: up to about 50 minutes for all 1,000 passes, less when the fit settles.

The first run of this test found three faults, fixed before release: memory that rose to several gigabytes while a whole recording was read, a slow order of reading in ICA’s kurtosis estimate (the decomposition is the same to the last bit), and Cancel that stopped ICA only between passes.

Line-noise notch of saved runs

Preprocess Signal can take out 50 or 60 Hz mains noise (off by default). The notch is SciPy’s iirnotch (Q 30), run forward and backward as scipy.signal.filtfilt, with the ends padded by the filter’s ringing length as MNE-Python finds it. Analyses, the cleaned tab, Export BDF+ and Research Handoff all take it; the Viewer’s display notch is a separate filter and is not covered here.

  • Coefficients at 50 and 60 Hz and six sample rates within 1 × 10⁻¹⁵ of SciPy’s; the ringing length equal to MNE-Python’s at all six.
  • A synthetic 10 s signal through the notch: equal to SciPy’s filtfilt within 1 × 10⁻⁹ µV.
  • A 10 Hz sine keeps its size and timing within 0.01 µV of 30 µV; a 50 Hz sine is left below 0.001 µV.
Real recordings, every sample against SciPy
RecordingChannelsRateNotchLargest difference from SciPyLine bin, middle 54 s1 to 45 Hz power
PhysioNet EEGMMIDB S001R0164160 Hz60 Hz9.1 × 10⁻¹³ µV−25.2 dB≤ 0.13 %
EEGLAB sample data32128 Hz60 Hz1.6 × 10⁻¹² µV−30.7 dB≤ 0.10 %
BioSemi test file Newtest17-2048162,048 Hz50 Hz5.0 × 10⁻¹¹ µV−46.7 dB≤ 0.001 %
PhysioNet EEGMAT Subject00_121500 Hz50 Hz1.1 × 10⁻¹² µV−5.7 dB≤ 0.024 %
The largest difference of any sample of the 133 channels is 1.5 × 10⁻¹² of its channel’s RMS: rounding alone. EEGMAT was notch-filtered before it was published, so there was little line noise left to take out. Like any filter run over a stretch of signal, the notch changes the first and last fraction of a second of a range.

Status and limits

Changes since the last full run

The spectra, re-referencing, statistics and Handoff comparisons ran on the app code of 22 September 2026. On that code, the app’s full unit and integration test suite passed on the same day: 265 of 265 tests.

The code has changed since then:

  • 11 November 2026: automatic bipolar pairs for scalp recordings follow the standard longitudinal (double-banana) chain. This changes which pairs are made, not the subtraction.
  • From 11 November 2026: the optional EDF copy in a Research Handoff replaces identifying channel labels and annotation text as well as header fields. The Handoff text files and the waveform figure also changed. The loader scripts and the signal contract did not change.
  • 19 November 2026: Power Spectral Analysis on Original Raw Data can read a window that exceeds its memory budget in chunks. Every Welch segment stays inside one chunk, and the chunked and one-pass paths share the per-segment arithmetic.
  • 22 November 2026: Time-Frequency Analysis, Band Power Timeline, Time-Domain Signal Metrics, Channel Group Band Power Comparison and Aperiodic / Spectral Slope Analysis gained the same chunked reading.
  • 22 November 2026: empty placeholder channels and channels without a voltage unit are left out of analyses instead of stopping them.
  • 24 November 2026 (the app and the Online EEG Reviewer): the file reader adds BDF, BDF+, EDF+D and BDF+D; see File formats. Continuous EDF and EDF+C read the same values as before.
  • 24 November 2026 (the app and the Online EEG Reviewer): CSV import, including Muse recordings saved by Mind Monitor; see CSV import.
  • 29 and 30 November 2026: the cleaning steps (suggested bad channels, interpolation, bad stretches, ICA, the line-noise notch of saved runs) and scalp maps, each compared on public recordings; see Cleaning.
  • 24 November 2026 (the app): Recording Overview, the eighth analysis module, a compressed spectral array of a whole recording; see Recording Overview. It reads Original Raw Data in chunks and was compared with NumPy and SciPy.
  • 24 November 2026 (the app and the Online EEG Reviewer): Export Segment saves part of a recording as a de-identified EDF+ or BDF+ file, at the original rate byte for byte or downsampled after an anti-aliasing low-pass; see Exporting a segment. It reads with the same reader and changes no analysis.

The app’s tests compare the chunked and one-pass results bin by bin, within a relative difference of 1 × 10⁻⁹. Those tests compare the app with itself. The SciPy and MATLAB comparisons on this page have not yet been repeated on the current code.

On 24 November 2026, the app’s unit tests passed on the code of that day, including the comparison with the committed SciPy fixtures. That code adds annotation editing, combined display filters and per-row display settings, none of which changes how analyses compute; the file formats, CSV import and Export Segment listed above; the Recording Overview module, checked separately above; and the Electrode Map, which computes nothing. This is the app against its stored references and against itself, not a new run of SciPy, MATLAB, MNE-Python or EEGLAB.

Unchanged since 22 September 2026: the paired-statistics engine, the re-referencing arithmetic, the Spectrogram computation, the Handoff loader scripts and signal contract, and the saved-run checksum code. The file reader changed on 24 November 2026 (see File formats); the unit tests and the NumPy comparison show continuous EDF and EDF+C read as before.

What is not validated

The table lists what is not validated, or is only partly checked.

Not validated or partly checked
AreaStatusDetails
Clinical useNot validatedNo diagnostic, clinical or outcome claim is made. The app is not a medical device.
ArtifactsNo ground truthNo check shows that a recording is clean or that a channel was rightly marked bad. The app’s suggestions were compared with other tools’ (see Cleaning), not with a ground truth.
Real recordingsPartly coveredFile reading, the cleaning steps and the notch were compared on public recordings (PhysioNet, EEGLAB, BioSemi). The spectra, re-referencing and statistics comparisons used synthetic signals.
Signal varietyLimitedThe PSD inputs are one off-grid tone, slow drift and uniform noise. They contain no 1/f background, line noise, clipping or artifacts.
PSD settings coveredPartialThe reference comparisons used 50% overlap only, sample rates from 64 to 257 Hz, and windows of up to 33,001 samples (128 s). Other overlaps, higher sample rates and longer windows were not compared.
Welch segment-length ruleNot independently checkedThe references reused the app’s segment length, overlap and FFT length.
Chunked analysis (from November 2026)App against itself onlyCompared with the app’s one-pass results, not yet with SciPy or MATLAB.
Viewer display filtersNo reference comparisonHigh-pass and low-pass are first-order filters and the notch is a single biquad (Q 30 by default). They can run together and the notch Q can be set from 5 to 100. Downsampling is a low-pass filter plus block averaging. They are for display only. A test confirms that analyses and exports read the native samples instead.
Preprocess detrend and high-passNo reference comparisonThe high-pass is the same first-order filter. Linear, polynomial (order 2 at most) and moving-median detrend have no reference check.
FFT option in Power Spectral AnalysisNo reference comparisonOnly a total-power check within 8%.
Recording OverviewPartialCompared with NumPy and SciPy on generated EDF, BDF and EDF+D files and one real recording (Recording Overview). Saved preprocessing runs and montages are covered by unit tests only.
SpectrogramNo reference comparisonOnly a peak-position check. Long ranges are sampled at no more than 400 time bins.
Aperiodic / Spectral Slope AnalysisNo reference comparisonOnly the sign of the slope is checked. It has not been compared with dedicated aperiodic fitting tools.
Time-Domain Signal MetricsKnown-answer check onlyExact values for one short signal.
CalipersNo reference comparisonNo comparison with another tool.
Automatic montagesNo reference comparisonThe double-banana pairing and the handling of placeholder and non-voltage channels are app rules.
Paired statisticsPartial7 small examples with exact enumeration. The random branch for more than 20 non-zero pairs has a reproducibility check only. p values are not adjusted for multiple comparisons.
Research HandoffPartialTest bundles held 4 samples per channel and no PSD results file. EEGLAB stores single precision, and FIF stores event times to the microsecond.
Viewer drawingChecked onceOn 22 September 2026, exported waveform images placed each sample at its recorded time within 0.33 logical pixels (limit 1.5). The Viewer has changed since.
DevicesSimulators onlyThe app ran in the iPhone and iPad simulators. No physical iPhone, iPad or Mac was measured for speed, memory or background behaviour.
File formatsPartly checkedChecked on generated files, 17 public test files and three real recordings against an independent NumPy decoder, MNE-Python and EDFlib. MNE-Python reads EDF+D without its gaps and EDFlib refuses EDF+D, so the gaps were checked against the NumPy decoder only. EDF+C and BDF+C need continuous record timing.
Infraslow contentNot checkedThe app always warns that infraslow power needs DC-coupled recordings. It does not test a recording for DC coupling.
Online EEG ReviewerNot coveredThe Online EEG Reviewer has its own spectrum code. These checks cover the app.
AutomationManual runsThe checks are run by hand. There is no continuous integration service.

How to reproduce the checks

The comparisons can be repeated with the scripts and synthetic files below. They are not posted here yet, because several result files still carry local folder paths that we are removing; write to support@eegtracelab.com and we will send them. To check a new app version, the app’s test suite must first write fresh inputs and outputs; the steps after that are the same.

Files used
FileContentsSize
PSDReferenceFixtures.jsonThe three committed SciPy spectra, with their signals, settings and band powers155 kB
generate_psd_reference_fixtures.py and validate_psd_reference_fixtures.shRegenerate the committed fixtures with SciPy. In check mode they compare and write nothing.14 kB and 1.6 kB
generate_matlab_psd_reference_fixtures.mMATLAB version of the first fixture, for the cross-check2.8 kB
actual-app-psd-fixtures.json.gzThe 8 synthetic inputs and the full app spectra from 22 September 2026934 kB (2.9 MB unpacked)
validate_actual_psd_scipy.pySciPy comparison of those spectra1.7 kB
validate_actual_psd_matlab.mMATLAB pwelch comparison of those spectra3.0 kB
actual-app-reference-transforms.jsonRe-referencing inputs and the app outputs7.7 kB
validate_actual_reference_transforms_matlab.mMATLAB re-referencing check5.4 kB
actual-app-statistics.jsonApp results for the 7 paired examples7.4 kB
validate_exact_statistics_matlab.mMATLAB exact p values and exact bootstrap quantiles3.1 kB
validate_handoff_roundtrip.py and validate_handoff_eeglab.mMNE-Python and EEGLAB loader checks with the 21 corruptions. They need app-made bundles.11.6 kB and 2.6 kB
actual-psd-scipy-results.json, exact-statistics-matlab-results.json and fixture-check.jsonResult files from 22 September 20262.9 kB, 4.4 kB and 1.2 kB
All of these files are synthetic and hold no recording data.
# Run from a folder that holds scripts/ and EEG TraceLabTests/Fixtures/

# 1. Regenerate the committed SciPy fixtures and compare (writes nothing)
PSD_REFERENCE_SKIP_XCODE=1 scripts/validate_psd_reference_fixtures.sh

# 2. Compare the archived app spectra with SciPy
gunzip -k actual-app-psd-fixtures.json.gz
python3 scripts/validation/validate_actual_psd_scipy.py actual-app-psd-fixtures.json scipy-results.json

# 3. Compare the same spectra with MATLAB pwelch
export EEG_PSD_FIXTURES="$PWD/actual-app-psd-fixtures.json"
export EEG_PSD_EVIDENCE="$PWD/matlab-results"
matlab -batch "run scripts/validation/validate_actual_psd_matlab.m"

# 4. Re-referencing in MATLAB (results also go to matlab-results)
export EEG_REFERENCE_FIXTURES="$PWD/actual-app-reference-transforms.json"
matlab -batch "run scripts/validation/validate_actual_reference_transforms_matlab.m"

# 5. Exact p values and exact bootstrap quantiles in MATLAB
matlab -batch "run scripts/validation/validate_exact_statistics_matlab.m"

Step 5 writes MATLAB’s reference values. Compare them with actual-app-statistics.json case by case. Step 1 needs Python 3 with NumPy and SciPy. Steps 3 to 5 need MATLAB with the Signal Processing Toolbox and the Statistics and Machine Learning Toolbox. The loader checks need MNE-Python, or EEGLAB on MATLAB.

On 23 November 2026 we repeated steps 1 and 2 with SciPy 1.17.1 and NumPy 2.4.4. Step 1 regenerated the three fixtures exactly, and in step 2 all 8 spectra passed, with a largest difference of 1.1 × 10⁻¹⁴ µV²/Hz. These repeat the comparisons of archived outputs. They do not test the current app code.

The limits in short

  • Nothing here is a clinical or diagnostic claim.
  • The spectra, re-referencing and statistics were compared on synthetic signals only; file reading, the cleaning steps and the notch also on public recordings.
  • There is no artifact ground truth. Agreement with a reference tool does not mean that a recording or a result is clean.
  • The spectra, re-referencing, statistics and Handoff comparisons ran on the app code of 22 September 2026. The analysis code has changed since, and those comparisons have not yet been repeated on it.
  • The PSD comparisons used 50% overlap, sample rates from 64 to 257 Hz and windows of up to 128 s. They reused the app’s segment length, overlap and FFT length.
  • Viewer display filters, Preprocess detrend and high-pass, the FFT option, Spectrogram, Time-Frequency Analysis, Band Power Timeline, Aperiodic / Spectral Slope Analysis, Time-Domain Signal Metrics, calipers and automatic montages have no reference comparison.
  • The paired statistics were compared on 7 small examples. p values are not adjusted for multiple comparisons, and independence of subjects is the user’s declaration.
  • EEGLAB stores data in single precision, and FIF stores event times to the microsecond.
  • The app ran in the iPhone and iPad simulators. No physical iPhone, iPad or Mac was measured.
  • The checks are run by hand. There is no continuous integration service.
  • The spectrum in the Online EEG Reviewer is separate code and is not covered.