Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

phy parity

Sorrel aims to do everything phy’s TemplateGUI does. The target is cortex-lab/phy master (v2.1, 2026). This page lists every phy view, action and shortcut against its Sorrel equivalent. Each row has one of these statuses:

  • done — available now. The test column names the check that covers it.
  • planned — not built yet.
  • excluded — deliberately left out; the row says why.

Views

phy viewSorrelStatusTest
FeatureViewFeatures: phy’s 4×4 grid (best channels 0/1 × PC A/B, time on the diagonal), 2500 grey background spikes, 2500 shown per clusterdonefeature_view::tests, ui_states::features_grid_lasso_split
FeatureView without pc_features.npyphy hides the view. Sorrel fits two temporal PCs on raw peak-channel snippets and projects the shown spikes, then every lassoed spike before a splitdoneui_states::features_computed_pcs, linalg::tests::top_eigenvectors_recover_known_basis
TemplateFeatureViewTmpl features: with two clusters selected, each spike projected on both clusters’ templates (template_features.npy / template_feature_ind.npy), grey background, Ctrl+click lasso and kdoneui_states::template_features_two_clusters
WaveformViewWaveformsplanned
AmplitudeViewAmplitudes: template, feature (the FeatureView’s Alt+clicked dimension) and raw types (a / Shift+a), grey background spikes on the peak channel, a per-cluster histogram, the polygon lasso, the v2.1 Alt+right-drag threshold split (orange preview), Alt+click to seek. The template-feature type comes with TemplateFeatureView.doneamplitude_view::tests, ui_states::amplitudes_threshold_split
CorrelogramViewCCGplanned
ISIViewISIplanned
FiringRateViewRate: phy’s bin count (default 200, :frn, header field) and the v2.1 time unit (s, min, h)done
TraceViewTrace; shortcuts in the trace table belowdoneapp::tests::alt_pgdn_centres_the_trace_on_the_selections_next_spike
TraceImageViewTrace image (tab beside Trace): the trace window as a channels × pixels image of the signed voltage, following the Trace window, HP/CMR and origindonetrace_image::tests, ui_states::spike_data_and_trace_image
ProbeViewProbedone
RasterViewRaster: click seeks the trace, Ctrl+click selects the row’s cluster, Shift+click adds or removes itdone
TemplateViewTemplates: every cluster’s template on its peak channel in table order, selection outlined; click selects, Ctrl/Shift+click addsdone
ClusterScatterViewScatter: one point per cluster; x / y / size from amp, depth, fr, n_spikes, ch (defaults amp × depth, size log fr) with log toggles; click selects, Shift+click adds, Ctrl+click lasso selects every cluster inside; :csx / :csy / :css. Shift+wheel cycles the colour scheme. Drag pans, the wheel zooms, double-click resets.doneui_states::cluster_scatter_dense, cluster_scatter::tests
Spike*ViewSpike data: every spike_<name>.npy (phylib spike attributes), 1-D against time or 2-D as x vs y, grey background, Ctrl+click lasso and kdonephy_parity::phy_spike_attributes_and_reorder, ui_states::spike_data_and_trace_image
ClusterViewCluster tableplanned
SimilarityViewSimilar; cluster similarity is phy’s max over both clusters’ templatesplannedphy_parity::phy_cluster_similarity_is_max_over_templates
HistogramViewPlugin base class; the built-in histograms are ISI and Rateexcluded: plugin API
IPythonViewScripting goes through sorrel-py and the sorrel mcp JSON-RPC API instead of an in-window consoleexcluded

FeatureView behaviour

