Repository navigation
Conversation
The data-browser's SBD place-learning scorer only knew preprobe / training / probe, so the v3 (p071 port) and v4 protocols' sham_preprobe, probe_mid and sham_probe bouts were dropped. They are now stages of their own, scored like the probe on the same zone geometry: - sbdStage maps sham_preprobe / probe_mid / sham_probe to their own stages and accepts the v4 uncoupled control's train_k<k>_<plus|minus> bout names (the classifier's condition-name fallback uses the same regex). - Every bout gets a protocol-order position shared across protocol versions: sham before -1, before 0, train_k = k, mid test / sham test = k + 0.5 after bout k, test = N + 1. - The two sham stages are heat-off (no led_activation, ledDrive 0 before the trial): heatOff = true, LED-on fraction 0, uniformHeat false. - sbdStageSummary carries all six stages (zero bouts when a protocol lacks one) plus `stages` (those present, in order), a short label and the heat-off flag; the stage pages (occupancy, preference) show only the stages the loaded runs ran, the sequence pages label the tests on the x axis and shade one band per test; CSV rows gain heat_off / stage_label. - v1/v2 runs score as before (the existing checks pass unchanged); new checks build a synthetic v4-style run covering stage mapping, positions, heat-off flags, summary and pages, plus a v1/v2 regression check. Semantics mirror the lab's local sbd-dashboard (sbd.py: STAGES, SHAM_STAGES, bout positions, stage_summary). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Follow-up to #249 (Michael's PR comment / DM): score the v3 sham and mid-probe stages of the SBD place-learning protocols in the data-browser dashboard.
The v3 (
p3-sbd-placelearning-coupled-v3-led14) and v4 (…-coupled-v4-led14,…-uncoupled-v4-led14) protocols add three tests around the training:sham_preprobe(beforepreprobe, closed loop with the LED off),probe_mid(heated test after bout 10) andsham_probe(LED off, after bout 20, beforeprobe). The dashboard's SBD scorer only knew preprobe / training / probe, so those bouts were dropped. Now:analysis-core.jssbdStage):sham_preprobe/probe_mid/sham_probeare stages of their own; training also matches the v4 uncoupled control'strain_k<k>_<plus|minus>bout names (the classifier's condition-name fallback uses the same regex, so a renamed v4 copy still routes tosbd-place).heatOff = true(noled_activationon the trialParams,ledDrive 0before), so the LED-on fraction is 0 for them anduniformHeatis false; their preference index uses the same zone geometry as the probes.sbdStageSummarycarries all six stages (zero bouts when a protocol lacks one),stages(those present, in protocol order), a short label ("sham before", "before", "training", "mid test", "sham test", "test") and the heat-off flag. The occupancy and preference pages show only the stages the loaded runs ran (a mixed v2 + v4 group shows the union), the sequence pages label the tests on the x axis and shade one band per test. CSV rows gainheat_offandstage_label.sbd.py:STAGES,SHAM_STAGES, bout positions,stage_summary), not its code.Files:
dashboard/data-browser/analysis-core.js,dashboard/data-browser/plot-specs.js,dashboard/data-browser/README.md,tests/test-dashboard-sbd.js.Tier
Next candidate.
Release notes
Dashboard
sham_preprobe,probe_midandsham_probebouts appear as their own stages ("sham before", "mid test", "sham test") on the time-in-zone, first-entry, LED-on, occupancy and preference pages, scored on the same safe zone as the probe. Sham tests show an LED-on fraction of 0 and are flaggedheat_offin the CSV.train_k<k>_<plus|minus>bout names). v1/v2 runs are unchanged.Test plan
pixi run test -- dashboard-sbd— 26 / 26 checks (17 existing + 9 new: stage mapping, positions, heat-off flags, summary, pages, v1/v2 regression, v4 classification)pixi run test— every dashboard test passes; the 7 files that fail on this Windows checkout (test-arena-studio-alt,test-project-skills,test-protocol-roundtrip-v3,test-rig-qc,test-studio-runtime-vars,test-studio-shell,test-three-viewer-partial-columns) do not reference the dashboard and fail identically without this changep3-sbd-placelearning-coupled-v4-led14) in the data-browser and check the six stages on the preference page🤖 Generated with Claude Code