Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow for Odor Calibration #69

Open
tiffanyona opened this issue Dec 12, 2023 · 11 comments
Open

Workflow for Odor Calibration #69

tiffanyona opened this issue Dec 12, 2023 · 11 comments
Assignees

Comments

@tiffanyona
Copy link

Code a workflow in bonsai for testing the odor calibration:

1- Reads and saves Olfactometer triggers.
2 - Reads and saves Analog board signals. No need for the Harp Behavior in my opinion, use a harp Analog Input to do this and it's easier to deploy in any box.
3 - Sets the flow settings to be the standard ones for the task. Maybe in the future we can think if we want to change them and how to have that make sense for the calibration.
4 - On and off loop triggers for all odor valves with say 2s pulses. Key-down start of the loop.

A more general discussion could be how to save the data so it's easy to recover things. At least the date and the box ID in the name of the saved file?

@bruno-f-cruz
Copy link
Collaborator

Regarding 3-, i am not sure what the standard settings are. Do you always want to calibrate with a concentration of 100% (i.e. 100ml/min) or do you have something else in mind?

The data will likely be saved in the same way as the behavior data, you can just pass a different subject schema to generate a new name. In the future, we should come up with a schema for what the output of this calibration is and save that file directly. If you want to start thinking about what information should go into / the structure of the objects would be nice!

@tiffanyona
Copy link
Author

3- In principle I as thinking 100% but leaving that as something that might be necessary to adjust in the future. I can image that we would want to see the full calibration curve at different % if we start playing with the concentration in the behavior.

@bruno-f-cruz
Copy link
Collaborator

Three calibrations should be performed:

    1. Calibration of the odor stimuli (frequent) - Open and close valves at flow 100% for each channel, record the PID output and calibrate offline.
    1. Calibrate olfactometer flowrate (very rarely) - Compare the flowrate values of the olfactometer (i.e. 0-1000) to the real value given my Alicat Flowmeter. This is currently dependent on this PR to the core AIND repo
    1. PID calibration with stock odor (very rarely) - Sweep the flow rate of channel 3 from 0:1000 and draw a V(Flowrate) curve.

@bruno-f-cruz
Copy link
Collaborator

It is unclear to me if this calibration should be part of a centralized repo with calibrations or should be part of this task repo. We should perhaps discuss this.

@bruno-f-cruz
Copy link
Collaborator

  1. Calibration of the odor stimuli (frequent) - Open and close valves at flow 100% for each channel, record the PID output and calibrate offline.

Fixed via cc9fb6b

@bruno-f-cruz
Copy link
Collaborator

In order to finish the odor calibration part of this issue It would be good to collect some data to validate the approach. Can we schedule a time to do it next week?

@tiffanyona
Copy link
Author

  • 1h continuous odor presentation to assess if there is a decrease of odor concentration in the vial headspace.

@bruno-f-cruz
Copy link
Collaborator

Check with Artur from Champalimaud

Calibrate olfactometer flowrate (very rarely) - Compare the flowrate values of the olfactometer (i.e. 0-1000) to the real value given my Alicat Flowmeter. This is currently dependent on this PR to the core AIND repo

For the next milestone we should implement:

PID calibration with stock odor (very rarely) - Sweep the flow rate of channel 3 from 0:1000 and draw a V(Flowrate) curve.

@bruno-f-cruz
Copy link
Collaborator

PID calibration with stock odor (very rarely) - Sweep the flow rate of channel 3 from 0:1000 and draw a V(Flowrate) curve.

Trying to implement this and I don't think we want to do this. In order to calibrate the PID we want a condition where the overall Flow rate is constant and what we vary is the air dilution between the odor channel and the carrier. The problem is that in our setup channel 3 is the carrier but also the only channel that can go above 100ml min.
As a result, if i understand correctly, we need to chose one of the following calibration routines

  1. Keep everything mechanically the same (I think we should since unplugging tubing seems like a bad idea) and calibrate odors using Channel3 + Channel0 in such a way that Channel0 would sweep in the ranges of 0:step:100 and Channel3 would step in the ranges of Max_flow_rate - (0:step:100).
  2. When calibrating the PID change the tubing and allow the mixtures to happen between the Carrier and Channel3. This way we could mix the odors up to a 1000ml/min.
    @cindypoo?

@cindypoo
Copy link

Yes, that's a good idea. We can also have 2 different tubing set up so that we can swap it in and out without disconnecting at the manifold. This will make leaks less likely to happen. For this we should order extra manifold and odor tube holder from Artur. Let me know if this sounds good and I will ask Alex to place the extra order.

@bruno-f-cruz
Copy link
Collaborator

Going with 1. after discussing during the meeting.

@bruno-f-cruz bruno-f-cruz transferred this issue from AllenNeuralDynamics/Aind.Behavior.VrForaging Jul 25, 2024
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

No branches or pull requests

3 participants