Data

Demo data with known answers

Every window can open synthetic recordings made by the toolbox itself. They are generated from explicit formulas with fixed random seeds, so they are always the same, and each file stores the values that were simulated.

How to use it

Everything shown on this site, every plot and number, comes from these synthetic recordings. They are not measurements from animals.

Files

FileOpen it inWhat it contains
demo_ldf_export.matLDF ExtractLabChart-style export, 300 s at 1000 Hz: stimulus on channel 6 (5 s pulses every 30 s from 30 s), LDF on channel 8 (~120 PU) with a +30 PU response peaking ~4 s after each onset
demo_ldf_cropped.matLDF ProcessThe same recording cropped to 20–280 s (stim, LDF, t, Fs)
demo_ldf_trials.matLDF Average, Signal Characterization8 trials from −5 to 20 s at 10 Hz (segmentedLDF, segmentedTime)
demo_lsci.matLaser SpeckleRaw laser speckle images, 80 × 64 px (width × height), 900 frames at 10 Hz, exposure 5 ms, dark level 100: cortex K = 0.22, a vessel K = 0.07, a static corner K = 0.70; four stimuli (10, 30, 50, 70 s) raise the flow of an activated disk by 25% (three ROIs included)
demo_ldf_faults.matLDF ProcessThe cropped LDF with faults for the Checks tab: the baseline drifts from 120 to 160 PU, a 0.3 s jump of +400 PU at 72 s (in trial 3) and 1 s at 0 PU at 31 s (probe lifted)
demo_lsci_faults.matLaser SpeckleThe speckle demo with faults: two speckles per pixel (lower K), the field moves 4 px to the right at 45 s, the light falls by 20%, exposure 25 ms, and a fourth ROI on the static corner (Thinned skull, K = 0.49)
demo_perfusion_faults.matLaser SpecklePerfusion images as an imager exports them (PU, one image per second, 90 s): cortex 1000 PU, the vessel clipped at 3000 PU, the activated disk +25% after each stimulus
demo_tank/Ephys Extract30 s TDT-like block: 8 raw channels at 24414 Hz and a whisker stimulus (20 ms pulses every 2 s from 1 s)
demo_lfp.matLFP Analysis, Signal Characterization8-channel LFP at 1017 Hz, 100 µm spacing (saved as lfp_spacing_um): ERP with N1 at 15 ms and P2 at 40 ms, largest at channel 4
demo_lfp_faults.matLFP AnalysisThe LFP demo with faults for the Checks tab: a stimulus artefact on every contact (+800 µV, decaying over about 10 ms, into the N1 window), the response centred on the deepest contact (CSD sink at the edge) and no electrode spacing in the file
demo_mua.matMUA AnalysisChannels 3–5 at 24414 Hz with three units that fire more for 50 ms after each stimulus
demo_mua_faults.matMUA AnalysisThe MUA demo with one fault per channel for the Checks tab: channel 3 noise raised to 40 µV, channel 4 a unit that fires doublets 0.8–0.95 ms apart, channel 5 a unit shrinking to half its size over the 30 s
demo_imaging.matROI Analysis96 × 96 × 150 frames at 10 Hz: a pulsing vessel, a moving red blood cell and a cell with calcium transients (roiMask included)
demo_imaging_faults.matROI AnalysisA calcium imaging movie with faults for the Checks tab, as a 12-bit camera saves it (0–4095), 96 × 96 × 150 frames at 10 Hz: three cells 10 px across (ROIs Cell 1–3 included), the field slides 14 px sideways over the 15 s (more than a cell), everything fades to about 65% (bleaching) and the bright Cell 2 goes above 4095 during its transients (clipped)
demo_lfp_oscillations.matLFP Analysis (step 6)demo_lfp.mat plus 6 Hz theta (40 µV, all channels) and a phase-locked 40 Hz burst (10 µV, 50–250 ms after each stimulus, channels 3–5)
demo_imaging_advanced.matROI AnalysisJittered stack (±3 px), three cells with distinct event times, a pulsing vessel and a red blood cell crossing the diameter line
demo_histology.matHistology / cultureTwo images of one culture (day 1, day 3), nuclei + marker channels, 400 × 400 px at 1 µm: 60 nuclei, 24 then 39 marker-positive, debris and a fibre, day 3 shifted on the stage
eeg/EEG AnalysisAn oddball study: 8 participants, 32 channels at 250 Hz, trials from −0.2 to 0.8 s already cleaned (EEGLAB, FieldTrip and plain .mat): Standard, Target and Novel trials, P300 at Pz Target 10 > Novel 6 > Standard 2 µV, N1 −5 µV at Cz, occipital alpha halved after Target; plus a continuous rodent recording with 30 light flashes, 3 raw BrainVision recordings of the oddball (eeg/raw: drift, 50 Hz noise, a noisy T7 and blinks in 8 trials each) and the faults participant (eeg/faults)
demo_eeg_faults.matEEG AnalysisOne oddball participant (an EEGLAB dataset, trials) with faults for the Checks tab: blinks in most Target trials (a 100 µV rejection leaves few Target trials and removes far more Target than Standard trials), 8 of 32 channels noisy or flat, and Pz interpolated in EEGLAB
groups/Signal Characterization (Groups & statistics)24 LDF trial files: the same 8 animals in Control, Stimulated and Drug (true peaks 18, 30 and 24 PU)
groups_faults/Signal Characterization (Groups & statistics)A study with faults for the Checks tab: 18 LDF trial files, the same 6 animals in Control, Stimulated and Drug; animal 6 responds three times as much to Stimulated (+40 instead of about +12 PU), and Drug raises every animal by the same 5–7 PU (sphericity violated)
formats/Ephys ExtractThe first 6 s of demo channels 3–6 as an Intan .rhd, an Open Ephys binary folder and an NWB file; core/demo/demoFormats.m also writes them as SpikeGLX, Blackrock, Neuralynx, Intan .rhs and Open Ephys legacy files

