Closed jacobpennington closed 5 months ago
I figured this out myself after some more work, posting the answer here incase anyone else has the same question: 'amp' column values are just max - min of the corresponding unwhitened template. https://github.com/cortex-lab/phy/blob/8bf8cf751fcbd44210b3c5bbdba8c34a7b2cb1ce/phy/apps/base.py#L497
Hello,
I am trying to adjust Kilosort4's outputs so that the amplitudes in Phy are comparable to past versions. I understand the 'Amplitude' column in ClusterView is exported directly from Kilosort, and that per-spike amplitudes are exported in
amplitudes.npy
, but I'm having trouble figuring out where the values in the 'amp' column are coming from. I looked at the code referenced in #1248, but it's still unclear and I don't see theget_amplitudes_true
method actually invoked anywhere except to re-format things for ALF (not sure what that is).Would someone be able to point me to somewhere else in the code that this is being computed, or explain which part of
get_amplitudes_true
is relevant if that's the correct method? As in, giventemplates.npy
andamplitudes.npy
, how are those combined to get the values in 'amp'? I also noticed that changing the values inamplitudes.npy
(multiplying them by 10, adding 7, or adding on a random array) doesn't change the values in 'amp,' so I guess I'm just confused in general as to how those are used.Thanks!