buzsakilab / buzcode

Code for internal lab sharing - polishing has started but is by no means complete
http://www.buzsakilab.com/
GNU General Public License v3.0
119 stars 127 forks source link

Questions about bz_LFPfromDAT #421

Open farazmoradi opened 11 months ago

farazmoradi commented 11 months ago

Hi,

I wanted to know how the filtering and downsampling is applied on the DAT file using bz_LFPfromDAT function. I tried to check the code and I realized the sinc_filter function was used for filtering, but I couldn't understand how the downsampling was applied.

Thanks

brendonw1 commented 11 months ago

Looks like it simply takes one out of n samples using something like this gather_try(int16(real( tmp(sampleRatio:sampleRatio:end-ntbuff))))

Brendon Watson, MD-PhD Assistant Professor in Psychiatry, Bioinformatics and Biomedical Engineering

Biomedical Sciences Research Building, Room 5059 University of Michigan 109 Zina Pitcher Place Ann Arbor, MI 48109-5720 Lab Website: http://watsonneurolab.org Clinical phone: 734-764-0231

On Tue, Aug 8, 2023 at 4:02 PM farazmoradi @.***> wrote:

Hi,

I wanted to know how the filtering and downsampling is applied on the DAT file using bz_LFPfromDAT function. I tried to check the code and I realized the sinc_filter function was used for filtering, but I couldn't understand how the downsampling was applied.

Thanks

— Reply to this email directly, view it on GitHub https://github.com/buzsakilab/buzcode/issues/421, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA26WTKZVEYCNR3PBZGUJ73XUKLM7ANCNFSM6AAAAAA3I647DU . You are receiving this because you are subscribed to this thread.Message ID: @.***>