LDF recording (DemoData.ldfExport)

An 8-channel LabChart-style export, 300 s at 1000 Hz. Channel 6 is the stimulus: 5 V pulses of 5 s every 30 s from t = 30 s (9 pulses). Channel 8 is the LDF signal:

LDF(t) = 120 + 5·sin(2πt/400) + 3·sin(2π·0.13·t) + 1.5·sin(2π·6·t) + noise(SD 2)
         + Σ_onsets 30·g((t − onset)/4),   g(x) = x³·e^(3(1−x)) for x > 0, else 0

That is a ~120 PU baseline, a slow drift (period 400 s), vasomotion at 0.13 Hz, a 6 Hz cardiac ripple and white noise, plus a response of +30 PU peaking 4 s after every onset. The response shape is a gamma-variate function, a common model of slow haemodynamic responses[12].

Cropped file
20–280 s of the same recording (stim, LDF, t, Fs); onsets at 10, 40, … 250 s.
Trials file
The 8 onsets whose −5 to +20 s window fits, block-averaged to 10 Hz (segmentedLDF, segmentedTime, Fs).
Ground truth
onsets, stimulus duration 5 s, response peak delay 4 s, amplitude 30 PU, baseline 120 PU.
Other formats
core/demo/demoLDFFormats.m writes the same recording at 100 Hz (every 10th sample) as the other files Extract LDF reads: a LabChart text export (channels Stimulus, Blood pressure and LDF, a comment at every onset), a PeriSoft-style table (semicolons and decimal commas), a table without a time column (the rate, 100 Hz, must be given), a Spike2 MATLAB export (an LDF waveform channel and a Stim event channel) and an EDF+ file (LDF and Stimulus, a Stim annotation at every onset). Each opens with the same answer.

Laser speckle (core/demo/demoLSCI.m)

Raw speckle images of a rodent cortex, 80 × 64 px (width × height), 10 frames per second for 90 s (900 frames), camera exposure T = 5 ms. Each pixel is an independent speckle: its intensity follows a gamma distribution with mean I0 and contrast K (SD / mean = K exactly), with the exposure model of Bandyopadhyay et al. and Boas & Dunn[34, 33]:

