Kilosort icon indicating copy to clipboard operation
Kilosort copied to clipboard

HELP: dtype of preprocessed data

Open DavidLucha opened this issue 7 months ago • 1 comments

Hi all,

I'm just trying to understand better the nature of the temp_wh.dat file. If my raw data is in uint16 (recording from Neuropixel 1 on Open Ephys ONIX), and I set the kilosort options with dtype=uint16, does this impact the dtype of the temp_wh.dat file or is it always the same output - converted to int16, I presume? And does this then effect the gain and offset values I apply to the preprocessed data to visualise that in uV?

Thanks,

DavidLucha avatar Jun 04 '25 01:06 DavidLucha

Yes, temp_wh.dat will always be int16 regardless of the input data type. Some normalization happens during preprocessing, so I'm not sure how that will translate to visualizing in real units. I will look into it.

jacobpennington avatar Jun 10 '25 18:06 jacobpennington

The int16 of the binary file has nothing to do with the input format of the raw data. The raw data gets whitened and multiplied by a constant factor (200) to span the range of int16. The whitening process makes the units of the data go away, since whitening means making unit variance channels with zero correlations between channels. We provide an un-whitening matrix to reverse this operation, but this is not well tested.

marius10p avatar Jul 17 '25 06:07 marius10p