kilosort2_5_config.m 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ops.NchanTOT = 32; % total number of channels (omit if already in chanMap file)
  2. ops.Nchan = 32; % number of active channels (omit if already in chanMap file)
  3. ops.fs = 32000.0; % sampling rate
  4. ops.datatype = 'dat'; % binary ('dat', 'bin') or 'openEphys'
  5. ops.fbinary = fullfile('/net/bs-filesvr01/export/group/hierlemann/Temp/Alessio/make_test_sorted_data/sorting_output/kilosort2_5/recording.dat'); % will be created for 'openEphys'
  6. ops.fproc = fullfile(fpath, 'temp_wh.dat'); % residual from RAM of preprocessed data
  7. ops.root = fpath; % 'openEphys' only: where raw files are
  8. % define the channel map as a filename (string) or simply an array
  9. ops.chanMap = fullfile('chanMap.mat'); % make this file using createChannelMapFile.m
  10. % frequency for high pass filtering (300)
  11. ops.fshigh = 150; % high-pass more aggresively
  12. % minimum firing rate on a "good" channel (0 to skip)
  13. ops.minfr_goodchannels = 0.1;
  14. % number of blocks to use for nonrigid registration
  15. ops.nblocks = 5;
  16. % spatial smoothness constant for registration
  17. ops.sig = 20;
  18. % threshold on projections (like in Kilosort1, can be different for last pass like [10 4])
  19. ops.Th = [10, 4];
  20. % how important is the amplitude penalty (like in Kilosort1, 0 means not used, 10 is average, 50 is a lot)
  21. ops.lam = 10;
  22. % splitting a cluster at the end requires at least this much isolation for each sub-cluster (max = 1)
  23. ops.AUCsplit = 0.9;
  24. % minimum spike rate (Hz), if a cluster falls below this for too long it gets removed
  25. ops.minFR = 0.1;
  26. % number of samples to average over (annealed from first to second value)
  27. ops.momentum = [20 400];
  28. % spatial constant in um for computing residual variance of spike
  29. ops.sigmaMask = 30;
  30. % threshold crossings for pre-clustering (in PCA projection space)
  31. ops.ThPre = 8;
  32. %% danger, changing these settings can lead to fatal errors
  33. % options for determining PCs
  34. ops.spkTh = -6; % spike threshold in standard deviations (-6)
  35. ops.reorder = 1; % whether to reorder batches for drift correction.
  36. ops.nskip = 25; % how many batches to skip for determining spike PCs
  37. ops.CAR = 1; % perform CAR
  38. ops.GPU = 1; % has to be 1, no CPU version yet, sorry
  39. % ops.Nfilt = 1024; % max number of clusters
  40. ops.nfilt_factor = 4; % max number of clusters per good channel (even temporary ones) 4
  41. ops.ntbuff = 64; % samples of symmetrical buffer for whitening and spike detection 64
  42. ops.NT = 65600; % must be multiple of 32 + ntbuff. This is the batch size (try decreasing if out of memory). 64*1024 + ops.ntbuff
  43. ops.whiteningRange = 32; % number of channels to use for whitening each channel
  44. ops.nSkipCov = 25; % compute whitening matrix from every N-th batch
  45. ops.scaleproc = 200; % int16 scaling of whitened data
  46. ops.nPCs = 3; % how many PCs to project the spikes into
  47. ops.useRAM = 0; % not yet available
  48. %%