K² = β·(exp(−2x) − 1 + 2x) / (2x²),   x = T / τc,   β = 1
flow(t) = baseline · (1 + 0.25·g(u)),   g(u) = u³·e^(3(1−u)) for u > 0,   u = (t − onset) / 4 s
  • Parenchyma: τc = T/20 (K = 0.221). Vessel (vertical band at x = 14–25 px): τc = T/200 (K = 0.071). Static region (bone / tape, x ≥ 68 and y ≥ 52): K = 0.7, no flow.
  • Activated area: a disk at (x, y) = (52, 28), radius 12 px, whose flow (1/τc) rises by 25% after each stimulus, peaking 4 s after onset; the flow everywhere else does not change.
  • Stimuli: 5 s pulses (5 V, variable stim) at 10, 30, 50 and 70 s.
  • Illumination: Gaussian fall-off, mean intensity about 1300–2000 counts; a camera dark level of 100 counts is added; uint16 frames.
  • ROIs (roiMasks, roiNames): Activated area (a disk of radius 7 px inside the activated disk, so 7 × 7 contrast windows centred in it stay inside), Control cortex (a disk of radius 8 px at (40, 50)) and Vessel (x = 18–21, y = 8–56).
  • Ground truth (truth): frame rate, exposure, β, dark level, onsets, the baseline T/τc and K of every pixel, the activated mask, the response (25%, peak at 4 s), the true flow ratio in the activated area over time and the same seen through 1/K².

Expected results are on the laser speckle section.

Electrophysiology (DemoData.tdtTank, lfpFile, muaFile)

30 s, 8 channels 100 µm apart, whisker stimulus pulses of 20 ms every 2 s from 1 s (15 stimuli). The raw channels are at the TDT rate 24414.0625 Hz; the LFP and stimulus are at 1017.25 Hz (24× decimation).

LFP

ERP(x) = −120 µV·exp(−(x − 15 ms)²/(2·(5 ms)²)) + 60 µV·exp(−(x − 40 ms)²/(2·(12 ms)²))
LFP_c(t) = profile_c·Σ ERP(t − onset) + shared(t) + local_c(t) + white noise (1 µV)
profile_c = exp(−(depth_c − 300 µm)²/(2·(150 µm)²))   → largest on channel 4

The background shared(t) is the same on every channel (an AR(1) process with coefficient 0.98, scale 3 µV), so it cancels in the CSD; local_c(t) is small independent AR(1) noise (0.9, 0.3 µV). Ground truth: onsets, sink channel 4, N1 at 15 ms, P2 at 40 ms, spacing 100 µm. The LFP file also stores the spacing as lfp_spacing_um (100), which fills Spacing (µm) in LFP Analysis.

MUA

UnitHome channelWaveform (negative peak)Baseline rateRate 5–55 ms after each stimulus
14about −90 µV6 spikes/s80 spikes/s
24about −50 µV10 spikes/s40 spikes/s
35about −110 µV3 spikes/s120 spikes/s

Spike trains are Poisson with a 2 ms refractory period; each unit is seen on neighbouring channels with a gain of exp(−|distance|/0.8) (skipped below 0.05). Noise is white, 10 µV. The MUA file holds channels 3–5. Ground truth: every unit's spike times, rates and home channel.

Oscillation demo (core/demo/demoLFPOscillations.m)

The same LFP plus a 6 Hz theta rhythm (40 µV, identical on all channels, frequency wandering with SD 0.5 Hz, so not phase-locked to the stimuli) and a 40 Hz burst (10 µV, 50–250 ms after each stimulus with 25 ms raised-cosine ramps, channels 3–5, same phase at every stimulus).

Imaging stacks

Basic stack (DemoData.imagingStack)

96 × 96 px, 150 frames at 10 Hz. A dark vertical vessel at x = 60 whose diameter is 12 + 3·sin(2π·0.2·t) px (9–15 px, period 5 s); a bright red blood cell (Gaussian spot, sigma 2 px) moving down the upper part of the vessel at 2 px per frame (it never reaches the diameter line at y = 70); a cell at (24, 30), radius 6 px, with calcium transients of ΔF/F = 1 at 3, 7 and 11 s (rise 0.1 s, decay 0.8 s) added on top of the tissue background; sensor noise SD 0.02. roiMask marks the cell.

