Add sniff detector to the dynamic foraging bonsai workflow#1602
Add sniff detector to the dynamic foraging bonsai workflow#1602micahwoodard merged 6 commits intodevelopfrom
Conversation
Add harp utils package for easy logging Update aind core package
|
@bruno-f-cruz @jasonyslee is this pr on hold until a sniff detector is installed in a box in 446/7? |
|
@jasonyslee I don't think anything needs to be added to this pr? Seems like it already checks if the SniffDetector key is in the csv file and if it's found initializes the device. Have you tested on 2B with the added key to confirm this works? |
|
@bruno-f-cruz @micahwoodard Sniff detector is now on box 1B. Issue: Upon clicking "Start," the behavior GUI freezes and eventually Windows popup error "Python is not responding." This is only occurring on this branch, not main/testing. |
|
@jasonyslee do you have any log files? |
|
You may want to implement the same fix as the one xinxin suggested for the camera loggers. This PR will have the same issue. |
|
@micahwoodard Here are console outputs, not especially informative... @bruno-f-cruz Xinxin's fix in #1593 ? So we should reconfigure bonsai RestartLoggers to propagate RootPath? |
|
@bruno-f-cruz I implemented Xinxin's fix for #1593 and got a bit further: Task now starts and video/sniffing is recorded. However, I get this ConnectionAbortedError from the GUI when attempting to start Camera Preview. RAs will not run mice if they cannot be monitored live. Could this have to do with deleting foraging.bonsai.layout ? |
|
No clue where this is coming from. It merely states the OSC connection dropped. If someone ends up concluding what the issue is, lmk and I can try help solving it from the Bonsai side if needed |
|
@jasonyslee It's working normally on my side. I can't repeat this issue, but I tested without a sniff sensor on the ephys rig 3. |
|
@jasonyslee is this ready to merge? I just tested on 1B and seems to be working with sniff detector |
|
@micahwoodard The last thing I need to resolve is how to visualize streams while recording (video, sniff). They don't automatically appear because I had to delete foraging.bonsai.layout for workflow to run. Maybe I'm just using bonsai wrong but manually opening visualizers through the workflow just generates empty windows. I will try to test with Xinxin this week. |
Added sniff detector visualization window and recreated Lick/CamRecord/CamPreview windows.
|
@micahwoodard Update: Task now runs with foraging.bonsai.layout. I pushed changes that automatically pull up visualizer windows like the main branch (but with sniff detector values added). Now we should be good to merge. |
|
In order to get rid of the clunkiness of keeping local layout files, consider merging #1625. Once that is done you will be able to launch the visualizers from the workflow without having to specify anything in layout files |
jasonyslee
left a comment
There was a problem hiding this comment.
Branch works as intended; sniff detector signals recorded successfully during behavior
|
@jasonyslee could you resolve merge conflicts so we can merge? |
|
@jasonyslee yay thank you! I'll merge for testing next week |

Pull Request instructions:
If the experimenters must do anything new, provide detailed step by step instructions on the wiki
Users may need to connect the thermistor to the sniff detector board
If computer maintainers need to manually update anything, provide detailed step by step instructions
Maintainers will have to update the settings csv file to add a new setting with the key: "SniffDetector". The value of this key should be a string with the ComPort for the device. If the key is not present, the device will not be instantiated and no logging should occur.
Describe changes:
What issues or discussions does this update address?
#1601
Describe the expected change in behavior from the perspective of the experimenter
None anticipated
Describe any manual update steps for task computers
In computers that will record this device, you will need to add said device to the rig and corresponding settings to the CSV file
Was this update tested in 446/447?
Not yet
Does this update impact downstream processing by adding new saved files, or changing their format? If so, have you documented changes?
It adds new saved files to the following path:
root/../../behavior/SniffDetector.harp
all logging is accoring to spec in https://allenneuraldynamics.github.io/aind-file-standards/file_formats/harp/ version 0.2.0