Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 35 additions & 5 deletions element_array_ephys/ephys_no_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,30 @@ def make_fetch(self, key):
electrode_query &= f"electrode IN {tuple(probe_info['used_electrodes'])}"

lfp_indices = np.array(electrode_query.fetch("channel_idx"), dtype=int)

electrode_df = electrode_query.fetch(format="frame").reset_index()

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

return file_paths, lfp_indices, probe_info, electrode_df, execution_time
return (
file_paths,
lfp_indices,
probe_info,
electrode_df,
execution_time,
duration,
)

def make_compute(self, key, file_paths, lfp_indices, probe_info, electrode_df, execution_time):
def make_compute(
self,
key,
file_paths,
lfp_indices,
probe_info,
electrode_df,
execution_time,
duration,
):
"""Compute broadband LFP signals for each electrode.

Args:
Expand Down Expand Up @@ -395,9 +411,23 @@ def make_compute(self, key, file_paths, lfp_indices, probe_info, electrode_df, e
lfp = signal.decimate(lfp, downsample_factor, ftype="fir", zero_phase=True)
all_lfps.append(lfp)

return all_lfps, channels, electrode_df, channel_to_electrode_map, execution_time
return (
all_lfps,
channels,
electrode_df,
channel_to_electrode_map,
execution_time,
)

def make_insert(self, key, all_lfps, channels, electrode_df, channel_to_electrode_map, execution_time):
def make_insert(
self,
key,
all_lfps,
channels,
electrode_df,
channel_to_electrode_map,
execution_time,
):
self.insert1(
{
**key,
Expand Down