Skip to content

Multi camera support - #3

Merged
alexevag merged 10 commits into
mainfrom
multi-camera-support
Sep 8, 2026
Merged

alexevag merged 10 commits into
mainfrom
multi-camera-support

Conversation

@alexevag

@alexevag alexevag commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Type of change

  • New plugin (new behavior / stimulus / experiment / task)
  • Bug fix
  • Update to an existing plugin
  • Other (describe above)

Checklist

  • I tested the plugin locally and it ran without errors
  • The file is placed in the correct folder (behaviors/, stimuli/, experiments/, tasks/, or utils/)
  • I have not changed unrelated files

alexevag and others added 10 commits May 13, 2026 12:15
ethopy_package's Interface now exposes self.cameras (a dict keyed by
f"{video_aim}_{camera_idx}") instead of a single self.camera. Adapt
the openfield behavior to look up its DLC-feeding camera via the new
API, and reject ambiguous configurations explicitly.

- New _get_openfield_camera() helper filters cameras by the "openfield_"
  prefix. Returns the single match, raises ValueError with an actionable
  message if zero or more-than-one openfield-aim cameras are configured.
- _initialize_dlc and get_corners now consume the helper's result
  instead of self.interface.camera.process_queue (which no longer
  exists). The old generic "Camera is not initialized" guard is removed
  — the helper's error covers it with better diagnostics.

Requires ethopy_package's multi-camera-support branch to be merged first
(or both merged together): this commit would crash against the previous
single-camera API.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add a detailed docstring for Panda.get_cond explaining prefix stripping, per-object selection, and return shape. Replace the previous type-based scalar check (int/float) with np.ndim(v) == 0 so numpy scalar types are treated as scalars while sequences/arrays are indexed by idx. This makes get_cond more robust when fields use numpy types and clarifies its behavior and arguments.
These instance assignments shadow class attributes. Olfactory defined cond_tables/required_fields/default_key only as class attributes, and its __init__ called super().__init__() without restoring them, so every Olfactory() instance had them empty. The core stimuli (grating.py, dot.py, bar.py) all avoid this by setting them inside __init__, the plugin was the outlier.

Empty cond_tables, the hash is computed over zero fields, every condition = make_hash({}) = vNiwwusfznFOq2zvDXcazA==
@alexevag
alexevag merged commit c195059 into main Sep 8, 2026
1 check failed
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.

1 participant