phySorrelStatusTest
Features read by real channel through pc_feature_ind[spike_template]Session::pc_featuredonephy_parity::phy_feature_view_channels_and_lookup
A selected spike whose template lacks the channel is drawn at 0samedone
Channels: first cluster’s best, those shared by every selected cluster firstSession::best_channelsdonephy_parity::phy_feature_view_channels_and_lookup
c toggles automatic channel selectionc, or the fixed checkbox in the headerdone
Ctrl+click (left/right) on a Waveforms channel sets channel 0/1FeatureViewState::edit_channels(SetA/SetB), called from the Ctrl+click on a Waveforms channeldone
ISI violators brush, split what-if and merge ghosts (Sorrel extra): clicking the ISI refractory band brushes both spikes of every pair under 1 ms; a lasso / k-means brush on one selected cluster previews its split (preview_split: ISI dashed inside / dotted outside, Quality “if split” delta rows, Waveforms dashed / dotted means); a hovered merge candidate adds a grey dashed mean in Waveforms and a ghost row and column in CCG—doneisi_view::tests::violators_include_both_members_once, isi_view::tests::split_target_needs_a_part_brush_and_a_remainder, preview::tests::preview_split_matches_an_applied_split, ui_states::xtalk_isi_whatif, ui_states::xtalk_isi_tooltip
Polygon lasso: Ctrl+click adds points, Ctrl+right-click clears, k splitssame; Esc also clears. Sorrel extras: Ctrl+drag draws a freehand lasso (Ramer-Douglas-Peucker, at most 64 nodes), and on a closed lasso a node drags, a double-click on an edge inserts a node, a right-click on a node deletes it (min 3); hovering shows the node or a ghost “+”donelasso::tests, ui_states::features_lasso_freehand_and_edit
k-means auto-lasso (Sorrel extra): the k-means button (or :km [k|auto]) clusters the first selected cluster in its 4 PC columns (rayon, off the UI thread; k: auto picks 2–5 by silhouette), wraps the lasso around the smallest part in the cell that separates it best, highlights the exact members, and shows a chip per part; auto-run refits whenever the features change unless you drew your own lasso. A live “N spikes · M nodes · K splits” badge sits under every closed lasso.—donefeature_view::tests::kmeans_auto_lasso_wraps_the_small_blob, ui_states::features_lasso_drawing_and_kmeans, kmeans::tests::parallel_runs_are_identical_on_large_inputs
k-means collision evidence (Sorrel extra): every projection counts the other parts’ and selected clusters’ spikes inside the previewed part’s hull (green 0, amber ≤ 15%, red above); the part’s hull is dashed in the other projections. Evidence is shown on the real plots, not a replacement projection navigator.—donefeature_view::tests::cell_hits_count_other_parts_and_clusters_inside_each_hull, feature_view::tests::collision_colours_follow_the_15_percent_rule, ui_states::features_kmeans_collision
Full Phy-style Features matrix: all 16 projections for A/B in a fixed 4×4 arrangement, fitted to the available width and height at narrow, default, wide and maximized sizes. No navigator or single-cell layout. 3D remains an explicit inspection mode.—doneui_states::tetrode_feature_grid_is_complete_at_narrow_default_wide_and_maximized_sizes, ui_states::features_compact, ui_states::pane_maximized, ui_states::pane_popout
Channel set (Sorrel extra): Features works on a set of up to 8 channels (default the selection’s best four; feature_view::MAX_SET), edited by Shift+click in Waveforms or the toolbar chips; A/B are the set’s first two and follow the best-separating channel pair unless fixed with cFeatureViewState::edit_channelsdonefeature_view::tests::edit_channels_keeps_two_to_max_and_swaps_like_phy, feature_view::tests::separation_ranks_the_separating_pair_first
Probe channel picker (Sorrel extra): set rings, A/B badges and highlight rings on the probe; Shift+click toggles a site in the Features set, Ctrl+click / Ctrl+right-click set A / B—doneviews::probe_tests, ui_states::xtalk_probe_set
Merge / history ghosts (Sorrel extra): hovering a Similar or Suggest merge row writes a merge ghost and shows the preview_merge delta; hovering a History row writes a history ghost—donesimilarity_view::tests, ui_states::xtalk_features_ghost, ui_states::xtalk_history_ghost
Alternatives strip (Sorrel extra): the six best-separating pairs over the set’s dims as mini scatters; a click promotes one to A/B and focuses its grid cell, armed first when a lasso would be droppedfeature_view::alternativesdonefeature_view::tests::promotion_maps_every_pair_to_a_grid_cell, ui_states::features_alternatives
Features 3D (Sorrel extra): the 3D toggle shows the points in any three dimensions of the channel set (time and PC1/PC2 per channel) behind an orbit camera, every triple ranked by silhouette (clusters, else k-means parts, else variance; top 20 and “show all”), the focused 2D plot’s pair pinned by default (chip, third-axis list), the chosen triple’s channels highlighted in Waveforms; convex hulls per cluster (filled for Auto, wireframe for Sorrel-made), a dashed parent hull for split children, the lasso extruded as a prism and the k-means part’s hull. Inspection only.—donefeature_view3d::tests::every_triple_of_the_set_is_scored_best_first, feature_view3d::tests::pinning_keeps_the_triples_holding_the_pair_and_ranks_the_third_axis, feature_view3d::tests::the_chosen_triple_survives_a_rerank_and_falls_back_when_its_dims_vanish, feature_view3d::tests::triple_channels_dedupe_and_leave_out_time, feature_view3d::tests::prism_needs_both_lasso_dims_in_the_triple, convex_hull_3d tests, ui_states::features_3d, ui_states::features_3d_kmeans_prism, ui_states::features_3d_pinned, ui_states::features_3d_maximized, wgpu_scene3d GPU tests
Features 2D cross-talk (Sorrel extra): a closed lasso or previewed k-means part writes the spike brush (only when it changes; clearing the lasso clears the brush only if Features wrote it); brushed spikes drawn in ink in every cell and mini; the 6 px hover pick writes the shared hover and every cell rings the hovered spike; Alt+click on a spike seeks the Trace (Alt+click elsewhere still picks the amplitude feature); spikes in the Trace window ringed (≤ 200 per cluster); Shift+drag a time cell sets the time brush (band on the axis, outside spikes fade to 0.2 alpha); ⚙ “colour by cluster / time / depth” with a ramp legend; Similar merge ghost as grey points “cN (ghost)”—donefeature_view::tests::brush_is_written_only_when_its_key_changes, feature_view::tests::nearest_spike_picks_the_closest_within_reach, feature_view::tests::time_brush_fades_or_hides_spikes_outside, feature_view::tests::colour_ramp_runs_viridis_end_to_end, feature_view::tests::trace_window_is_a_range_of_local_indices, ui_states::xtalk_features_brush, ui_states::xtalk_hover_spike, ui_states::xtalk_amplitudes_ink
Features 3D cross-talk (Sorrel extra): brushed spikes in ink, the time brush fading or hiding spikes, hover ring and pointer pick (6 px), Similar ghost hull, History “before #n” hulls (Session::pre_edit_spikes), point colour by time or depth, and a depth space axis ranked with the PCs.—donefeature_view3d::tests::space_dims_join_the_triples_and_rank_by_separation, feature_view3d::tests::brushes_ink_fade_and_hide_spikes_in_the_scene, feature_view3d::tests::a_new_brush_or_time_range_changes_the_scene_key, feature_view3d::tests::the_nearest_candidate_within_reach_is_picked, session::tests::pre_edit_spikes_match_the_memberships_before_each_edit, ui_states::xtalk_3d_space, ui_states::xtalk_history_ghost
Time-axis cross-talk (Sorrel extra): the Amplitudes lasso or threshold, the Spike data lasso and the Tmpl features lasso are the app-wide spike brush (ink points in Amplitudes, Spike data, Tmpl features, Drift, ink ticks in Raster and Trace); hovering a spike in Amplitudes or Spike data rings it and draws its time as an accent line in Raster, Rate, Drift, Amplitudes and Trace; a plain click on a Trace tick picks that spike (sticky hover for Features); Shift+drag along Amplitudes, Rate, Drift or Raster sets the time range (band, outside points fade)—donewidgets::brush_tests, ui_states::xtalk_time_brush
Split loads every spike of the lassoed clusterssame, for computed PCs toodoneui_states::features_computed_pcs
Feature scaling (Ctrl+wheel), marker size (Alt+wheel), pan/zoom, resetsame; double-click resetsdone
Alt+click a subplot sets the AmplitudeView feature dimension (left = x, right = y)samedone
Custom grids (set_grid_dim)—excluded: plugin API

