From 333f4118ecbf3eee348fa3671b7da3249302167b Mon Sep 17 00:00:00 2001 From: JaerongA Date: Fri, 22 Mar 2024 20:33:42 +0000 Subject: [PATCH] apply black formatting --- element_array_ephys/ephys_acute.py | 20 ++++++++++++-------- element_array_ephys/ephys_chronic.py | 20 ++++++++++++-------- element_array_ephys/ephys_no_curation.py | 8 +++++--- element_array_ephys/ephys_precluster.py | 20 ++++++++++++-------- element_array_ephys/ephys_report.py | 8 +++++--- element_array_ephys/probe.py | 1 + element_array_ephys/version.py | 1 + 7 files changed, 48 insertions(+), 30 deletions(-) diff --git a/element_array_ephys/ephys_acute.py b/element_array_ephys/ephys_acute.py index 0a213db8..c2627fc9 100644 --- a/element_array_ephys/ephys_acute.py +++ b/element_array_ephys/ephys_acute.py @@ -1044,9 +1044,11 @@ def make(self, key): spike_time_key = ( "spike_times_sec_adj" if "spike_times_sec_adj" in kilosort_dataset.data - else "spike_times_sec" - if "spike_times_sec" in kilosort_dataset.data - else "spike_times" + else ( + "spike_times_sec" + if "spike_times_sec" in kilosort_dataset.data + else "spike_times" + ) ) spike_times = kilosort_dataset.data[spike_time_key] kilosort_dataset.extract_spike_depths() @@ -1081,11 +1083,13 @@ def make(self, key): "spike_sites": spike_sites[ kilosort_dataset.data["spike_clusters"] == unit ], - "spike_depths": spike_depths[ - kilosort_dataset.data["spike_clusters"] == unit - ] - if spike_depths is not None - else None, + "spike_depths": ( + spike_depths[ + kilosort_dataset.data["spike_clusters"] == unit + ] + if spike_depths is not None + else None + ), } ) diff --git a/element_array_ephys/ephys_chronic.py b/element_array_ephys/ephys_chronic.py index 10a492fd..772e885f 100644 --- a/element_array_ephys/ephys_chronic.py +++ b/element_array_ephys/ephys_chronic.py @@ -973,9 +973,11 @@ def make(self, key): spike_time_key = ( "spike_times_sec_adj" if "spike_times_sec_adj" in kilosort_dataset.data - else "spike_times_sec" - if "spike_times_sec" in kilosort_dataset.data - else "spike_times" + else ( + "spike_times_sec" + if "spike_times_sec" in kilosort_dataset.data + else "spike_times" + ) ) spike_times = kilosort_dataset.data[spike_time_key] kilosort_dataset.extract_spike_depths() @@ -1010,11 +1012,13 @@ def make(self, key): "spike_sites": spike_sites[ kilosort_dataset.data["spike_clusters"] == unit ], - "spike_depths": spike_depths[ - kilosort_dataset.data["spike_clusters"] == unit - ] - if spike_depths is not None - else None, + "spike_depths": ( + spike_depths[ + kilosort_dataset.data["spike_clusters"] == unit + ] + if spike_depths is not None + else None + ), } ) diff --git a/element_array_ephys/ephys_no_curation.py b/element_array_ephys/ephys_no_curation.py index 4d052169..856ddfeb 100644 --- a/element_array_ephys/ephys_no_curation.py +++ b/element_array_ephys/ephys_no_curation.py @@ -988,9 +988,11 @@ def make(self, key): spike_time_key = ( "spike_times_sec_adj" if "spike_times_sec_adj" in kilosort_dataset.data - else "spike_times_sec" - if "spike_times_sec" in kilosort_dataset.data - else "spike_times" + else ( + "spike_times_sec" + if "spike_times_sec" in kilosort_dataset.data + else "spike_times" + ) ) spike_times = kilosort_dataset.data[spike_time_key] kilosort_dataset.extract_spike_depths() diff --git a/element_array_ephys/ephys_precluster.py b/element_array_ephys/ephys_precluster.py index 8c573a4c..4d52c610 100644 --- a/element_array_ephys/ephys_precluster.py +++ b/element_array_ephys/ephys_precluster.py @@ -962,9 +962,11 @@ def make(self, key): spike_time_key = ( "spike_times_sec_adj" if "spike_times_sec_adj" in kilosort_dataset.data - else "spike_times_sec" - if "spike_times_sec" in kilosort_dataset.data - else "spike_times" + else ( + "spike_times_sec" + if "spike_times_sec" in kilosort_dataset.data + else "spike_times" + ) ) spike_times = kilosort_dataset.data[spike_time_key] kilosort_dataset.extract_spike_depths() @@ -999,11 +1001,13 @@ def make(self, key): "spike_sites": spike_sites[ kilosort_dataset.data["spike_clusters"] == unit ], - "spike_depths": spike_depths[ - kilosort_dataset.data["spike_clusters"] == unit - ] - if spike_depths is not None - else None, + "spike_depths": ( + spike_depths[ + kilosort_dataset.data["spike_clusters"] == unit + ] + if spike_depths is not None + else None + ), } ) diff --git a/element_array_ephys/ephys_report.py b/element_array_ephys/ephys_report.py index ce8f6cad..48bcf613 100644 --- a/element_array_ephys/ephys_report.py +++ b/element_array_ephys/ephys_report.py @@ -75,9 +75,11 @@ def make(self, key): fig_prefix = ( "-".join( [ - v.strftime("%Y%m%d%H%M%S") - if isinstance(v, datetime.datetime) - else str(v) + ( + v.strftime("%Y%m%d%H%M%S") + if isinstance(v, datetime.datetime) + else str(v) + ) for v in key.values() ] ) diff --git a/element_array_ephys/probe.py b/element_array_ephys/probe.py index f0aa4ddd..d1fa59c6 100644 --- a/element_array_ephys/probe.py +++ b/element_array_ephys/probe.py @@ -1,6 +1,7 @@ """ Neuropixels Probes """ + import datajoint as dj from .readers import probe_geometry diff --git a/element_array_ephys/version.py b/element_array_ephys/version.py index 769086f3..148bac24 100644 --- a/element_array_ephys/version.py +++ b/element_array_ephys/version.py @@ -1,2 +1,3 @@ """Package metadata.""" + __version__ = "0.3.4"