Advanced stack (core/demo/demoImagingAdvanced.m)

  • Every frame translated by a sub-pixel shift that follows a smooth random walk, zero mean, at most 3 px in each direction (the true shifts are stored).
  • Three cells: (22, 24) r = 6 px, events at 4.0, 8.5, 13.0 s; (26, 78) r = 5 px, events at 5.5, 10.5 s; (82, 30) r = 7 px, events at 7.0, 12.0 s (ΔF/F amplitudes 1.0, 0.8, 1.2).
  • The vessel at x = 60 (12 ± 3 px, period 5 s) and a red blood cell moving 3 px per frame down the whole image, crossing the diameter line (35, 64)–(85, 64) about every 3 s.

Faults stack (DemoData.imagingFaults, demo_imaging_faults.mat)

A calcium imaging movie with the faults of the ROI Analysis checks; see Recordings with faults.

EEG (core/demo/demoEEG.m)

  • Scalp: an oddball study of 8 participants, 32 channels at 250 Hz, trials from −200 to 800 ms, already cleaned; Standard (40), Target (15) and Novel (15) trials, 5 rejected per participant. P300 at 350 ms, largest at Pz: Target 10 > Novel 6 > Standard 2 µV; P1 +2 µV at 60 ms (Oz), N1 −5 µV at 100 ms (Cz), 10 Hz alpha over O1 / Oz / O2 in random phase; after Target the alpha amplitude halves from 350 to 650 ms (power −75%, −6 dB), a known answer for time–frequency that leaves the ERPs unchanged on average.
  • Rodent: a continuous 60 s recording from 4 skull screws at 1000 Hz with 30 light flashes; a visual evoked potential over V1 (−40 µV at 50 ms, +25 µV at 100 ms), 30% of that over M1.
  • Raw (eeg/raw, Try raw demo): 3 participants of the same oddball design as BrainVision Recorder files (float32, 500 Hz, about 100 s each), the same 32 channels recorded against FCz (the online reference, not in the data), markers S 1 / S 2 / S 3 = Standard (40) / Target (15) / Novel (15), 1.2–1.5 s apart from 2 s. The same P1 / N1 / P300 / alpha (and its decrease after Target) as the scalp case, plus electrode offsets (±400 µV) and linear drift (±1 µV/s), 50 Hz line noise of 5–15 µV per channel, a noisy T7 (150 µV white noise) and blinks (150 µV at Fp1 / Fp2, 50 ms SD) in 8 trials per participant and 6 more between trials. A 100 µV peak-to-peak rejection after a 0.1–30 Hz band-pass and the average reference (without T7) removes exactly the 8 blink trials. Ground truth: the blink trials and the N1 at Cz against FCz (about −2 µV) and against the average of the good channels (about −4 to −5 µV).
  • The scalp and rodent data are written as EEGLAB (numbers inside, or in a .fdt file), FieldTrip, BrainVision and plain .mat files; the rodent recording also as EDF+, BDF (with a Status channel), XDF and an EEG-BIDS dataset. The scalp positions lie on an idealised spherical head; the rodent screws are in mm from bregma in the EEGLAB, FieldTrip and BIDS files. Scalp maps use them: the P300 over Pz, the N1 over Cz and, on the skull, the visual evoked potential over V1. Expected results are on the EEG page.
  • Faults (eeg/faults/sub-01_faults.set, copied as demo_eeg_faults.mat): one participant with the faults the EEG checks look for; see Recordings with faults.

Groups (core/demo/demoGroups.m)

24 LDF trial files: the same 8 animals in three conditions (Control, Stimulated, Drug), 8 trials each (−5 to 20 s at 10 Hz), response peaking 4 s after onset on a 110–130 PU baseline.

amplitude(animal, condition) = trueMean(condition) + animal effect (SD 3 PU)
                              + animal × condition scatter (SD 2.5 PU)
trueMean = 18, 30, 24 PU (Control, Stimulated, Drug);  each trial adds jitter (SD 2 PU)

Population effects: Stimulated − Control = 12 PU, dz = 3.27 (paired), Cohen's d = 3.02 (unpaired), ANOVA η² = 0.60. The realised per-file amplitudes are stored as well.

Faults study (groups_faults/, demoGroups(folder, struct('Faults', true))): 18 files, the same 6 animals in the three conditions, with the faults of the statistics checks; see Recordings with faults.

