Skip to content

Commit

Permalink
apply black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JaerongA committed Mar 22, 2024
1 parent a3426eb commit 333f411
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 30 deletions.
20 changes: 12 additions & 8 deletions element_array_ephys/ephys_acute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
),
}
)

Expand Down
20 changes: 12 additions & 8 deletions element_array_ephys/ephys_chronic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
),
}
)

Expand Down
8 changes: 5 additions & 3 deletions element_array_ephys/ephys_no_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
20 changes: 12 additions & 8 deletions element_array_ephys/ephys_precluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
),
}
)

Expand Down
8 changes: 5 additions & 3 deletions element_array_ephys/ephys_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
]
)
Expand Down
1 change: 1 addition & 0 deletions element_array_ephys/probe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Neuropixels Probes
"""

import datajoint as dj

from .readers import probe_geometry
Expand Down
1 change: 1 addition & 0 deletions element_array_ephys/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""Package metadata."""

__version__ = "0.3.4"

0 comments on commit 333f411

Please sign in to comment.