Precise units location detected in Neuropixel dataset


I was wondering if it is possible to retrieve the center of mass of each unit, currently the unit location (in the “session.units” pandas dataframe) corresponds to the channel location on the probe. I know that kilosort outputs a most precise estimate of each unit location.


I’m talking about spatial location.

Hi Roberto – we currently assume that a unit’s “location” is the same as the recording site with the highest detected waveform amplitude. This is of course an oversimplification, and there’s much more information about the cell shape to be found in the full waveform. The mean waveform for each unit can be retrieved via session.mean_waveforms[unit_id]. You’ll have to compute the center of mass yourself, as this is not available as a standard metric.