Julie-Fabre/bombcell

Bug Report

gschenhui opened this issue · 2 comments

Hi Julie,

I wanted to express my gratitude for the fantastic tool you've provided! It's been incredibly helpful for checking my ephys data.

While using the pipeline, I came across a potential issue in the code. In the file "bombcell/loading/bc_loadMetricsForGUI.m," specifically between lines 46 and 52, it seems that after removing duplicated spikes, the "spike_times" in the "ephysData" structure retains its original length (without removing duplicate spikes). Meanwhile, "spike_times_samples" and "spike_templates" correctly reflect the new length after the removal of duplicate spikes. This inconsistency leads to an incorrect plot of ACG and ISI in "bombcell/visualizationTools/bc_unitQualityGUI.m" (line 427). It appears that the "theseSpikeTimes" variable is calculated from "spike_times" with original spikes and "spike_templates" with removed spikes, causing the discrepancy.

Could you please verify if my observation is accurate?

Thanks!

Hui

Hi Hui,

Thank you very much for your message. Very good catch! Indeed, I just double checked and the line ephysData.spike_times = ephysData.spike_times_samples ./ ephysData.ephys_sample_rate; that converts spikes from sample units to seconds came before removing duplicate spikes. I've just fixed that.

Cheers,
Julie

Closing this issue for now, but please reopen it if you have any more issues or suggestions. Happy bombcell-ing!