Skip to content

Commit 07a09f6

Browse files
committed
chore: code clean up
1 parent 06a3f70 commit 07a09f6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

element_array_ephys/spike_sorting/si_spike_sorting.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ def make(self, key):
8080
sorter_name = clustering_method.replace(".", "_")
8181

8282
for required_key in (
83-
"SI_SORTING_PARAMS",
8483
"SI_PREPROCESSING_METHOD",
84+
"SI_SORTING_PARAMS",
8585
"SI_POSTPROCESSING_PARAMS",
86-
"SI_WAVEFORM_EXTRACTION_PARAMS",
87-
"SI_QUALITY_METRICS_PARAMS",
8886
):
8987
if required_key not in params:
9088
raise ValueError(
@@ -256,6 +254,10 @@ def make(self, key):
256254
sorting_file, base_folder=output_dir
257255
)
258256

257+
job_kwargs = params["SI_POSTPROCESSING_PARAMS"].get(
258+
"job_kwargs", {"n_jobs": -1, "chunk_duration": "1s"}
259+
)
260+
259261
# Sorting Analyzer
260262
analyzer_output_dir = output_dir / sorter_name / "sorting_analyzer"
261263
if (analyzer_output_dir / "extensions").exists():
@@ -268,14 +270,12 @@ def make(self, key):
268270
folder=analyzer_output_dir,
269271
sparse=True,
270272
overwrite=True,
273+
**job_kwargs
271274
)
272275

273-
job_kwargs = params["SI_POSTPROCESSING_PARAMS"].get(
274-
"job_kwargs", {"n_jobs": -1, "chunk_duration": "1s"}
275-
)
276-
extensions_params = params["SI_POSTPROCESSING_PARAMS"].get("extensions", {})
277276
# The order of extension computation is drawn from sorting_analyzer.get_computable_extensions()
278277
# each extension is parameterized by params specified in extensions_params dictionary (skip if not specified)
278+
extensions_params = params["SI_POSTPROCESSING_PARAMS"].get("extensions", {})
279279
extensions_to_compute = {
280280
ext_name: extensions_params[ext_name]
281281
for ext_name in sorting_analyzer.get_computable_extensions()

0 commit comments

Comments
 (0)