Every view

phySorrelStatusTest
toggle_auto_update (freeze a view)tab right-click → Freeze on this selection (🔒 in the title)done
screenshottab right-click → Save screenshot, a PNG in <dataset>/.sorrel/screenshots/ (phy: ~/.phy/screenshots)done
pan / zoom / resetdrag, wheel, double-click on Features, Amplitudes, Scatter, Tmpl features and Spike datadonepanzoom::tests
pan / zoom on Raster, Rate, TemplatesRaster: drag, wheel, double-click (time and rows). Rate: the same in time, re-binned over the visible span. Templates: the wheel scrolls, Ctrl+wheel or pinch zooms the boxes, double-click resetsdoneui_states::raster_and_rate_zoomed

Supervisor actions

phy actionKey (phy and Sorrel)StatusTest
mergegdoneintent::tests::phy_supervisor_keys
splitkdoneui_states::features_grid_lasso_split
label (custom label column, saved as cluster_<name>.tsv)l, :l name valuedonesave::tests::custom_labels_write_phy_tsvs_and_undo
move best / similar / all to good, mua, noise, unsortedAlt / Ctrl / Ctrl+Alt + g m n udoneintent::tests::phy_supervisor_keys
advance after a move (_after_move)—done
next / previous similarSpace / Shift+Spacedoneselection::tests::similar_part_steps_and_resets_like_phy_wizard
skip noise and MUA while stepping (v2.1, default on)always ondone
next / previous best, first / last↓ / ↑, Home / Enddone
select first similarCtrl+Space (first 15)done
unselect similarBackspacedone
reset wizardCtrl+Alt+Spacedone
undo / redo (sorrel keeps undone edits as branches; see the History pane)Ctrl+Z / Ctrl+Shift+Z, Ctrl+Ydonesession::tests::edit_after_undo_branches_and_checkout_crosses_branches
save (also writes cluster_info.tsv)Ctrl+Sdonesave::tests::custom_labels_write_phy_tsvs_and_undo
split_init (split by original template)Shift+Ctrl+Kdonephy_parity::phy_split_init_restores_one_cluster_per_template
toggle_spike_reorder (spike_reorder.npy on the Feature, Amplitude and Spike-data time axes)Ctrl+Rdonephy_parity::phy_spike_attributes_and_reorder
colour fields (none, cluster, group, depth, fr) for unselected clusters in Raster, Scatter and Templates:cf name, Shift+wheeldonetheme::tests::colour_schemes_match_phy_fields
colormaps:cmexcluded: one sequential map (viridis); diverging and rainbow on request
merge mode (v2.1): stage the selection, add similar candidates, G merges, V cancels and restores; labels blocked while active. Dragging rows between views and undo restoring the workspace are not built.vdoneapp::tests::merge_mode_stages_candidates_and_cancel_restores
merge propositions (v2.1, curation.json merges)the Proposals pane (Enter accepts, Delete rejects)in progress (sorrel-f6 lane)
cluster table filter / sort:f expr, :s coldone
help, quith (also ?, F1), Ctrl+Qdone

