Skip to content

Visualizer fixes - #211

Open
NeuroThom wants to merge 5 commits into
AllenNeuralDynamics:mainfrom
NeuroThom:visualizer-fixes
Open

NeuroThom wants to merge 5 commits into
AllenNeuralDynamics:mainfrom
NeuroThom:visualizer-fixes

Conversation

@NeuroThom

Copy link
Copy Markdown

Closes #205, closes #206, closes #210, closes #140, closes #209.

Fixes

Return empty metrics from integration generator #206

IntegrationTestTrialGenerator inherited subclasses from the ITrialGenerator directly, which only has a stub for get_metrics(), returning None. TrialMetrics was therefore null and Visualizers.bonsai throws. Added get_metrics method to the generator, returning TrialMetrics() (bias None). Unit test added.

Guard null stage name and experimenter fields #205

In MetadataVisualizer.bonsai the FilterNotNull include on the stage name branch sat before splitting the tuple, which is never null. The experimenter field had no guard and throws at Count if an experimenter: null were to pass. The null check now sits after the stage name selector and before the experimenter count.

Open the visualizer window maximized #210

ChangedWindowState to Maximized.

Close manually opened valves after 3 minutes #140

Added 3min Timer, closing the valve after this time. New KeepLeftOpenComplete / KeepRightOpenComplete subjects carry that signal to PreSessionVisualizer.bonsai to reset the Toggled state of the Keep Open buttons and re-enable the Both button. Same strategy the drain buttons use.

Show remaining drain time on the drain buttons #209

Computed time remaining from the ElementIndex of the RepeatCount loop, the per-pulse period (RewardToTime plus the 0.12 s of timer and delay overhead) and the pulse count. Value is shown in the button label, e.g. Cancel Drain Left (42 s).

To check on the rig

  • Window state
  • Keep Open button flipping back after the timeout
  • Drain label counting down.

The generator inherited the protocol's docstring-only get_metrics, which returns None and becomes a null TrialMetrics in Bonsai. Return TrialMetrics() and add a test.

Closes AllenNeuralDynamics#206.
FilterNotNull ran on the metadata tuple before StageName was selected, and the Experimenter branch had no guard. Move the include after the selector and add one before the experimenter Count check.

Closes AllenNeuralDynamics#205.
The Keep Open loops stop on a 3 min timer and report completion to the toggle buttons the same way the drain loops do.

Closes AllenNeuralDynamics#140.
Each drain iteration publishes the time left from the repeat index, period and count; the Cancel labels display it.

Closes AllenNeuralDynamics#209.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant