CellExplorer
CellExplorer copied to clipboard
[HELP] trough To Peak values
Good afternoon, I am trying to understand how CellExplorer calculates the throug to peak value. I understand that on the average of the waveforms it will look for the minimum and maximum value after the waveform (if necessary I understand that it inverts the waveform), and then it will calculate the difference between both peaks. The thing is, from what I've seen, the waveform information is in sampling units, so I guess it will convert it to milliseconds. I am trying to simulate this same thing in python but I am not able to get the same result, the process I am doing is the same as I have described above.
Is it possible that in CellExplorer the value is calculated differently?
Thank you very much for your help!
Hi Lorena
You can find the function that calculates the trough-to-peak values here: https://github.com/petersenpeter/CellExplorer/blob/main/calc_CellMetrics/calc_waveform_metrics.m
Waveforms are oversampled to better estimate the various metrics. If there is a positive spike, the waveform is flipped. Then, the trough to peak is calculated and translated to µs (line 80).
I have been looking at the function but it returns a matrix with all the calculations and in the trough to peak it returns many values of this calculation (I don't know if it is because it calculates one for each neuron wveform) but when I get the summary table of all the calculations the value of trhoug to peak is only one per neuron, so I understand that the average of all the trough to peak that have been calculated with this function is calculated?
Yes. The function calculates these metrics for all units.