Skip to content

BUG: ZeroDivisionError in KSv4.1.1 #1002

@ChelseaLi1998

Description

@ChelseaLi1998

Describe the issue:

Hi! I'm having an issue similar to #724 and #963, but with the latest update of KS. Have sucessfully sorted other probes/recordings, even those with terrible stepwise drift. Happy to roll back KS versions if needed, but couldn't find a discernable cause for this - the drift map for this particular probe/recording looks acceptable to me as well. Let me know if I can provide any more information/send data anywhere.

Reproduce the bug:

Error message:

2025-10-31 06:02:11,762 kilosort.run_kilosort INFO Kilosort version 4.1.1 2025-10-31 06:02:11,762 kilosort.run_kilosort INFO Python version 3.9.21 2025-10-31 06:02:11,762 kilosort.run_kilosort INFO ---------------------------------------- 2025-10-31 06:02:11,762 kilosort.run_kilosort INFO System information: 2025-10-31 06:02:11,780 kilosort.run_kilosort INFO Windows-10-10.0.26100-SP0 AMD64 2025-10-31 06:02:11,780 kilosort.run_kilosort INFO Intel64 Family 6 Model 183 Stepping 1, GenuineIntel 2025-10-31 06:02:11,846 kilosort.run_kilosort INFO Using GPU for PyTorch computations. Specify device to change this. 2025-10-31 06:02:11,850 kilosort.run_kilosort INFO Using CUDA device: NVIDIA GeForce RTX 3060 Ti 8.00GB 2025-10-31 06:02:11,850 kilosort.run_kilosort INFO ---------------------------------------- 2025-10-31 06:02:11,850 kilosort.run_kilosort INFO Sorting [WindowsPath('E:/LocalProcessed/ecephys/catgt_CLF29_103025_keicontrastlick_record3_g0/CLF29_103025_keicontrastlick_record3_g0_imec1/CLF29_103025_keicontrastlick_record3_g0_tcat.imec1.ap.bin')] 2025-10-31 06:02:11,851 kilosort.run_kilosort INFO Skipping common average reference. 2025-10-31 06:02:11,851 kilosort.run_kilosort INFO clear_cache=True 2025-10-31 06:02:11,851 kilosort.run_kilosort DEBUG Initial ops:
ops = { 'n_chan_bin': 385, 'fs': 30000.015062761508, 'batch_size': 60000, 'nblocks': 6, 'Th_universal': 8.0, 'Th_learned': 9.0, 'tmin': 0.0, 'tmax': inf, 'nt': 61, 'shift': None, 'scale': None, 'artifact_threshold': inf, 'nskip': 25, 'whitening_range': 43, 'highpass_cutoff': 300, 'binning_depth': 5, 'sig_interp': 20.0, 'drift_smoothing': [0.5, 0.5, 0.5], 'nt0min': 20, 'dmin': None, 'dminx': 32, 'min_template_size': 10.0, 'template_sizes': 5, 'nearest_chans': 10, 'nearest_templates': 100, 'max_channel_distance': 32, 'max_peels': 100, 'templates_from_data': True, 'n_templates': 6, 'n_pcs': 6, 'Th_single_ch': 8.0, 'acg_threshold': 0.2, 'ccg_threshold': 0.25, 'cluster_neighbors': 10, 'cluster_downsampling': 1, 'max_cluster_subset': 25000, 'x_centers': None, 'duplicate_spike_ms': 0.25, 'position_limit': 100, 'filename': [ WindowsPath('E:/LocalProcessed/ecephys/catgt_CLF29_103025_keicontrastlick_record3_g0/CLF29_103025_keicontrastlick_record3_g0_imec1/CLF29_103025_keicontrastlick_record3_g0_tcat.imec1.ap.bin')], 'data_dir': WindowsPath('E:/LocalProcessed/ecephys/catgt_CLF29_103025_keicontrastlick_record3_g0/CLF29_103025_keicontrastlick_record3_g0_imec1'), 'data_dtype': 'int16', 'do_CAR': False, 'invert_sign': False, 'NTbuff': 60122, 'Nchan': 384, 'duplicate_spike_bins': 7, 'torch_device': 'cuda', 'save_preprocessed_copy': False }
2025-10-31 06:02:11,856 kilosort.run_kilosort DEBUG Probe dictionary:
probe = { 'xc': np.array([ 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 27., 59., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 277., 309., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 527., 559., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809., 777., 809.], dtype=np.float32), 'yc': np.array([ 0., 0., 15., 15., 30., 30., 45., 45., 60., 60., 75., 75., 90., 90., 105., 105., 120., 120., 135., 135., 150., 150., 165., 165., 180., 180., 195., 195., 210., 210., 225., 225., 240., 240., 255., 255., 270., 270., 285., 285., 300., 300., 315., 315., 330., 330., 345., 345., 0., 0., 15., 15., 30., 30., 45., 45., 60., 60., 75., 75., 90., 90., 105., 105., 120., 120., 135., 135., 150., 150., 165., 165., 180., 180., 195., 195., 210., 210., 225., 225., 240., 240., 255., 255., 270., 270., 285., 285., 300., 300., 315., 315., 330., 330., 345., 345., 360., 360., 375., 375., 390., 390., 405., 405., 420., 420., 435., 435., 450., 450., 465., 465., 480., 480., 495., 495., 510., 510., 525., 525., 540., 540., 555., 555., 570., 570., 585., 585., 600., 600., 615., 615., 630., 630., 645., 645., 660., 660., 675., 675., 690., 690., 705., 705., 360., 360., 375., 375., 390., 390., 405., 405., 420., 420., 435., 435., 450., 450., 465., 465., 480., 480., 495., 495., 510., 510., 525., 525., 540., 540., 555., 555., 570., 570., 585., 585., 600., 600., 615., 615., 630., 630., 645., 645., 660., 660., 675., 675., 690., 690., 705., 705., 0., 0., 15., 15., 30., 30., 45., 45., 60., 60., 75., 75., 90., 90., 105., 105., 120., 120., 135., 135., 150., 150., 165., 165., 180., 180., 195., 195., 210., 210., 225., 225., 240., 240., 255., 255., 270., 270., 285., 285., 300., 300., 315., 315., 330., 330., 345., 345., 0., 0., 15., 15., 30., 30., 45., 45., 60., 60., 75., 75., 90., 90., 105., 105., 120., 120., 135., 135., 150., 150., 165., 165., 180., 180., 195., 195., 210., 210., 225., 225., 240., 240., 255., 255., 270., 270., 285., 285., 300., 300., 315., 315., 330., 330., 345., 345., 360., 360., 375., 375., 390., 390., 405., 405., 420., 420., 435., 435., 450., 450., 465., 465., 480., 480., 495., 495., 510., 510., 525., 525., 540., 540., 555., 555., 570., 570., 585., 585., 600., 600., 615., 615., 630., 630., 645., 645., 660., 660., 675., 675., 690., 690., 705., 705., 360., 360., 375., 375., 390., 390., 405., 405., 420., 420., 435., 435., 450., 450., 465., 465., 480., 480., 495., 495., 510., 510., 525., 525., 540., 540., 555., 555., 570., 570., 585., 585., 600., 600., 615., 615., 630., 630., 645., 645., 660., 660., 675., 675., 690., 690., 705., 705.], dtype=np.float32), 'kcoords': np.array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 2., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 3., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4.], dtype=np.float32), 'chanMap': np.array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383]), 'n_chan': 384 }
2025-10-31 06:02:12,017 kilosort.run_kilosort INFO
2025-10-31 06:02:12,017 kilosort.run_kilosort INFO Resource usage before sorting 2025-10-31 06:02:12,017 kilosort.run_kilosort INFO ******************************************************** 2025-10-31 06:02:12,017 kilosort.run_kilosort INFO CPU usage: 8.50 % 2025-10-31 06:02:12,017 kilosort.run_kilosort INFO Mem used: 51.30 % | 16.26 GB 2025-10-31 06:02:12,018 kilosort.run_kilosort INFO Mem avail: 15.43 / 31.70 GB 2025-10-31 06:02:12,018 kilosort.run_kilosort INFO ------------------------------------------------------ 2025-10-31 06:02:12,018 kilosort.run_kilosort INFO GPU usage: conda install pynvml for GPU usage 2025-10-31 06:02:12,018 kilosort.run_kilosort INFO GPU memory: 12.98 % | 1.04 / 8.00 GB 2025-10-31 06:02:12,018 kilosort.run_kilosort INFO Allocated: 0.00 % | 0.00 / 8.00 GB 2025-10-31 06:02:12,018 kilosort.run_kilosort INFO Max alloc: 0.00 % | 0.00 / 8.00 GB 2025-10-31 06:02:12,018 kilosort.run_kilosort INFO ******************************************************** 2025-10-31 06:02:12,018 kilosort.run_kilosort 


