Multi camera support - #3
Merged
Merged
Conversation
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==
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.
What does this PR do?
Type of change
Checklist
behaviors/,stimuli/,experiments/,tasks/, orutils/)