Formats (core/demo/demoFormats.m)

The first 6 s of tank channels 3–6 (3 stimuli at 1, 3 and 5 s) written as an Intan RHD file (format 3.0, resampled to 20 kHz, stimulus on DIGITAL-IN-01 and as a 1 V pulse on ANALOG-IN-1), an Open Ephys binary folder (GUI 0.6 layout, 30 kHz, TTL line 1 and ADC1, first sample number 512000) and an NWB file (raw at 24414.0625 Hz as int16 × 0.195 µV, the whisker stimulus TimeSeries and a trials table). The writers are part of the toolbox (core/io); the tests also read files assembled byte by byte from the published format descriptions.

The same 6 s are also written as SpikeGLX (Neuropixels 1.0 AP, gain 500, 30 kHz, stimulus on sync bit 6), Blackrock (NSx 2.3 .ns6 at 30 kHz with the stimulus on the NEV digital input, bit 0), Neuralynx (CSC1–CSC4 at 32 kHz, TTL bit 0 in Events.nev), Intan .rhs (30 kHz, DIGITAL-IN-01) and Open Ephys legacy (CH1–CH4 .continuous at 30 kHz, TTL channel 1 events). Each reader of these systems was checked during development against python-neo on files from its synthetic writer (the writers that make these demo files).

Batch sets (core/demo/demoBatch.m)

PipelineFilesWhat differs between files (file k)
LDF4 cropped recordings, 200 s at 1000 Hz, 7 stimuliAmplitude 15 + 5k PU (20–35), peak delay 2.5 + 0.5k s (3–4.5), baseline 115 + 5k PU
LFP3 recordings, 8 channels 100 µm apart (saved as lfp_spacing_um), 20 s at 1000 Hz, 10 stimuliN1 at 9 + 3k ms (12, 15, 18) of −(80 + 20k) µV, sink on channel 2 + k (3, 4, 5)
MUA2 filesThe demo MUA recording and an exact copy at twice the gain
EEG3 raw BrainVision recordings, 32 channels at 500 Hz (the raw EEG demo)Participant k of the raw EEG demo (seed 20260926 + 200 + k): a noisy T7 and blinks in 8 trials in each; the participants differ slightly in amplitude and latency
Imaging3 stacks, 64 × 64 × 100 frames at 10 HzPeak ΔF/F 0.5k (0.5, 1.0, 1.5), transients at 3 and 6.5 s; vessel diameter 8 + 2k ± 2 px
Response features4 trial files, 8 trials eachAmplitude 15 + 5k PU, peak delay 2.5 + 0.5k s

Recordings with faults (quality checks)