Snippets

phy snippetStatusTest
:g, :k, :c 1 2 3 (ranges 3-7)donesnippets::tests::parses_phy_snippets
:l name value (group moves the selection)donesnippets::tests::parses_phy_snippets
:tg time, :ts windowdonesnippets::tests::parses_phy_snippets
:csx, :csy, :css (ClusterScatter axes)donesnippets::tests::parses_phy_snippets
:f expr, :s coldone
:frn n, :cf fielddonesnippets::tests::parses_phy_snippets
:wn, :cb, :cw, :cr, :isi…Waveforms / CCG / ISI lane (sorrel-f6)
:frb seconds (bin size)donesnippets::tests::parses_phy_snippets
:frmin, :frmax (x range, seconds; no value resets)donesnippets::tests::parses_phy_snippets, prefs::tests::rate_x_range_clamps_and_falls_back_to_the_recording

Trace shortcuts

phySorrelStatus
Alt+← / Alt+→ previous / next windowsamedone
Alt+Home / Alt+Endsamedone
Alt++ / Alt+- narrow / widensamedone
Alt+PgDn / Alt+PgUp next / previous spike of the selection, Alt+T go tosame (Alt+T opens :tg)done
Alt+O origin, Alt+S every cluster’s spikes, Alt+L labels, Ctrl+Alt+↑/↓ gainsamedone
Ctrl+click a spike selects its clusternearest spike within 1 ms (phy also weighs the clicked channel)done

Command line

phySorrelStatus
phy template-gui params.pysorrel open <DATA_DIR> (Phy, SortingAnalyzer, NWB, MATLAB rez.mat)done
phy template-describe params.pysorrel describe <DATA_DIR>done
--clear-cachesorrel clear-cachedone
kwik-gui, trace-gui, alf-convert—excluded: not template-gui

Differences that stay

  • SortingAnalyzer PCs. SpikeInterface’s principal_components extension only holds the random_spikes subset (at most 500 spikes per unit; on one real 0.105 analyzer, 32 425 of 210 884 spikes). A lasso split on it would leave every other spike behind. Sorrel therefore computes its own PCs for SortingAnalyzer folders, which covers every spike.
  • Missing PCs. phy shows no FeatureView without pc_features.npy; Sorrel computes PCs instead.
  • Custom labels in curation.json. These are written as name=value tags, not as SpikeInterface label keys.
  • Plugins and the IPython console. Both are excluded. Scripting goes through sorrel-py and sorrel mcp.