Skip to content

Commit

Permalink
Fix variable naming inconsistency
Browse files Browse the repository at this point in the history
Apply suggested changes
  • Loading branch information
oaaij-gnahz authored Nov 21, 2023
1 parent 89acc59 commit 1badc49
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/spikeinterface/preprocessing/common_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ def __init__(
if groups is not None:
group_indices = [self.ids_to_indices(g) for g in groups]
else:
groups_inds = None
group_indices = None
if ref_channel_ids is not None:
ref_channel_inds = self.ids_to_indices(ref_channel_ids)
else:
ref_channel_inds = None

for parent_segment in recording._recording_segments:
rec_segment = CommonReferenceRecordingSegment(
parent_segment, reference, operator, groups_inds, ref_channel_inds, local_radius, neighbors, dtype_
parent_segment, reference, operator, group_indices, ref_channel_inds, local_radius, neighbors, dtype_
)
self.add_recording_segment(rec_segment)

Expand All @@ -129,7 +129,7 @@ def __init__(
parent_recording_segment,
reference,
operator,
groups_inds,
group_indices,
ref_channel_inds,
local_radius,
neighbors,
Expand All @@ -139,7 +139,7 @@ def __init__(

self.reference = reference
self.operator = operator
self.groups_inds = groups_inds
self.group_indices = group_indices
self.ref_channel_inds = ref_channel_inds
self.local_radius = local_radius
self.neighbors = neighbors
Expand Down Expand Up @@ -185,8 +185,8 @@ def get_traces(self, start_frame, end_frame, channel_indices):
def _groups(self, channel_indices):
selected_groups = []
selected_channels = []
if self.groups_inds:
for chan_inds in self.groups_inds:
if self.group_indices:
for chan_inds in self.group_indices:
sel_inds = [ind for ind in channel_indices if ind in chan_inds]
# if no channels are in a group, do not return the group
if len(sel_inds) > 0:
Expand Down

0 comments on commit 1badc49

Please sign in to comment.