Skip to content

Commit af984b8

Browse files
authored
Merge pull request #219 from datajoint/main
Pull from `main`
2 parents 4402567 + 1d4f888 commit af984b8

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
## [0.4.2] - 2025-03-25
7+
8+
+ Fix - Add key_source to `ProbeLevelReport` to filter for 'good' quality units
9+
610
## [0.4.1] - 2025-02-13
711

812
+ Fix - Auto generate ProbeInsertion allows duplicate probes (e.g. probe reuse)

element_array_ephys/ephys_report.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ class ProbeLevelReport(dj.Computed):
5050
---
5151
drift_map_plot: attach
5252
"""
53+
54+
@property
55+
def key_source(self):
56+
return ephys.CuratedClustering & (
57+
ephys.CuratedClustering.Unit & "cluster_quality_label='good'"
58+
)
5359

5460
def make(self, key):
5561
from .plotting.probe_level import plot_driftmap

element_array_ephys/spike_sorting/si_spike_sorting.py

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

320320
postprocessing_params = params["SI_POSTPROCESSING_PARAMS"]
321321

322-
job_kwargs = postprocessing_params.get(
322+
job_kwargs = postprocessing_params.pop(
323323
"job_kwargs", {"n_jobs": -1, "chunk_duration": "1s"}
324324
)
325325

@@ -429,7 +429,7 @@ def make(self, key):
429429

430430
postprocessing_params = params["SI_POSTPROCESSING_PARAMS"]
431431

432-
job_kwargs = postprocessing_params.get(
432+
job_kwargs = postprocessing_params.pop(
433433
"job_kwargs", {"n_jobs": -1, "chunk_duration": "1s"}
434434
)
435435

@@ -446,6 +446,8 @@ def _export_to_phy():
446446
sorting_analyzer=sorting_analyzer,
447447
output_folder=analyzer_output_dir / "phy",
448448
use_relative_path=True,
449+
remove_if_exists=True,
450+
copy_binary=True,
449451
**job_kwargs,
450452
)
451453

@@ -458,6 +460,7 @@ def _export_report():
458460
si.exporters.export_report(
459461
sorting_analyzer=sorting_analyzer,
460462
output_folder=analyzer_output_dir / "spikeinterface_report",
463+
remove_if_exists=True,
461464
**job_kwargs,
462465
)
463466

element_array_ephys/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Package metadata."""
22

3-
__version__ = "0.4.1"
3+
__version__ = "0.4.2"

0 commit comments

Comments
 (0)