Seven demo files and one folder contain known faults, so each blood-flow, electrophysiology, imaging and statistics check can be seen to fire (open them from the demo folder; expected Checks are on the LDF, laser speckle, LFP and MUA, EEG, imaging and statistics pages).

  • demo_ldf_faults.mat (DemoData.ldfFaults): the cropped LDF demo with the baseline rising linearly from 120 to 160 PU, a 0.3 s jump of +400 PU at 72 s (inside trial 3, onset 70 s) and 1 s at 0 PU at 31 s, between trials 1 and 2 (probe lifted).
  • demo_lsci_faults.mat (demoLSCI(struct('Faults', true))): the speckle demo with each pixel the mean of 2 independent speckles (contrast 1/√2 of the model: cortex K = 0.16), the whole field (vessel, activated area, static corner, illumination) shifted 4 px to the right from 45 s, the illumination falling linearly by 20%, an exposure of 25 ms written in the file, and a fourth ROI, Thinned skull, on the static corner (K = 0.49).
  • demo_perfusion_faults.mat (core/demo/demoPerfusion.m): perfusion images as an imager exports them, 80 × 64 px (width × height), one image per second for 90 s, kind 'perfusion', units PU: cortex 1000 PU, the vessel at 3400 PU clipped to 3000 PU (a typical export range), the activated disk +25% after each stimulus (10, 30, 50, 70 s), speckle-like noise (gamma, SD 10%).
  • demo_lfp_faults.mat (DemoData.lfpFaults): the LFP demo (30 s, 8 channels 100 µm apart, 15 stimuli at 1, 3, … 29 s, the same noise) with three faults: a stimulus artefact, the same on every contact, of +800 µV at each onset decaying with a 3 ms time constant (still about 150 µV at 5 ms, where the N1 window starts); the response centred on the deepest contact (8) instead of 4, so the CSD sink is at the edge of the probe; and no lfp_spacing_um in the file, so the CSD uses the default 100 µm.
  • demo_mua_faults.mat (DemoData.muaFaults): MUA like the demo (channels 3–5 at 24414 Hz, 30 s, a stimulus every 2 s from 1 s, the same spike shapes) with one fault per channel. Channel 3: noise of 40 µV instead of 10 over units of about 90 and 110 µV, so the spikes barely cross the threshold (low signal-to-noise). Channel 4: a unit of about 70 µV firing at random at 30 spikes/s without a refractory period, a quarter of its spikes followed 0.8–0.95 ms later by a second, smaller spike, next to a clean unit of about 90 µV (2 ms refractory period). Channel 5: the 110 µV unit shrinking steadily to half its size over the recording (amplitude drift).
  • demo_eeg_faults.mat and eeg/faults/sub-01_faults.set (core/demo/demoEEG.m; the .mat is a copy of the EEGLAB dataset): one participant of the oddball design (Standard 40, Target 15 and Novel 15 trials in random order, 250 Hz, −200 to 800 ms, 32 channels recorded against FCz, the same P1 / N1 / P300 / alpha as the scalp demo) with three faults. Blinks (150 µV at Fp1 / Fp2) in 9 Target, 2 Standard and 1 Novel trials: a 100 µV peak-to-peak rejection removes 60% of Target but 5% of Standard trials and leaves 6 Target trials. 8 of 32 channels bad: FC6, T7, T8, TP9 and TP10 noisy (40 µV white noise), F8, PO9 and PO10 flat (0.2 µV); Suggest flags all 8 and nothing else, and unless they are marked bad every trial exceeds 100 µV. Pz interpolated: its data are the mean of P3, P4, CP1 and CP2, and the EEGLAB history ends with pop_interp of Pz. The history also lists the 0.1–30 Hz band-pass, the cut into trials and the baseline removal (−200 to 0 ms).
  • demo_imaging_faults.mat (DemoData.imagingFaults): 96 × 96 px, 150 frames at 10 Hz, saved as a 12-bit camera saves them (uint16, 0–4095), with three cells 10 px across (soft-edged disks of radius 5 px; ROIs roiMasks / roiNames Cell 1–3 at the cells' mean position) on a textured background of about 600 counts, calcium transients of ΔF/F 0.8 (Cell 1 at 3 and 9 s, Cell 2 at 4 and 10 s, Cell 3 at 6 and 12 s) and noise of 20 counts. Motion: the whole field slides sideways from −7 to +7 px over the 15 s (14 px, more than a cell is wide). Bleaching: everything is multiplied by 0.65 + 0.35·exp(−t / 6 s), down to about 65%. Saturation: Cell 2 is 3400 counts above the background, so its transients go above 4095 and are clipped.
  • groups_faults/ (demoGroups(folder, struct('Faults', true)), seed 20260926, trial jitter SD 1 PU): 18 LDF trial files like the group demo, the same 6 animals in Control, Stimulated and Drug, with set peak amplitudes. Control 18, 16, 19, 17, 20, 18 PU; Stimulated = Control + 12, 11, 13, 12, 12 and 40 PU (animal 6 responds three times as much: the values are not normal); Drug = Control + 6, 7, 5, 6, 7, 6 PU (the same rise in every animal while Stimulated − Control varies: sphericity violated).

Random seeds

All generators use MATLAB's RandStream('mt19937ar') with fixed seeds: DemoData.Seed = 20260924 (+1 LDF, +2 electrophysiology and the LFP faults, +3 imaging, +31 the MUA faults, +41 the imaging faults, +101 theta wander), 20260925 for the groups (20260926 for the faults study), 20260965 for the advanced stack and 20260930 + offset for the batch sets, 20260930 for the laser speckle demo, 20261003 for the perfusion demo, and 20260926 + participant for the EEG (rodent: + 100; raw: + 200 + participant; faults: + 300). The global random stream is not touched.