Skip to content

Commit d055cf1

Browse files
committed
fix(LFP): minor bugfix & black formatting
1 parent 05cd8d9 commit d055cf1

1 file changed

Lines changed: 35 additions & 5 deletions

File tree

element_array_ephys/ephys_no_curation.py

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,30 @@ def make_fetch(self, key):
288288
electrode_query &= f"electrode IN {tuple(probe_info['used_electrodes'])}"
289289

290290
lfp_indices = np.array(electrode_query.fetch("channel_idx"), dtype=int)
291-
291+
292292
electrode_df = electrode_query.fetch(format="frame").reset_index()
293293

294294
file_paths = query.fetch("file_path", order_by="file_time")
295295

296-
return file_paths, lfp_indices, probe_info, electrode_df, execution_time
296+
return (
297+
file_paths,
298+
lfp_indices,
299+
probe_info,
300+
electrode_df,
301+
execution_time,
302+
duration,
303+
)
297304

298-
def make_compute(self, key, file_paths, lfp_indices, probe_info, electrode_df, execution_time):
305+
def make_compute(
306+
self,
307+
key,
308+
file_paths,
309+
lfp_indices,
310+
probe_info,
311+
electrode_df,
312+
execution_time,
313+
duration,
314+
):
299315
"""Compute broadband LFP signals for each electrode.
300316
301317
Args:
@@ -395,9 +411,23 @@ def make_compute(self, key, file_paths, lfp_indices, probe_info, electrode_df, e
395411
lfp = signal.decimate(lfp, downsample_factor, ftype="fir", zero_phase=True)
396412
all_lfps.append(lfp)
397413

398-
return all_lfps, channels, electrode_df, channel_to_electrode_map, execution_time
414+
return (
415+
all_lfps,
416+
channels,
417+
electrode_df,
418+
channel_to_electrode_map,
419+
execution_time,
420+
)
399421

400-
def make_insert(self, key, all_lfps, channels, electrode_df, channel_to_electrode_map, execution_time):
422+
def make_insert(
423+
self,
424+
key,
425+
all_lfps,
426+
channels,
427+
electrode_df,
428+
channel_to_electrode_map,
429+
execution_time,
430+
):
401431
self.insert1(
402432
{
403433
**key,

0 commit comments

Comments
 (0)