Repository navigation
0.2.0
[0.2.0] - 2026-10-26
Fixed (data integrity)
-
Old SpikeInterface phy exports load. Their
amplitudes.npyis int16 and
theirchannel_positions.npyint64. Integer arrays read where floats are
expected are now widened instead of rejected. -
sorrel autochanges:- Geometry check. On recordings whose channel positions look like
indices (< 5 µm apart, e.g. tetrode sorts), it warns and tags every
unitreview:geometry. Bombcell's and UnitRefine's spatial metrics are
meaningless there. On two labelled tetrode recordings it called 58 of 65
human-kept units noise. - Reruns are reproducible. The random spike sample is seeded, and the
analyzer cache is keyed on the extension parameters. - No full recompute after a save. The cache key is now the spike-train
values rather than the file bytes. bc:*reason tags follow SpikeInterface's rules. Bounds are
inclusive and NaN metrics fail where Bombcell says they do. Previously
the tags could name a rule the unit had passed. Labels were unaffected.
- Geometry check. On recordings whose channel positions look like
-
Per-spike arrays stored as
(n, 1)columns, as written by Kilosort 2 and
SpikeInterface'sexport_to_phy, now load. They used to fail with
"expected 1-D array". -
Saving no longer corrupts the next session.
Ctrl-Son a phy /
Kilosort directory now reseals the journal against the freshly written
spike_clusters.npy, and the binary seals every journal against its
data on open, so a reopen loads the saved state once instead of
replaying every edit (and every split) a second time on top of it.
Journals sealed against other data fail closed with a message naming
--discard-journal. SortingAnalyzer, NWB andrez.matsessions keep
their journal as the source of truth and are never resealed. -
The journal file is
sorrel.journal(it was never SQLite); a legacy
sorrel.sqliteis still picked up with a warning. -
quality_metrics.csvaccepts tab- and semicolon-separated files;
cluster_KSLabel.tsvseeds labels when there is nocluster_group.tsv
(and is no longer mistaken for a numeric metric);--export-qcworks
for every backend; the QC JSON key isfiring_ratelike the TSV. -
spike_clusters.npyis saved inspike_times.npyrow order. It used to be
written in time order, which misaligned it withamplitudes.npy,
pc_features.npyand the other per-spike arrays whenever the source was
unsorted or had simultaneous spikes in different clusters.
Fixed (GPU)
- No more crashes on the OpenGL fallback. When wgpu picks a GL adapter
(old Intel iGPUs, NVIDIA without a Vulkan driver, VMs,WGPU_BACKEND=gl),
eframe gets no compute support; trace CMR and high-pass now stay on the
CPU there instead of panicking on pipeline creation. - Long trace windows no longer crash on any GPU. Windows longer than
about 2 s at 30 kHz exceeded the 65,535-workgroup and 128 MiB
storage-buffer limits; the kernels now check device limits and the trace
falls back to the CPU. - OpenGL on NVIDIA no longer loses the device. wgpu's indirect-call
validation builds a compute pipeline on every device, which NVIDIA's GL 3.3
EGL context cannot run. Sorrel issues no indirect calls, so it is off for
every Sorrel wgpu instance (WGPU_VALIDATION_INDIRECT_CALL=1restores it). - The Linux tarballs and the AppImage use the host's GPU drivers. They
used to ship a Nix-built binary (glibc 2.44,/nix/storeloader) that
either did not start on Ubuntu or Fedora or found no GPU. They are now
built with cargo-zigbuild against glibc 2.31 and load the host's
Vulkan/GL libraries, and with them its Mesa or NVIDIA driver. The
AppImage wraps that binary instead of a Nix closure. - The Windows release builds again.
aws-lc-sys(via libp2p-quic)
needs winpthreads'<sched.h>, which the MinGW compiler did not see.
Added (automatic curation)
-
sorrel auto: Kilosort output in, curated session out. An embedded
SpikeInterface (≥ 0.105) pipeline runs:- redundant-unit detection
- the
similarity_correlogramsandslaymerge presets - Bombcell and UnitRefine labels on the merged units
- with
--llm, a Claude verdict on the units the classifiers disagree on
or are unsure about, and on merges only one preset found
The structured numeric evidence and each verdict are kept in
evidence.json. Everything is applied as one undoable batch.
See Automatic curation. -
Cluster tags. Every automatic decision records its source (
src:*,
merged:*,bc:*,conf:*), and uncertain ones getreview:*.- Tags are journaled and undoable (
CurationCommand::Tag). - They are saved to
cluster_sorrel_tags.tsv(a phy column) and to a
tagscategory incuration.json. - The cluster table has a tags column and a review filter, and its
filter box matches tags. - A GUI edit clears the cluster's
review:*tags and addssrc:human.
- Tags are journaled and undoable (
-
sorrel apply --curation FILEimports a SpikeInterfacecuration.json
(labels, tags and merges) as one undoable batch. Importing the same
document again changes nothing. -
sorrel report --tag PREFIXrenders only matching clusters
(--tag review:gives the review queue). -
sorrel serveaddstagandevidence, andlist_clusterstakes a tag
filter.
Added (CLI and interchange)
- Python wheels on PyPI as
sorrel-ephys(pip install sorrel-ephys,
thenimport sorrel; PyPI'ssorrelis an unrelated project), also
attached to every GitHub release: onecp38-abi3wheel per
platform (manylinux_2_34 x86_64 / aarch64, win_amd64, macosx_11_0_arm64)
with thesorrelPython API and the GUI binary, assembled by
nix/wheel.nixfrom the release cross builds and uploaded by the release
workflow with PyPI trusted publishing.sorrel.launchalso finds
the bundled binary when the kernel's PATH lacks the environment's
scripts directory. - Windows packages on winget (
Caniko.Sorrel) and Chocolatey
(sorrel). The release workflow submits both from the release's
Windows zip on every stable tag. The repository now carries the
LICENSE-MITandLICENSE-APACHEtexts itsMIT OR Apache-2.0license
names. sorrel gpu-checklists every GPU adapter wgpu can see (vendor, backend,
driver) and checks CMR, high-pass and mean-snippet kernels against the CPU
on each, exiting non-zero on a mismatch. Headless GPU contexts (tests,
this command) honourWGPU_BACKEND,WGPU_ADAPTER_NAMEand
WGPU_POWER_PREF, like the GUI.clapcommand line with subcommands:qc,suggest [--json],
apply --rules FILE [--dry-run] [--save](QC-threshold auto-labels as
one undoable batch),report(self-contained HTML with per-cluster
metrics, template, ISI and ACG as inline SVG),serve(JSON-RPC 2.0
over stdio in MCP shape: metrics, suggestions, SVG plots, journaled
relabel / merge / split / undo / save),diff A.tsv B.tsv(confusion
table, Cohen's kappa, disagreements),journal dump|replay,
clear-cache.sorrel <DIR> [flags]still opens the GUI.- Full phy export (Cargo feature
phy-export, on by default):
sorrel export-phy <DIR> --out OUT [--copy-raw], theexport_phy
serve tool, an Export phy button andSession.export_phy(out)in
sorrel-pyall write a complete phy template-gui directory from any
backend. A phy source is copied with its curation applied. SortingAnalyzer,
NWB andrez.matsessions get mean templates computed from the raw trace.
params.pypoints at the raw file;--copy-raw(or an NWB source, whose
trace lives in memory) streams it intorecording.dat. - Every save also writes SpikeInterface's
curation.json
(format_version2) next to the phy files; labels (and, for
SortingAnalyzer folders, pending merges and splits) round-trip through
spikeinterface.curation.apply_curation. The file is read back on open
to seed labels. SortingAnalyzer unit ids are preserved. sorrel-py: in-processsorrel.Session(open, qc, suggest, labels,
set_label, merge, split, undo, redo, save, curation) sharing the GUI's
journal;open_analyzerkeeps its directory by default so the
curation survives, andread_curationloads it for SpikeInterface.- Library:
Session::version()(monotonic cache key),
Session::reseal,applied_commands,primary_template;
Journal::replay_at,n_records;sorrel_data::openand
sorrel_io::detectshared by the binary and the bindings;
DataProvider::unit_id.
Added (library, for the science views)
sorrel_compute::psth(peri-event histogram plus per-event relative
spike times) andsorrel_io::Events(events.csvtime,labelin
seconds, orevents.npy), the data side of an event-aligned view.sorrel_data::spike_depths: per-spike depth from PC-weighted centre of
mass with a template-peak fallback, the data side of a real drift map.sorrel_compute::subtract_channel_median_grouped: common-median
referencing within each shank, threaded through sorrel-render as
build_trace_vertices_{cfg,gpu}_shankedand a public
apply_preproc_cpu.
Changed (performance)
ClusterIndex::from_providermerges the per-cluster spike buckets with a
heap instead of an argmin scan: 1 M spikes at 1000 clusters 1.07 s →
75 ms, at 100 clusters 116 ms → 23 ms (bench
seed_amplitudes_cache,SORREL_BENCH_CLUSTERS)..npyfiles are memory-mapped and, when the on-disk type already
matches, copied with onememcpyinstead of decoded element by element;
peak memory per array drops from 2× to 1×.pc_features.npyand
templates.npyare shared (Arc) between the provider and the cluster
index instead of copied.- mtscomp
.cbin+.chrecordings (the IBL archive format) open
directly: pointparams.py:dat_path(or--dat) at the.cbinand
windows are inflated on demand with a small chunk cache.
Added (UI)
- Export phy button next to Export QC: writes the curated session as a
phy directory beside the dataset (<dataset>_phy) on a worker thread. - Dockable layout: every view is an
egui_tilestile that can be dragged,
split, closed and reopened (Viewmenu,+per tab bar, "Reset layout").
The layout, table sort/filter, trace settings and last selection persist
per dataset in<dataset>/.sorrel/ui.json. - Merge the selection with
Ctrl/Cmd-Gor the Merge N button; multi-
cluster relabels are journaled as one batch so one undo reverts them. - Keyboard help overlay (
?/F1), Undo/Redo buttons that name the
command, status toasts for every curation step, dismissable errors,
window title with dataset name and dirty marker, and a modal confirm
dialog (Enter / Esc) including an unsaved-changes guard on quit. - Trace pane: channel labels, time axis, spike ticks for the selection on
each cluster's peak channel, drag/wheel pan and Ctrl-wheel zoom. - Raster highlights the selected rows and outlines the trace window;
Similar rows are clickable; plots carry axis ticks; probe rings always
follow the selection. - Loading screen while a recording is seeded on a worker thread; Suggest
ranking and quality metrics run in the background with spinners. - PSTH pane: event-aligned firing rate and per-trial raster from
events.csv/events.npy,--events FILEor an NWB trials table
(start_time, labelled bytrial_type); the Drift pane plots spike depth over time
when the backend can estimate it; the Trace pane offers per-shank CMR on
multi-shank probes.
Changed (UI)
- Waveforms and mean waveforms follow the Trace pane's HP/CMR toggles
(per shank when enabled) instead of always showing the raw recording;
each snippet is read with a filter-settling margin so the HP transient
never reaches it. J/Kand Shift-click follow the cluster table's visible order instead
of raw ids; whole rows are clickable and the table scrolls to the
keyboard selection.- Clusters are coloured by their position in the selection, consistently
across all views; plot colours follow the egui light/dark theme. Ctrl/Cmd+ letter no longer triggers the plain-letter label keys.- Correlograms, quality metrics and trace vertices are memoised per
selection/curation version instead of being recomputed every frame; the
raster vertex buffer is uploaded to the GPU once per change instead of
every frame.
Fixed (UI)
- Trace view shows spikes. Gain followed the dtype's full scale (32768
for int16), so spikes of a few hundred counts drew as flat lines. The
window's largest excursion now spans one channel row. - Views get more room. The cluster panel no longer opens at ~40% of a
1280 px window: table columns size to their content and the filter strip
wraps. Only the active tab shows its close button, so most tab titles fit
without the overflow arrows. - Captions that were clipped now fit or wrap: Quality (its wide table
scrolls sideways), Features axis pickers, CCG and Waveforms. - Contrast. Weak text in dark mode, warnings in light mode and errors in
both now meet WCAG AA. A unit test pins the colours. - Accessibility. Screen readers are supported (eframe
accesskit). Pane
tabs and the cluster filter now have accessible names. - The load-error screen names the dataset.
Added (testing)
crates/sorrel-ui/tests/ui_states.rsdrives the real app headless with
egui_kittest. It renders 26 states (startup, selection, help, quit
confirmation, load error, a 40-unit dataset across eight panes; dark and
light) through wgpu and compares them with committed snapshots. The dev
shell pins Mesa's lavapipe (SORREL_LAVAPIPE_ICD), so GPU-less CI runners
render the same pixels as a workstation. Accept intended changes with
UPDATE_SNAPSHOTS=1 cargo test -p sorrel-ui --test ui_states.