Skip to content

chore: minor code optimization #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions element_array_ephys/spike_sorting/si_spike_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def make(self, key):

postprocessing_params = params["SI_POSTPROCESSING_PARAMS"]

job_kwargs = postprocessing_params.get(
job_kwargs = postprocessing_params.pop(
"job_kwargs", {"n_jobs": -1, "chunk_duration": "1s"}
)

Expand Down Expand Up @@ -366,7 +366,7 @@ def make(self, key):

postprocessing_params = params["SI_POSTPROCESSING_PARAMS"]

job_kwargs = postprocessing_params.get(
job_kwargs = postprocessing_params.pop(
"job_kwargs", {"n_jobs": -1, "chunk_duration": "1s"}
)

Expand All @@ -383,6 +383,8 @@ def _export_to_phy():
sorting_analyzer=sorting_analyzer,
output_folder=analyzer_output_dir / "phy",
use_relative_path=True,
remove_if_exists=True,
copy_binary=True,
**job_kwargs,
)

Expand All @@ -395,6 +397,7 @@ def _export_report():
si.exporters.export_report(
sorting_analyzer=sorting_analyzer,
output_folder=analyzer_output_dir / "spikeinterface_report",
remove_if_exists=True,
**job_kwargs,
)

Expand Down
Loading