LernerLab / GuPPy

Guided Photometry Analysis in Python, a free and open-source FP analysis tool.
GNU General Public License v3.0
63 stars 11 forks source link

peak analysis for peri-event #13

Closed danaconlisk closed 2 years ago

danaconlisk commented 2 years ago

Hi! guppy is a really great tool but I was wondering if you guys were planning on implementing peak amplitude/frequency analysis for events? could be interesting for us but unfortunately it is not offered with guppy

venus-sherathiya commented 2 years ago

How do you want the peak amplitudes and frequency in PSTHs ?

danaconlisk commented 2 years ago

First and most important, how the frequency of transients change as a consequence of the presentation of a discriminative stimulus change (essentially, transient freq during the presentation of a signal that tells the animal to inhibit behavior(pre) vs during the presentation of a signal that tells the animal it should behave(post)). And the same for the avg amplitude pre and post event.. Essentially as I understand we can only look at the peak and AUC for psths and the freq/avg amplitude for the whole recording at the moment. but if the recording is consisted of multiple trials, the extraction of amplitude/freq isnt really helpful. Ideally it would be extracted as it is with AUC/peak but with transient freq/amplitude pre/post event for the desired time period indicated in the PSTH section, so we could average them over multiple trials and then proceed with stats. hope that was clear. sorry i didnt really understand what you were asking thanks for the quick reply :) D

venus-sherathiya commented 2 years ago

For now, you can achieve it by writing a small piece of code using any programming language you are comfortable with.

When you run the whole analysis, you will see file name called 'transientOccurences...' It is a csv file and it has timestamps at which transients were detected and also the corresponding amplitude. You can read transientOccurences csv file in a code, use the event timestamps file and extract the values from the csv pre-event and post event.

If it is very urgent for you, you can try to implement a small code using the approach I mentioned.

I will also try to implement what you mentioned in GuPPy but I will need some time. Thank you !!

danaconlisk commented 2 years ago

Great thanks a lot!