OMITTED THIS SECTION FOR LENGTH REASONS


2025-10-31 08:10:46,852 kilosort.run_kilosort INFO
2025-10-31 08:10:46,852 kilosort.run_kilosort INFO Resource usage after spike detect (learned) 2025-10-31 08:10:46,852 kilosort.run_kilosort INFO ******************************************************** 2025-10-31 08:10:46,852 kilosort.run_kilosort INFO CPU usage: 0.00 % 2025-10-31 08:10:46,852 kilosort.run_kilosort INFO Mem used: 60.00 % | 19.02 GB 2025-10-31 08:10:46,852 kilosort.run_kilosort INFO Mem avail: 12.67 / 31.70 GB 2025-10-31 08:10:46,852 kilosort.run_kilosort INFO ------------------------------------------------------ 2025-10-31 08:10:46,852 kilosort.run_kilosort INFO GPU usage: conda install pynvml for GPU usage 2025-10-31 08:10:46,852 kilosort.run_kilosort INFO GPU memory: 40.21 % | 3.22 / 8.00 GB 2025-10-31 08:10:46,853 kilosort.run_kilosort INFO Allocated: 0.21 % | 0.02 / 8.00 GB 2025-10-31 08:10:46,853 kilosort.run_kilosort INFO Max alloc: 20.43 % | 1.63 / 8.00 GB 2025-10-31 08:10:46,853 kilosort.run_kilosort INFO ******************************************************** 2025-10-31 08:10:46,896 kilosort.run_kilosort INFO Generating diagnostic plots ... 2025-10-31 08:10:53,078 kilosort.run_kilosort INFO
2025-10-31 08:10:53,079 kilosort.run_kilosort INFO Final clustering 2025-10-31 08:10:53,079 kilosort.run_kilosort INFO ---------------------------------------- 2025-10-31 08:10:53,124 kilosort.clustering_qr DEBUG Center 0 | Xd shape: torch.Size([18328, 60]) | ntemp: 2 2025-10-31 08:10:55,892 kilosort.clustering_qr DEBUG Center 1 | Xd shape: torch.Size([5782, 60]) | ntemp: 2 2025-10-31 08:10:56,324 kilosort.clustering_qr DEBUG Center 2 | Xd shape: torch.Size([10923, 60]) | ntemp: 2 2025-10-31 08:10:56,884 kilosort.clustering_qr DEBUG Center 3 | Xd shape: torch.Size([16407, 60]) | ntemp: 2 2025-10-31 08:10:57,598 kilosort.clustering_qr DEBUG Center 4 | Xd shape: torch.Size([23163, 60]) | ntemp: 2 2025-10-31 08:10:58,550 kilosort.clustering_qr DEBUG Center 5 | Xd shape: torch.Size([116791, 72]) | ntemp: 4 2025-10-31 08:11:01,635 kilosort.clustering_qr DEBUG Center 6 | Xd shape: torch.Size([34301, 60]) | ntemp: 3 2025-10-31 08:11:02,879 kilosort.clustering_qr DEBUG Center 7 | Xd shape: torch.Size([36862, 60]) | ntemp: 4 2025-10-31 08:11:04,165 kilosort.clustering_qr DEBUG Center 8 | Xd shape: torch.Size([13465, 72]) | ntemp: 3 2025-10-31 08:11:04,726 kilosort.clustering_qr DEBUG
2025-10-31 08:11:04,727 kilosort.clustering_qr DEBUG Cluster center: 9 (10/96) 2025-10-31 08:11:04,727 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:11:04,727 kilosort.clustering_qr DEBUG CPU usage: 13.30 % 2025-10-31 08:11:04,727 kilosort.clustering_qr DEBUG Mem used: 58.10 % | 18.43 GB 2025-10-31 08:11:04,727 kilosort.clustering_qr DEBUG Mem avail: 13.27 / 31.70 GB 2025-10-31 08:11:04,728 kilosort.clustering_qr DEBUG ------------------------------------------------------ 2025-10-31 08:11:04,728 kilosort.clustering_qr DEBUG GPU usage: conda install pynvml for GPU usage 2025-10-31 08:11:04,728 kilosort.clustering_qr DEBUG GPU memory: 14.59 % | 1.17 / 8.00 GB 2025-10-31 08:11:04,728 kilosort.clustering_qr DEBUG Allocated: 0.13 % | 0.01 / 8.00 GB 2025-10-31 08:11:04,728 kilosort.clustering_qr DEBUG Max alloc: 4.13 % | 0.33 / 8.00 GB 2025-10-31 08:11:04,728 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:11:04,748 kilosort.clustering_qr DEBUG Center 9 | Xd shape: torch.Size([66702, 72]) | ntemp: 6 2025-10-31 08:11:06,759 kilosort.clustering_qr DEBUG Center 10 | Xd shape: torch.Size([26608, 72]) | ntemp: 5 2025-10-31 08:11:07,865 kilosort.clustering_qr DEBUG Center 11 | Xd shape: torch.Size([61875, 60]) | ntemp: 4 2025-10-31 08:11:09,853 kilosort.clustering_qr DEBUG Center 12 | Xd shape: torch.Size([99694, 72]) | ntemp: 10 2025-10-31 08:11:13,065 kilosort.clustering_qr DEBUG Center 13 | Xd shape: torch.Size([145249, 72]) | ntemp: 26 2025-10-31 08:11:17,440 kilosort.clustering_qr DEBUG Center 14 | Xd shape: torch.Size([161386, 72]) | ntemp: 24 2025-10-31 08:11:22,128 kilosort.clustering_qr DEBUG Center 15 | Xd shape: torch.Size([231595, 72]) | ntemp: 26 2025-10-31 08:11:28,615 kilosort.clustering_qr DEBUG Center 16 | Xd shape: torch.Size([365228, 72]) | ntemp: 46 2025-10-31 08:11:37,784 kilosort.clustering_qr DEBUG Center 17 | Xd shape: torch.Size([275891, 72]) | ntemp: 31 2025-10-31 08:11:45,489 kilosort.clustering_qr DEBUG Center 18 | Xd shape: torch.Size([3937, 60]) | ntemp: 3 2025-10-31 08:11:45,870 kilosort.clustering_qr DEBUG
2025-10-31 08:11:45,870 kilosort.clustering_qr DEBUG Cluster center: 19 (20/96) 2025-10-31 08:11:45,871 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:11:45,871 kilosort.clustering_qr DEBUG CPU usage: 19.60 % 2025-10-31 08:11:45,872 kilosort.clustering_qr DEBUG Mem used: 58.70 % | 18.61 GB 2025-10-31 08:11:45,872 kilosort.clustering_qr DEBUG Mem avail: 13.09 / 31.70 GB 2025-10-31 08:11:45,872 kilosort.clustering_qr DEBUG ------------------------------------------------------ 2025-10-31 08:11:45,872 kilosort.clustering_qr DEBUG GPU usage: conda install pynvml for GPU usage 2025-10-31 08:11:45,873 kilosort.clustering_qr DEBUG GPU memory: 14.59 % | 1.17 / 8.00 GB 2025-10-31 08:11:45,873 kilosort.clustering_qr DEBUG Allocated: 0.13 % | 0.01 / 8.00 GB 2025-10-31 08:11:45,873 kilosort.clustering_qr DEBUG Max alloc: 12.51 % | 1.00 / 8.00 GB 2025-10-31 08:11:45,873 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:11:45,887 kilosort.clustering_qr DEBUG Center 19 | Xd shape: torch.Size([38939, 72]) | ntemp: 4 2025-10-31 08:11:47,274 kilosort.clustering_qr DEBUG Center 20 | Xd shape: torch.Size([47096, 72]) | ntemp: 5 2025-10-31 08:11:48,811 kilosort.clustering_qr DEBUG Center 21 | Xd shape: torch.Size([2712, 72]) | ntemp: 2 2025-10-31 08:11:49,113 kilosort.clustering_qr DEBUG Center 22 | Xd shape: torch.Size([11630, 72]) | ntemp: 4 2025-10-31 08:11:49,615 kilosort.clustering_qr DEBUG Center 23 | Xd shape: torch.Size([95316, 60]) | ntemp: 4 2025-10-31 08:11:52,125 kilosort.clustering_qr DEBUG Center 24 | Xd shape: torch.Size([21626, 60]) | ntemp: 3 2025-10-31 08:11:53,033 kilosort.clustering_qr DEBUG Center 25 | Xd shape: torch.Size([22838, 60]) | ntemp: 2 2025-10-31 08:11:53,939 kilosort.clustering_qr DEBUG Center 26 | Xd shape: torch.Size([39940, 60]) | ntemp: 2 2025-10-31 08:11:55,343 kilosort.clustering_qr DEBUG Center 27 | Xd shape: torch.Size([54462, 60]) | ntemp: 2 2025-10-31 08:11:56,940 kilosort.clustering_qr DEBUG Center 28 | Xd shape: torch.Size([39769, 72]) | ntemp: 3 2025-10-31 08:11:58,252 kilosort.clustering_qr DEBUG
2025-10-31 08:11:58,253 kilosort.clustering_qr DEBUG Cluster center: 29 (30/96) 2025-10-31 08:11:58,254 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:11:58,254 kilosort.clustering_qr DEBUG CPU usage: 15.40 % 2025-10-31 08:11:58,254 kilosort.clustering_qr DEBUG Mem used: 58.30 % | 18.47 GB 2025-10-31 08:11:58,254 kilosort.clustering_qr DEBUG Mem avail: 13.23 / 31.70 GB 2025-10-31 08:11:58,255 kilosort.clustering_qr DEBUG ------------------------------------------------------ 2025-10-31 08:11:58,255 kilosort.clustering_qr DEBUG GPU usage: conda install pynvml for GPU usage 2025-10-31 08:11:58,255 kilosort.clustering_qr DEBUG GPU memory: 14.59 % | 1.17 / 8.00 GB 2025-10-31 08:11:58,256 kilosort.clustering_qr DEBUG Allocated: 0.13 % | 0.01 / 8.00 GB 2025-10-31 08:11:58,256 kilosort.clustering_qr DEBUG Max alloc: 12.51 % | 1.00 / 8.00 GB 2025-10-31 08:11:58,256 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:11:58,268 kilosort.clustering_qr DEBUG Center 29 | Xd shape: torch.Size([32248, 60]) | ntemp: 3 2025-10-31 08:11:59,484 kilosort.clustering_qr DEBUG Center 30 | Xd shape: torch.Size([36624, 72]) | ntemp: 4 2025-10-31 08:12:00,750 kilosort.clustering_qr DEBUG Center 31 | Xd shape: torch.Size([33953, 60]) | ntemp: 2 2025-10-31 08:12:01,944 kilosort.clustering_qr DEBUG Center 32 | Xd shape: torch.Size([21854, 60]) | ntemp: 2 2025-10-31 08:12:02,813 kilosort.clustering_qr DEBUG Center 33 | Xd shape: torch.Size([42658, 60]) | ntemp: 5 2025-10-31 08:12:04,300 kilosort.clustering_qr DEBUG Center 34 | Xd shape: torch.Size([124648, 72]) | ntemp: 7 2025-10-31 08:12:07,812 kilosort.clustering_qr DEBUG Center 35 | Xd shape: torch.Size([113152, 60]) | ntemp: 8 2025-10-31 08:12:11,074 kilosort.clustering_qr DEBUG Center 36 | Xd shape: torch.Size([442335, 72]) | ntemp: 25 2025-10-31 08:12:22,111 kilosort.clustering_qr DEBUG Center 37 | Xd shape: torch.Size([142715, 72]) | ntemp: 17 2025-10-31 08:12:26,361 kilosort.clustering_qr DEBUG Center 38 | Xd shape: torch.Size([254921, 72]) | ntemp: 38 2025-10-31 08:12:33,108 kilosort.clustering_qr DEBUG
2025-10-31 08:12:33,108 kilosort.clustering_qr DEBUG Cluster center: 39 (40/96) 2025-10-31 08:12:33,108 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:12:33,108 kilosort.clustering_qr DEBUG CPU usage: 18.60 % 2025-10-31 08:12:33,109 kilosort.clustering_qr DEBUG Mem used: 58.50 % | 18.55 GB 2025-10-31 08:12:33,109 kilosort.clustering_qr DEBUG Mem avail: 13.15 / 31.70 GB 2025-10-31 08:12:33,109 kilosort.clustering_qr DEBUG ------------------------------------------------------ 2025-10-31 08:12:33,109 kilosort.clustering_qr DEBUG GPU usage: conda install pynvml for GPU usage 2025-10-31 08:12:33,109 kilosort.clustering_qr DEBUG GPU memory: 14.62 % | 1.17 / 8.00 GB 2025-10-31 08:12:33,109 kilosort.clustering_qr DEBUG Allocated: 0.14 % | 0.01 / 8.00 GB 2025-10-31 08:12:33,109 kilosort.clustering_qr DEBUG Max alloc: 15.13 % | 1.21 / 8.00 GB 2025-10-31 08:12:33,109 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:12:33,174 kilosort.clustering_qr DEBUG Center 39 | Xd shape: torch.Size([414505, 72]) | ntemp: 22 2025-10-31 08:12:43,274 kilosort.clustering_qr DEBUG Center 40 | Xd shape: torch.Size([118558, 72]) | ntemp: 5 2025-10-31 08:12:46,599 kilosort.clustering_qr DEBUG Center 41 | Xd shape: torch.Size([239636, 60]) | ntemp: 7 2025-10-31 08:12:52,403 kilosort.clustering_qr DEBUG Center 42 | Xd shape: torch.Size([30240, 72]) | ntemp: 16 2025-10-31 08:12:53,480 kilosort.clustering_qr DEBUG Center 43 | Xd shape: torch.Size([599, 60]) | ntemp: 2 2025-10-31 08:12:53,492 kilosort.clustering_qr DEBUG Center 44 | Xd shape: torch.Size([3388, 72]) | ntemp: 3 2025-10-31 08:12:53,786 kilosort.clustering_qr DEBUG Center 45 | Xd shape: torch.Size([42, 60]) | ntemp: 2 2025-10-31 08:12:53,796 kilosort.clustering_qr DEBUG Center 46 | Xd shape: torch.Size([755, 72]) | ntemp: 3 2025-10-31 08:12:53,806 kilosort.clustering_qr DEBUG Center 47 | Xd shape: torch.Size([1358, 60]) | ntemp: 2 2025-10-31 08:12:54,189 kilosort.clustering_qr DEBUG Center 48 | Xd shape: torch.Size([16671, 60]) | ntemp: 2 2025-10-31 08:12:54,871 kilosort.clustering_qr DEBUG
2025-10-31 08:12:54,872 kilosort.clustering_qr DEBUG Cluster center: 49 (50/96) 2025-10-31 08:12:54,872 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:12:54,872 kilosort.clustering_qr DEBUG CPU usage: 17.70 % 2025-10-31 08:12:54,872 kilosort.clustering_qr DEBUG Mem used: 58.20 % | 18.45 GB 2025-10-31 08:12:54,872 kilosort.clustering_qr DEBUG Mem avail: 13.25 / 31.70 GB 2025-10-31 08:12:54,872 kilosort.clustering_qr DEBUG ------------------------------------------------------ 2025-10-31 08:12:54,873 kilosort.clustering_qr DEBUG GPU usage: conda install pynvml for GPU usage 2025-10-31 08:12:54,873 kilosort.clustering_qr DEBUG GPU memory: 14.59 % | 1.17 / 8.00 GB 2025-10-31 08:12:54,873 kilosort.clustering_qr DEBUG Allocated: 0.13 % | 0.01 / 8.00 GB 2025-10-31 08:12:54,873 kilosort.clustering_qr DEBUG Max alloc: 15.13 % | 1.21 / 8.00 GB 2025-10-31 08:12:54,873 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:12:54,889 kilosort.clustering_qr DEBUG Center 49 | Xd shape: torch.Size([50600, 60]) | ntemp: 4 2025-10-31 08:12:56,529 kilosort.clustering_qr DEBUG Center 50 | Xd shape: torch.Size([25293, 72]) | ntemp: 4 2025-10-31 08:12:57,521 kilosort.clustering_qr DEBUG Center 51 | Xd shape: torch.Size([42455, 72]) | ntemp: 5 2025-10-31 08:12:59,031 kilosort.clustering_qr DEBUG Center 52 | Xd shape: torch.Size([54417, 60]) | ntemp: 2 2025-10-31 08:13:00,734 kilosort.clustering_qr DEBUG Center 53 | Xd shape: torch.Size([76332, 60]) | ntemp: 2 2025-10-31 08:13:02,891 kilosort.clustering_qr DEBUG Center 54 | Xd shape: torch.Size([50138, 60]) | ntemp: 2 2025-10-31 08:13:04,452 kilosort.clustering_qr DEBUG Center 55 | Xd shape: torch.Size([103204, 60]) | ntemp: 5 2025-10-31 08:13:07,247 kilosort.clustering_qr DEBUG Center 56 | Xd shape: torch.Size([232440, 72]) | ntemp: 11 2025-10-31 08:13:13,253 kilosort.clustering_qr DEBUG Center 57 | Xd shape: torch.Size([221073, 72]) | ntemp: 10 2025-10-31 08:13:19,097 kilosort.clustering_qr DEBUG Center 58 | Xd shape: torch.Size([174669, 72]) | ntemp: 14 2025-10-31 08:13:24,079 kilosort.clustering_qr DEBUG
2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG Cluster center: 59 (60/96) 2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG CPU usage: 17.80 % 2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG Mem used: 58.40 % | 18.53 GB 2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG Mem avail: 13.17 / 31.70 GB 2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG ------------------------------------------------------ 2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG GPU usage: conda install pynvml for GPU usage 2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG GPU memory: 14.62 % | 1.17 / 8.00 GB 2025-10-31 08:13:24,080 kilosort.clustering_qr DEBUG Allocated: 0.14 % | 0.01 / 8.00 GB 2025-10-31 08:13:24,081 kilosort.clustering_qr DEBUG Max alloc: 15.13 % | 1.21 / 8.00 GB 2025-10-31 08:13:24,081 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:13:24,115 kilosort.clustering_qr DEBUG Center 59 | Xd shape: torch.Size([194265, 72]) | ntemp: 17 2025-10-31 08:13:29,701 kilosort.clustering_qr DEBUG Center 60 | Xd shape: torch.Size([203171, 72]) | ntemp: 12 2025-10-31 08:13:35,102 kilosort.clustering_qr DEBUG Center 61 | Xd shape: torch.Size([36421, 72]) | ntemp: 4 2025-10-31 08:13:36,391 kilosort.clustering_qr DEBUG Center 62 | Xd shape: torch.Size([46315, 72]) | ntemp: 3 2025-10-31 08:13:37,948 kilosort.clustering_qr DEBUG Center 63 | Xd shape: torch.Size([16787, 72]) | ntemp: 5 2025-10-31 08:13:38,722 kilosort.clustering_qr DEBUG Center 64 | Xd shape: torch.Size([312217, 72]) | ntemp: 6 2025-10-31 08:13:45,882 kilosort.clustering_qr DEBUG Center 65 | Xd shape: torch.Size([11331, 72]) | ntemp: 2 2025-10-31 08:13:46,376 kilosort.clustering_qr DEBUG Center 66 | Xd shape: torch.Size([888, 60]) | ntemp: 3 2025-10-31 08:13:46,413 kilosort.clustering_qr DEBUG Center 67 | Xd shape: torch.Size([213, 72]) | ntemp: 3 2025-10-31 08:13:46,422 kilosort.clustering_qr DEBUG Center 68 | Xd shape: torch.Size([64, 60]) | ntemp: 2 2025-10-31 08:13:46,424 kilosort.clustering_qr DEBUG
2025-10-31 08:13:46,424 kilosort.clustering_qr DEBUG Cluster center: 69 (70/96) 2025-10-31 08:13:46,424 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:13:46,424 kilosort.clustering_qr DEBUG CPU usage: 17.70 % 2025-10-31 08:13:46,424 kilosort.clustering_qr DEBUG Mem used: 58.60 % | 18.58 GB 2025-10-31 08:13:46,424 kilosort.clustering_qr DEBUG Mem avail: 13.12 / 31.70 GB 2025-10-31 08:13:46,424 kilosort.clustering_qr DEBUG ------------------------------------------------------ 2025-10-31 08:13:46,424 kilosort.clustering_qr DEBUG GPU usage: conda install pynvml for GPU usage 2025-10-31 08:13:46,425 kilosort.clustering_qr DEBUG GPU memory: 14.59 % | 1.17 / 8.00 GB 2025-10-31 08:13:46,425 kilosort.clustering_qr DEBUG Allocated: 0.13 % | 0.01 / 8.00 GB 2025-10-31 08:13:46,425 kilosort.clustering_qr DEBUG Max alloc: 15.13 % | 1.21 / 8.00 GB 2025-10-31 08:13:46,425 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:13:46,434 kilosort.clustering_qr DEBUG Center 69 | Xd shape: torch.Size([87, 60]) | ntemp: 2 2025-10-31 08:13:46,445 kilosort.clustering_qr DEBUG Center 70 | Xd shape: torch.Size([34171, 60]) | ntemp: 2 2025-10-31 08:13:47,587 kilosort.clustering_qr DEBUG Center 71 | Xd shape: torch.Size([21909, 60]) | ntemp: 3 2025-10-31 08:13:48,427 kilosort.clustering_qr DEBUG Center 72 | Xd shape: torch.Size([168550, 60]) | ntemp: 3 2025-10-31 08:13:52,790 kilosort.clustering_qr DEBUG Center 73 | Xd shape: torch.Size([159264, 72]) | ntemp: 6 2025-10-31 08:13:57,171 kilosort.clustering_qr DEBUG Center 74 | Xd shape: torch.Size([251005, 72]) | ntemp: 13 2025-10-31 08:14:03,674 kilosort.clustering_qr DEBUG Center 75 | Xd shape: torch.Size([268498, 72]) | ntemp: 9 2025-10-31 08:14:10,745 kilosort.clustering_qr DEBUG Center 76 | Xd shape: torch.Size([109291, 72]) | ntemp: 6 2025-10-31 08:14:14,089 kilosort.clustering_qr DEBUG Center 77 | Xd shape: torch.Size([446250, 72]) | ntemp: 26 2025-10-31 08:14:24,878 kilosort.clustering_qr DEBUG Center 78 | Xd shape: torch.Size([616193, 72]) | ntemp: 28 2025-10-31 08:14:39,150 kilosort.clustering_qr DEBUG
2025-10-31 08:14:39,150 kilosort.clustering_qr DEBUG Cluster center: 79 (80/96) 2025-10-31 08:14:39,151 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:14:39,151 kilosort.clustering_qr DEBUG CPU usage: 19.90 % 2025-10-31 08:14:39,152 kilosort.clustering_qr DEBUG Mem used: 59.10 % | 18.73 GB 2025-10-31 08:14:39,152 kilosort.clustering_qr DEBUG Mem avail: 12.97 / 31.70 GB 2025-10-31 08:14:39,152 kilosort.clustering_qr DEBUG ------------------------------------------------------ 2025-10-31 08:14:39,152 kilosort.clustering_qr DEBUG GPU usage: conda install pynvml for GPU usage 2025-10-31 08:14:39,152 kilosort.clustering_qr DEBUG GPU memory: 14.59 % | 1.17 / 8.00 GB 2025-10-31 08:14:39,152 kilosort.clustering_qr DEBUG Allocated: 0.16 % | 0.01 / 8.00 GB 2025-10-31 08:14:39,152 kilosort.clustering_qr DEBUG Max alloc: 21.03 % | 1.68 / 8.00 GB 2025-10-31 08:14:39,152 kilosort.clustering_qr DEBUG ******************************************************** 2025-10-31 08:14:39,214 kilosort.clustering_qr DEBUG Center 79 | Xd shape: torch.Size([395169, 72]) | ntemp: 18 2025-10-31 08:14:48,963 kilosort.clustering_qr DEBUG Center 80 | Xd shape: torch.Size([363756, 60]) | ntemp: 5 2025-10-31 08:14:57,186 kilosort.clustering_qr DEBUG Center 81 | Xd shape: torch.Size([40142, 72]) | ntemp: 3 2025-10-31 08:14:58,486 kilosort.clustering_qr DEBUG Center 82 | Xd shape: torch.Size([22580, 72]) | ntemp: 9 2025-10-31 08:14:59,339 kilosort.clustering_qr DEBUG Center 83 | Xd shape: torch.Size([348459, 72]) | ntemp: 11 2025-10-31 08:15:07,298 kilosort.clustering_qr DEBUG Center 84 | Xd shape: torch.Size([4615, 72]) | ntemp: 4 2025-10-31 08:15:07,616 kilosort.clustering_qr DEBUG Center 85 | Xd shape: torch.Size([211, 60]) | ntemp: 2 2025-10-31 08:15:07,627 kilosort.clustering_qr DEBUG Center 86 | Xd shape: torch.Size([810, 72]) | ntemp: 3 2025-10-31 08:15:07,636 kilosort.clustering_qr DEBUG Center 87 | Xd shape: torch.Size([2314, 60]) | ntemp: 2 2025-10-31 08:15:08,168 kilosort.clustering_qr ERROR Error in clustering_qr.run on center 87 Traceback (most recent call last): File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\clustering_qr.py", line 509, in run xtree, tstat = swarmsplitter.split( File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\swarmsplitter.py", line 105, in split criterion = refractoriness(meta[ix1],meta[ix2]) File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\swarmsplitter.py", line 65, in refractoriness is_refractory = check_CCG(st1, st2)[1] File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\swarmsplitter.py", line 57, in check_CCG R12, Q12, Q00 = CCG_metrics(st1, st2, K, T, nbins = nbins, tbin = tbin) File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\CCG.py", line 44, in CCG_metrics R00 = K[irange1].sum() / (len(irange1) * tbin * len(st1) * len(st2) /T) ZeroDivisionError: float division by zero 2025-10-31 08:15:08,170 kilosort.clustering_qr DEBUG Xd shape: torch.Size([2314, 60]) 2025-10-31 08:15:08,170 kilosort.clustering_qr DEBUG Nfilt: 1 2025-10-31 08:15:08,170 kilosort.clustering_qr DEBUG num spikes: 9497554 2025-10-31 08:15:08,170 kilosort.clustering_qr DEBUG iclust shape: (2314,) 2025-10-31 08:15:08,171 kilosort.run_kilosort ERROR Encountered error in run_kilosort: Traceback (most recent call last): File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\run_kilosort.py", line 308, in _sort clu, Wall, st, tF = cluster_spikes( File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\run_kilosort.py", line 884, in cluster_spikes clu, Wall = clustering_qr.run( File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\clustering_qr.py", line 509, in run xtree, tstat = swarmsplitter.split( File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\swarmsplitter.py", line 105, in split criterion = refractoriness(meta[ix1],meta[ix2]) File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\swarmsplitter.py", line 65, in refractoriness is_refractory = check_CCG(st1, st2)[1] File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\swarmsplitter.py", line 57, in check_CCG R12, Q12, Q00 = CCG_metrics(st1, st2, K, T, nbins = nbins, tbin = tbin) File "C:\Users\Chelsea\miniconda3\envs\ks4_ece\lib\site-packages\kilosort\CCG.py", line 44, in CCG_metrics R00 = K[irange1].sum() / (len(irange1) * tbin * len(st1) * len(st2) /T) ZeroDivisionError: float division by zero

Version information:

Kilosort version 4.1.1
Python version 3.9.21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions