Skip to content

Commit

Permalink
style: black format
Browse files Browse the repository at this point in the history
  • Loading branch information
ttngu207 committed Jan 28, 2025
1 parent 7dee019 commit ba25812
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
13 changes: 10 additions & 3 deletions element_array_ephys/ephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,9 @@ def make(self, key):
sorting_file, base_folder=output_dir
)
if si_sorting_.unit_ids.size == 0:
logger.info(f"No units found in {sorting_file}. Skipping Unit ingestion...")
logger.info(
f"No units found in {sorting_file}. Skipping Unit ingestion..."
)
self.insert1(key)
return

Expand Down Expand Up @@ -1247,7 +1249,9 @@ def make(self, key):

self.insert1(key)
if not len(CuratedClustering.Unit & key):
logger.info(f"No CuratedClustering.Unit found for {key}, skipping Waveform ingestion.")
logger.info(
f"No CuratedClustering.Unit found for {key}, skipping Waveform ingestion."
)
return

# Get channel and electrode-site mapping
Expand Down Expand Up @@ -1303,6 +1307,7 @@ def yield_unit_waveforms():
]

yield unit_peak_waveform, unit_electrode_waveforms

else: # read from kilosort outputs (ecephys pipeline)
kilosort_dataset = kilosort.Kilosort(output_dir)

Expand Down Expand Up @@ -1510,7 +1515,9 @@ def make(self, key):

self.insert1(key)
if not len(CuratedClustering.Unit & key):
logger.info(f"No CuratedClustering.Unit found for {key}, skipping QualityMetrics ingestion.")
logger.info(
f"No CuratedClustering.Unit found for {key}, skipping QualityMetrics ingestion."
)
return

si_sorting_analyzer_dir = output_dir / sorter_name / "sorting_analyzer"
Expand Down
8 changes: 6 additions & 2 deletions element_array_ephys/spike_sorting/si_spike_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ def make(self, key):
def _sorting_analyzer_compute():
if not has_units:
log.info("No units found in sorting object. Skipping sorting analyzer.")
analyzer_output_dir.mkdir(parents=True, exist_ok=True) # create empty directory anyway, for consistency
analyzer_output_dir.mkdir(
parents=True, exist_ok=True
) # create empty directory anyway, for consistency
return

# Sorting Analyzer
Expand All @@ -316,7 +318,9 @@ def _sorting_analyzer_compute():

_sorting_analyzer_compute()

do_si_export = postprocessing_params.get("export_to_phy", False) or postprocessing_params.get("export_report", False)
do_si_export = postprocessing_params.get(
"export_to_phy", False
) or postprocessing_params.get("export_report", False)

self.insert1(
{
Expand Down

0 comments on commit ba25812

Please sign in to comment.