Skip to content

Commit 6337959

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6661cc9 commit 6337959

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/spikeinterface/sorters/external/kilosort4.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)