Closed DanEgert closed 6 months ago
This error disappeared when I first saved the probe dictionary to .json and loaded it, before passing it to run_kilosort. probe = { 'chanMap': chanMap, 'xc': xc, 'yc': yc, 'kcoords': kcoords, 'n_chan': n_chan } save_probe(probe, 'dan_probe_ks4.json') load_probe = load_probe('dan_probe_ks4.json') ops, st, clu, tF, Wall, similar_templates, is_ref, est_contam_rate = \ run_kilosort(settings=settings, probe=load_probe, filename=recording_file)
Thanks, that's helpful.
This is fixed now with the latest code changes, I'll have it added to pip soon.
Describe the issue:
my sort aborted during template extraction i'm using a custom probe dictionary. there might be an issue with the data type i defined the xc and yc coordinates in.
---> 59 yp[:,1] -= shifts 61 xp = torch.from_numpy(xp).to(device) 62 yp = torch.from_numpy(yp).to(device)
UFuncTypeError: Cannot cast ufunc 'subtract' output from dtype('float64') to dtype('int32') with casting rule 'same_kind'
Reproduce the bug:
Error message:
Version information:
kilosort4 v4.0.6
Context for the issue:
No response
Experiment information:
No response