nickpetersen93 / LIQ_HD

Lick Instance Quantifier Home cage Device
6 stars 0 forks source link

Time resolution of data aggregation #1

Closed shun4423 closed 3 months ago

shun4423 commented 1 year ago

This system seems to summarize data as licks per minute, but is it possible to summarize data as licks per second?

nickpetersen93 commented 1 year ago

Theoretically, yes, the code can be modified to log every second, but I don’t think it would be helpful. It takes time to write to the file and save to the SD card, so this would probably cause significant lapses in the lick detection. Is there a specific reason you’d like to log every second? We are currently working on updating the code to include an option to log every drinking bout rather than logging every ‘x’ minutes. This will decrease the file size and also allow for very specific analysis of each bout. We are also fine-tuning the lick detection settings to further increase the accuracy. This should be released in the next few weeks!

shun4423 commented 11 months ago

Where a licked clump is considered terminated varies. In my case, the end of a bout is when there is no lick for one second after consecutive licks. I also calculate the interval between boats. Therefore, I fear that if I compile the data in one-minute increments, I will not be able to calculate these.

If writing logs and saving them to the SD card is problematic, can I increase processing performance to solve the problem?

Zepieton commented 10 months ago

We have built a Liq HD system and it seems to work fine so far; but we want to to be able to use each lick bout as a TTL to time-lock them to specific events (brain recordings). Any way to achieve this with the current code? Or is it going to be in the updated code (and is there an estimated ETA?)?. Thank you for your effort!!!

nickpetersen93 commented 10 months ago

Great to hear you have it up and running! I have just uploaded updated code that will allow you to log each bout. Please note the analysis app does not yet support this file output format.

Adding a TTL should be relatively easy. I have used an Arduino to send TTLs to our fiber photometry system, so I know it is definitely possible. It will mostly be limited by the number of available pins on the Arduino. Will you be recording from multiple animals at the same time, or just from one LIQ bottle pair? Would you want a TTL for each lick, each bout, or both?