Skip to content

Add waveform PCA and refine plotting and position processing - #58

Merged
annie2013 merged 4 commits into
mainfrom
feat/waveform-pca
Oct 30, 2026
Merged

annie2013 merged 4 commits into
mainfrom
feat/waveform-pca

Conversation

@annie2013

@annie2013 annie2013 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Cluster plots can now switch between channel amplitudes and the first four principal components of the combined four-channel waveform, with all six pairings available for picking, brushing and lasso cuts. PCA uses nalgebra to fit a configurable sample, then projects every spike; its basis is reused across cut edits.

  • Unify plot controls with neutral joined choices for fixed colours, density and drift, shared by waveform and cluster plots, plus an independent fixed-colour lock in the cluster toolbar. Q switches feature space, L switches brush/lasso, P cycles colours and Shift+P reverses.
  • Restore v1's tetrode-wide waveform density scale, including captures. Preserve the position path and speed-histogram canvases across cell, tetrode and cut changes; position or relevant settings changes still invalidate their caches.
  • Use regular position sampling for dwell, speed, jump filtering and spike alignment. Add LED-swap detection based on spot sizes and continuity, restore the raw unvisited-bin mask and match v1's directional display rotation. Retain v2's correct LED midpoint, position smoothing and spatial binning.
  • Organise Settings by position processing and plot type, with explicit values, units, Off/Auto states and Reset at the top. Use both LEDs when available by default; fix cluster points at 1 px and path spike markers at 3×3 px. Remove cell isolation and spike-count renumbering.
  • Put additive file/folder pickers and direct Clear files in the Waveform menu, simplify keyboard help, update the Settings/Headers icons, and clarify clipboard trial/cut selection.
  • Fix the stale window-close test locator. Run CI once per PR update, with main-branch builds/deployments and manual runs retained. The 1M browser stress case remains the default; 9M is explicitly opt-in.

Validation

  • Production build, ESLint and TypeScript checks pass.
  • 39 Rust tests and 25 unit tests pass, including PCA reference cases, Wasm bindings, LED swaps, nominal position timing and spatial masking.
  • Full CI run passes: 57 browser tests passed, with 3 optional cases skipped. Coverage includes all four directional orientations, zero speed-histogram redraws across tetrode/cell changes, cache invalidation, clipboard plots, window closing and the independent cluster palette lock.
  • Release Wasm is about 655 kB raw / 205 kB gzip.

Fit four combined-channel principal components with configurable sampling and reuse them for plotting and cluster edits. Unify rendering choices, joined toggles and keyboard shortcuts; add the Waveform file menu and clarify clipboard trial selections.
Reuse trial trajectories across tetrodes, match v1 waveform density scaling, clarify settings and keyboard controls, and remove unused isolation and spike-count renumbering. Use a default-on LED checkbox, fixed cluster/path markers, and plot-specific settings sections.
Use the tool title bar in the Space-close regression test, run push CI only on main to avoid duplicate PR builds, and allow cluster plots to retain fixed cell colours independently of the main colour mode.
@annie2013 annie2013 changed the title Add waveform PCA and simplify plot controls Add waveform PCA and refine plotting and position processing Oct 30, 2026
@annie2013
annie2013 merged commit 68f16e1 into main Oct 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant