Skip to content

Commit 58cdfaa

Browse files
committed
chore: minor code optimization
1 parent 80926c8 commit 58cdfaa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

element_array_ephys/spike_sorting/si_spike_sorting.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def make(self, key):
275275

276276
postprocessing_params = params["SI_POSTPROCESSING_PARAMS"]
277277

278-
job_kwargs = postprocessing_params.get(
278+
job_kwargs = postprocessing_params.pop(
279279
"job_kwargs", {"n_jobs": -1, "chunk_duration": "1s"}
280280
)
281281

@@ -366,7 +366,7 @@ def make(self, key):
366366

367367
postprocessing_params = params["SI_POSTPROCESSING_PARAMS"]
368368

369-
job_kwargs = postprocessing_params.get(
369+
job_kwargs = postprocessing_params.pop(
370370
"job_kwargs", {"n_jobs": -1, "chunk_duration": "1s"}
371371
)
372372

@@ -383,6 +383,8 @@ def _export_to_phy():
383383
sorting_analyzer=sorting_analyzer,
384384
output_folder=analyzer_output_dir / "phy",
385385
use_relative_path=True,
386+
remove_if_exists=True,
387+
copy_binary=True,
386388
**job_kwargs,
387389
)
388390

@@ -395,6 +397,7 @@ def _export_report():
395397
si.exporters.export_report(
396398
sorting_analyzer=sorting_analyzer,
397399
output_folder=analyzer_output_dir / "spikeinterface_report",
400+
remove_if_exists=True,
398401
**job_kwargs,
399402
)
400403

0 commit comments

Comments
 (0)