@@ -388,22 +388,22 @@ def _setup_json_probe_map(cls, recording, sorter_output_folder):
388388 """Create a JSON probe map file for Kilosort4."""
389389 from kilosort .io import save_probe
390390 import numpy as np
391-
391+
392392 groups = recording .get_channel_groups ()
393393 positions = np .array (recording .get_channel_locations ())
394394 if positions .shape [1 ] != 2 :
395395 raise RuntimeError ("3D 'location' are not supported. Set 2D locations instead." )
396-
396+
397397 nchan = recording .get_num_channels ()
398398 xcoords = ([p [0 ] for p in positions ],)
399399 ycoords = ([p [1 ] for p in positions ],)
400400 kcoords = (groups ,)
401-
401+
402402 probe = {
403- ' chanMap' : np .arange (nchan ),
404- 'xc' : np .array (xcoords [0 ]).astype (float ).squeeze (),
405- 'yc' : np .array (ycoords [0 ]).astype (float ).squeeze (),
406- ' kcoords' : np .array (kcoords ).astype (float ).squeeze (),
407- ' n_chan' : nchan ,
408- }
409- save_probe (probe , str (sorter_output_folder / "chanMap.json" ))
403+ " chanMap" : np .arange (nchan ),
404+ "xc" : np .array (xcoords [0 ]).astype (float ).squeeze (),
405+ "yc" : np .array (ycoords [0 ]).astype (float ).squeeze (),
406+ " kcoords" : np .array (kcoords ).astype (float ).squeeze (),
407+ " n_chan" : nchan ,
408+ }
409+ save_probe (probe , str (sorter_output_folder / "chanMap.json" ))
0 commit comments