Skip to content

Commit

Permalink
fix: channel mapping for waveform extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
ttngu207 committed Apr 8, 2024
1 parent f723c67 commit a42c9f3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions element_array_ephys/ephys_organoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,10 +908,8 @@ def make(self, key):
)
electrode_query &= f'electrode IN {tuple(probe_info["used_electrodes"])}'

channel_info = electrode_query.fetch(as_dict=True, order_by="channel_idx")
channel_info: dict[int, dict] = {
ch.pop("channel_idx"): key | ch for ch in channel_info
} # e.g., {0: {'organoid_id': 'O09',
channel_info = electrode_query.fetch(as_dict=True, order_by="electrode")
channel_info: dict[int, dict] = {ch_idx: ch for ch_idx, ch in enumerate(channel_info)}

waveform_dir = output_dir / sorter_name / "waveform"
if not waveform_dir.exists():
Expand Down

0 comments on commit a42c9f3

Please sign in to comment.