Skip to content

Visualizer Refactor - #139

Open
RoboDoig wants to merge 95 commits into
mainfrom
visualizer-refactor-staging
Open

Visualizer Refactor#139
RoboDoig wants to merge 95 commits into
mainfrom
visualizer-refactor-staging

Conversation

@RoboDoig

@RoboDoig RoboDoig commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

This PR refactors the dynamic foraging visualizers to use a full Bonsai ImGui approach according the the requirements outlined in the visualizer refactor milestone

Addresses issues #99, #100, #101, #102, #103, #104, #105.

Individual visualizers take as input an observable source that describes their parent layout group (e.g. tab area, table window) such that visualizers can be reorganised within a parent layout structure. Generally, data is mapped to visualizers by externalized subject names corresponding to the appropriate data source or event.

RoboDoig added 30 commits June 23, 2026 18:14
Switched to time-based visualization so trial-based no longer needed
@RoboDoig
RoboDoig requested a review from micahwoodard August 5, 2026 15:47
@micahwoodard

Copy link
Copy Markdown
Collaborator

Pushed some changes/fixes to update reward delivery changes in flush/open functions and allow for SessionInfoVisualizer to ingest a serializable object and display values. Also added stage name to metadata visualizer. A couple of issues that still need to be adressed

  1. The bias graph time axis will jitter with just one bias point
  2. when pressing stop, bonsai crashes

@micahwoodard

micahwoodard commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Pushed more updates adding stage name to metadata bar and using trial index for bias

@micahwoodard

Copy link
Copy Markdown
Collaborator

Pushed fix for crashing behavior when ending session. Problem was arising when camera preview visualizer continued capturing images when camera stream was closed

@micahwoodard

Copy link
Copy Markdown
Collaborator

Experiencing bug where it seems like the response period is truncated somehow. When testing with new visualizers, mice received no rewards even though they were consistently licking. Upon further investigations, it seemed like mice were not licking within the response period but immediately after. Comparing the old vs new visualizers, it seems like the quiescent period is missing from the trial graph, but I suspect this is actually effecting the response deadline instead. When running mice with the old visualizers with identical parameters, we did not see mice missing response deadlines and consistently making choices at the very beginning of the response period.

These images were produced with identical task logics

image image

@bruno-f-cruz bruno-f-cruz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RoboDoig This looks great Andrew! thanks. I left a few notes after a quick review just to make sure we dont run into issues later!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RoboDoig Some context is missing here: there was a reason the previous visualizer was done at the OpenGL layer. If I understand correctly, this observable is allocating 3 frames on each Select call. These cameras can be quite high frame rate (500fps), not sure this will scale. Have you benchmarked it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these files should be ignored and not committed

Comment thread src/main.bonsai
@@ -18,9 +18,9 @@
<Property Name="SessionPath" />
</Expression>
<Expression xsi:type="IncludeWorkflow" Path="AllenNeuralDynamics.Core:ReadSchemas.bonsai">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the churn diff

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.

4 participants