Optimize the step-3 and step-4 result views - #414
Merged
Conversation
Trace plots stretch to the browser width instead of a fixed 750 px, across the preprocessing, artifact-window, artifact-removal and transient-peak views. The preprocessing and artifact-removal reviews now stack all five traces for a recording site — control, signal, signal+fit, z-score and dF-F — in one axis-linked layout under a single site selector, replacing the separate z-score/dF-F section that carried its own unsynced selector. The plot_zScore_dff parameter only gated whether that section rendered over data preprocessing always writes, so it is removed from the form, the provenance snapshot and docs. The preprocessing review no longer shades saved artifact windows, which implied a removal that has not happened yet. Shading remains on the Select Artifact Windows page, so build_control_signal_fit's spans argument is now optional. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pauladkisson
enabled auto-merge
August 5, 2026 17:54
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
pauladkisson
added a commit
that referenced
this pull request
Aug 6, 2026
The tonic pages predated PRs #410/#413/#414 and were the last ones still using the patterns those replaced. Define Tonic Epochs now mirrors Select Artifact Windows: one form row per window (label, numeric bounds nudgeable with the arrow keys, delete button) instead of a fixed three-row Tabulator, an "Add epoch" button, a column header, and an empty-state hint. Both pages' plots stack z-score and dF/F on a shared, linked time axis, stretch to the tab width, and render by per-pixel sample density, so a full-length recording no longer ships every sample to the browser. Editing a bound repaints the shaded spans through a pipe rather than re-aggregating the traces. The signal toggle is gone, since both traces are now shown at once. Windows saved on disk are reloaded when the page reopens, so a revisit shows the current definitions rather than a blank table. build_control_signal_fit's panel builder is extracted as _shaded_panel and shared with the new build_stacked_traces. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #403
Details (AI-generated)
Three changes, spanning the Step 3 result views as well as the Step 4 transients tab.
Responsive plot width.
PLOT_WIDTH = 750is gone; trace panels setresponsive=Truewith a fixed height, and their panes and containing Columns aresizing_mode="stretch_width". This restores what the matplotlib pop-ups had — a resizable window the plot filled.One stacked layout per recording site. The preprocessing and artifact-removal reviews rendered control/signal/fit and z-score/ΔF/F as two sections, each with its own
Recording siteselector — so the two could sit on different sites at once. They are now onehv.Layoutof five panels under a single selector, sharing an x-axis so zoom links across all of them.build_control_signal_fittakes an optionalextra_tracesdict; the marking page still gets its three panels.plot_zScore_dffremoved. It was read into a local inpreprocess.pyand never used again — z-score and ΔF/F are written unconditionally. Its only real consumers were the two view builders, where it decided whether to render a section over data that always exists on disk, defaulting toNone(render nothing). Dropped from the parameter form,GuPPyParamtersUsed.json, and the docs. Old parameter files carrying the key are ignored bysetInputParameters.No artifact shading before removal. The preprocessing review shaded saved keep-windows, implying a removal that has not happened yet. Since the post-removal page already shaded nothing, this drops shading out of
PreprocessingReviewViewentirely;build_control_signal_fit'sspansargument became optional. The Select Artifact Windows page is unchanged.Test note: without the spans layer a single-trace panel resolves to a bare
hv.RGBrather than anhv.Overlay, so the test helpers normalize across both shapes.Scope: #403 is titled for the transients view, but the preprocessing review carries the same roughness and the same fix, so it is covered here too.
🤖 Generated with Claude Code