Merge workspace, amplitude threshold splits, and curation workflow improvements - #1404
Merge workspace, amplitude threshold splits, and curation workflow improvements#1404rossant wants to merge 110 commits into
Conversation
|
ProbeView does not appear to update in this version. |
|
After performing a merge the resulting unit should appear in the MergeView workspace and be selected (i.e. become the blue unit). This will permit evaluation for further merges or quality. |
|
Got a bunch of warnings when first opened and interacted with the GUI (apologies, I failed to save these). I then saved, closed, and re-launched and it was not able to initialize at all: |
It does update on my computer. Perhaps try to remove this view and add it again? |
|
@goatsofnaxos Thanks for the traceback and the follow-up Merge-mode report. I reproduced two separate problems, and both fixes are now available. The restart failure ( I also updated this PR in 4ba56d5d to fix the manual Merge-mode continuation and the
To retest both fixes, activate the same environment used to run phy and install the updated branches: pip install --upgrade "git+https://github.com/cortex-lab/phylib.git@master"
pip install --upgrade "git+https://github.com/cortex-lab/phy.git@feature/merge-view-workflow"Then restart phy and reopen the dataset. Please let me know if either the loading error or the Merge-mode workflow problem persists. |
The errors are gone but still get warnings every time I select the next unit, see attached log. |
I think from a UX perspective it would be most intuitive if the newly created unit post-merge become exclusively selected in the ClusterView. In other words we move the focus to ClusterView away from MergePropositionsView, so that we can focus on assessing the quality of the merged unit, and consider whether more units need to be merged into it. |
|
@goatsofnaxos Thanks — I traced the Probe View issue and the repeated waveform warnings to the same template-less dataset path. This dataset has a stored spike-waveform subset but no usable
I also implemented the requested manual-merge behavior:
Merge propositions retain their automatic advancement behavior. Validation completed with 472 core/GUI tests and 153 application tests passing, plus lint, formatting, and documentation checks. To retest: pip install --upgrade "git+https://github.com/cortex-lab/phylib.git@agent/fix-template-less-curation-reload"
pip install --upgrade "git+https://github.com/cortex-lab/phy.git@feature/merge-view-workflow"Please let me know whether the warnings, channel-zero Probe View behavior, or post-merge workflow persist with these revisions. |

Summary
This PR introduces explicit merge workspaces, AIND/SpikeInterface merge-proposition review, amplitude-threshold splitting, and the selection/history model needed to make those curation operations reversible and internally consistent. It also includes related GUI, performance, shutdown, documentation, and installation improvements.
Manual Merge workflow
Vwith at least one Cluster View row selected to enter Merge mode.Control-right-click or drag-and-drop. Drag within Merge View to reorder staged units.Control+Space, and multi-selection remain available.Gto merge all staged and selected candidates. After a manual merge, Merge mode closes and the result becomes the sole Cluster View selection, ready for quality assignment or explicit entry into another merge.V, choose Cancel Merge Mode, or close Merge View to cancel and restore the exact entry workspace, including selections, sort/filter state, ordering, and scroll context.Control+Zafter a commit restores the exact pre-GMerge workspace; redo reapplies the merge.Merge Propositions workflow
Template GUI reads the standard AIND/SpikeInterface format-version 2
mergeslist from dataset-localcuration.json.P1,P2, …) from their originalcuration.jsonposition, including invalid entries. Filtering and review-state changes never renumber them; internal hash keys remain the durable identity. Hierarchical labels such asP12.1are reserved for future persisted propositions derived from sourceP12; this release does not synthesize derived rows.first, second, …, last (count). A suppliednew_unit_idappears as⇒ new_unit_id.Grecordsaccepted_modifiedwhen the committed IDs differ from the source proposition.Control-right-click a staged cluster to remove it during proposition review. Removing the reference promotes the next staged cluster while keeping the proposition active; the last staged cluster remains protected because Merge mode requires a reference.curation.jsonremains producer-owned and is never overwritten. Accepted/rejected decisions and the actual applied/result IDs are saved atomically to dataset-localcuration_review.json, coupled to the normal dirty/save lifecycle and guarded by a source-file hash.Merge Proposition shortcuts
Alt+DownAlt+UpAlt+BackspaceAlt+Shift+BackspaceGVControl+Z/Control+Shift+ZorControl+YBecause
Alt+Up/Alt+Downnow navigate propositions, Trace View scaling moves toControl+Alt+Up/Control+Alt+Down.Amplitude threshold splitting
Alt-right-drag in Amplitude View to preview a horizontal threshold.Kto split all eligible spikes strictly below the threshold. The preview is sampled for responsiveness, while the committed split evaluates every eligible spike.Control-right-click or View > Clear amplitude split threshold.Selection, wizard, and history behavior
Space/Shift+Spacereplaces the Similarity candidate and reuses the first candidate color; Control/Shift multi-selection preserves existing color slots.Backspaceclears Similarity candidates and their Normal-mode color reservations.Control+Spaceselects the first eligible Similarity rows in configurable batches; repeated use advances through later batches.Other user-visible changes
Control-right-click deselection with display-aligned matrix hit-testing. A diagonal cell removes that exact cluster; an off-diagonal cell removes the non-primary cluster when the pair contains the current Cluster View selection or staged Merge reference.2.2.0.dev0; installation documentation follows the uv-first workflow.How to test
Use a separate checkout and a copy of a dataset because curation writes into the dataset directory.
For the compact example dataset:
git clone https://github.com/kwikteam/phy-data.git cd phy-data/template ../../phy-merge-workflow/.venv/bin/phy template-gui params.pySuggested checks:
Vand dock close, commit, undo, and redo.curation.jsoncontaining severalmerges, including overlapping propositions and one withnew_unit_id. Exercise click-to-review, every proposition shortcut, edited acceptance, automatic advancement, cancellation, reject/reset, and undo/redo. In Correlogram View, also remove the staged reference and another staged candidate from diagonal and off-diagonal cells and verify the exact cluster is removed.curation_review.json; confirm the inputcuration.jsonis unchanged. Repeat after replacing the source file to exercise hash mismatch handling.Return to
masterClose phy first, then restore the default branch and environment:
cd phy-merge-workflow git switch master git pull --ff-only uv sync --devKeep any source changes before switching branches. Dataset curation output is separate from the source checkout; restore the dataset from backup if you want to discard saved curation.
Validation
make lintmake format-checkmake doc-checkmake test-full: 472 core/GUI tests and 153 application tests passed; aggregate coverage 97%.