Skip to content

Corrects metadata - #154

Merged
micahwoodard merged 7 commits into
mainfrom
fix-172-173-metadata
Aug 24, 2026
Merged

Corrects metadata#154
micahwoodard merged 7 commits into
mainfrom
fix-172-173-metadata

Conversation

@micahwoodard

Copy link
Copy Markdown
Collaborator

Addresses #172 #173 metadata issues

- Fix motorized_stage travel_unit from CM to MM
- Restructure motorized_stage and solenoid valves into LickSpoutAssembly
  with left/right LickSpouts including capacitive lick sensors (Janelia)
- Add Tube mouse platform (mouse_tube_foraging, 3.0 cm diameter)
- Add LightEmittingDiode IR LED (Thorlabs M810L5, 810 nm)
- Add Enclosure (Behavior enclosure, 54x54x54 cm, AIND)
- Update connections to reference new solenoid names (Solenoid Left/Right)
- Fix mouse_platform_name from 'tube' to 'mouse_tube_foraging' to match
  instrument component name
- Add curriculum_status to StimulusEpoch from trainer_state.stage.name
@micahwoodard
micahwoodard requested a lite review from Copilot August 20, 2026 21:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the dynamic foraging metadata mapper to better align exported Instrument and Acquisition metadata with the underlying rig/session semantics (including more explicit device modeling and training-stage metadata).

Changes:

  • Restructures Instrument components to model a lick spout assembly (with solenoids/sensors), mouse tube platform, IR LED, and enclosure metadata, and updates related BehaviorBoard connections.
  • Adds curriculum_status to StimulusEpoch derived from trainer_state.stage.
  • Updates mouse_platform_name to match the new instrument tube component name.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
workspace/aind_behavior_dynamic_foraging_metadata_mapper/src/aind_behavior_dynamic_foraging_metadata_mapper/instrument.py Expands/adjusts instrument component modeling (lick spout assembly, tube, LED, enclosure) and updates connection target names.
workspace/aind_behavior_dynamic_foraging_metadata_mapper/src/aind_behavior_dynamic_foraging_metadata_mapper/acquisition.py Adds curriculum stage status to stimulus epoch and aligns mouse platform name with instrument component.
Suppressed comments (1)

workspace/aind_behavior_dynamic_foraging_metadata_mapper/src/aind_behavior_dynamic_foraging_metadata_mapper/instrument.py:361

  • The notes string starts with a leading space, which is likely unintended and will carry into exported metadata.
                notes=" (v1v2 upgrade): Scale is width/length/height",

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

LickSpout(
name="Left lick spout",
manufacturer=Organization.OTHER,
notes=" (v1v2 upgrade): 'manufacturer' field was missing, defaulting to 'Other'.",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@micahwoodard

Copy link
Copy Markdown
Collaborator Author

Here are some files generated to help evaluate. Here are issues addresses

Issue #173:

  • acquisition subject_details mouse_platform_name is mouse_tube_foraging
  • acquisition stimulus_epochs includes curriculum_status
  • curriculum_status is uppercase formatted (GRADUATED)
  • training_protocol_name is present

Issue #172:

  • instrument includes LickSpoutAssembly
  • LickSpoutAssembly.motorized_stage travel_unit is millimeter
  • instrument includes mouse_tube_foraging tube component
  • instrument includes IR LED light component
  • instrument includes Behavior enclosure component
  • enclosure size unit is centimeter (as requested in the issue text)

Issue #137:

  • adds note about additional settings

Issue #175

  • use task_logic.name for acquisition.acquisition_type

acquisition.json
instrument.json

@micahwoodard
micahwoodard requested a review from alexpiet August 21, 2026 15:32
@micahwoodard

Copy link
Copy Markdown
Collaborator Author

@jasonyslee @rachelstephlee for visibility

@micahwoodard
micahwoodard merged commit 19a91c5 into main Aug 24, 2026
4 checks passed
@micahwoodard
micahwoodard deleted the fix-172-173-metadata branch August 24, 2026 15:05
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.

3 participants