@@ -286,10 +286,10 @@ class EphysRecording(dj.Imported):
286
286
class Channel (dj .Part ):
287
287
definition = """
288
288
-> master
289
- channel_idx: int # channel index
289
+ channel_idx: int # channel index (index of the raw data)
290
290
---
291
291
-> probe.ElectrodeConfig.Electrode
292
- channel_name="": varchar(64)
292
+ channel_name="": varchar(64) # alias of the channel
293
293
"""
294
294
295
295
class EphysFile (dj .Part ):
@@ -1033,14 +1033,9 @@ def make(self, key):
1033
1033
) * (dj .U ("electrode" , "channel_idx" ) & EphysRecording .Channel )
1034
1034
1035
1035
channel_info = electrode_query .fetch (as_dict = True , order_by = "channel_idx" )
1036
-
1037
1036
channel_info : dict [int , dict ] = {
1038
1037
ch .pop ("channel_idx" ): ch for ch in channel_info
1039
1038
}
1040
-
1041
- channel2electrode_map = dict (
1042
- zip (* electrode_query .fetch ("channel_idx" , "electrode" ))
1043
- ) # {channel: electrode}
1044
1039
1045
1040
# Get unit id to quality label mapping
1046
1041
try :
@@ -1056,15 +1051,16 @@ def make(self, key):
1056
1051
] = cluster_quality_label_map .set_index ("cluster_id" )[
1057
1052
"KSLabel"
1058
1053
].to_dict () # {unit: quality_label}
1059
-
1054
+
1055
+ # Get electrode where peak unit activity is recorded
1060
1056
peak_electrode_ind = np .array (
1061
1057
[
1062
1058
channel_info [unit_peak_channel_map [unit_id ]]["electrode" ]
1063
1059
for unit_id in si_sorting .unit_ids
1064
1060
]
1065
- ) # get the electrode where peak unit activity is recorded
1061
+ )
1066
1062
1067
- # Get channel to depth mapping
1063
+ # Get channel depth
1068
1064
channel_depth_ind = np .array (
1069
1065
[
1070
1066
channel_info [unit_peak_channel_map [unit_id ]]["y_coord" ]
@@ -1707,7 +1703,7 @@ def get_openephys_probe_data(ephys_recording_key: dict) -> list:
1707
1703
1708
1704
def get_neuropixels_channel2electrode_map (
1709
1705
ephys_recording_key : dict , acq_software : str
1710
- ) -> dict :
1706
+ ) -> dict : #TODO: remove this function
1711
1707
"""Get the channel map for neuropixels probe."""
1712
1708
if acq_software == "SpikeGLX" :
1713
1709
spikeglx_meta_filepath = get_spikeglx_meta_filepath (ephys_recording_key )
0 commit comments