Skip to content

Commit

Permalink
fixed lick sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
saskiad committed Aug 23, 2024
1 parent d272a5c commit ae7d347
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
48 changes: 42 additions & 6 deletions examples/fip_behavior_rig.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"reward_spouts": [
{
"device_type": "Reward spout",
"name": "Janelia_Lick_Detector Left",
"name": "Left spout",
"serial_number": null,
"manufacturer": null,
"model": null,
Expand All @@ -66,12 +66,30 @@
"additional_settings": {},
"notes": null
},
"lick_sensor": null,
"lick_sensor": {
"device_type": "Lick detector",
"name": "Janelia_Lick_Detector Left",
"serial_number": null,
"manufacturer": {
"name": "Janelia Research Campus",
"abbreviation": "Janelia",
"registry": {
"name": "Research Organization Registry",
"abbreviation": "ROR"
},
"registry_identifier": "013sk6x84"
},
"model": null,
"path_to_cad": null,
"port_index": null,
"additional_settings": {},
"notes": null
},
"lick_sensor_type": "Capacitive"
},
{
"device_type": "Reward spout",
"name": "Janelia_Lick_Detector Right",
"name": "Right spout",
"serial_number": null,
"manufacturer": null,
"model": null,
Expand All @@ -94,7 +112,25 @@
"additional_settings": {},
"notes": null
},
"lick_sensor": null,
"lick_sensor": {
"device_type": "Lick detector",
"name": "Janelia_Lick_Detector Right",
"serial_number": null,
"manufacturer": {
"name": "Janelia Research Campus",
"abbreviation": "Janelia",
"registry": {
"name": "Research Organization Registry",
"abbreviation": "ROR"
},
"registry_identifier": "013sk6x84"
},
"model": null,
"path_to_cad": null,
"port_index": null,
"additional_settings": {},
"notes": null
},
"lick_sensor_type": "Capacitive"
}
]
Expand All @@ -110,7 +146,7 @@
"serial_number": "TBD",
"manufacturer": {
"name": "Ailipu Technology Co",
"abbreviation": "Ailipu",
"abbreviation": null,
"registry": null,
"registry_identifier": null
},
Expand Down Expand Up @@ -187,7 +223,7 @@
"serial_number": "TBD",
"manufacturer": {
"name": "Ailipu Technology Co",
"abbreviation": "Ailipu",
"abbreviation": null,
"registry": null,
"registry_identifier": null
},
Expand Down
14 changes: 12 additions & 2 deletions examples/fip_behavior_rig.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,27 @@
d.RewardDelivery(
reward_spouts=[
d.RewardSpout(
name="Janelia_Lick_Detector Left",
name="Left spout",
side=d.SpoutSide.LEFT,
spout_diameter=1.2,
solenoid_valve=d.Device(device_type="Solenoid", name="Solenoid Left"),
lick_sensor = d.Device(
name="Janelia_Lick_Detector Left",
device_type="Lick detector",
manufacturer=d.Organization.JANELIA,
),
lick_sensor_type=d.LickSensorType("Capacitive"),
),
d.RewardSpout(
name="Janelia_Lick_Detector Right",
name="Right spout",
side=d.SpoutSide.RIGHT,
spout_diameter=1.2,
solenoid_valve=d.Device(device_type="Solenoid", name="Solenoid Right"),
lick_sensor = d.Device(
name="Janelia_Lick_Detector Right",
device_type="Lick detector",
manufacturer=d.Organization.JANELIA,
),
lick_sensor_type=d.LickSensorType("Capacitive"),
),
],
Expand Down
2 changes: 1 addition & 1 deletion src/aind_data_schema/core/rig.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def validate_device_names(cls, value: List[DAQDevice], info: ValidationInfo) ->
reward_delivery_device_names = []
for rd in reward_deliveries:
for rs in rd.reward_spouts:
reward_delivery_device_names += [rs.name, rs.solenoid_valve.name]
reward_delivery_device_names += [rs.name, rs.solenoid_valve.name, rs.lick_sensor.name]

all_device_names = (
standard_device_names
Expand Down

0 comments on commit ae7d347

Please sign in to comment.