Skip to content

Commit 673faed

Browse files
committed
docs: 📝 update comments in ephys_no_curation
1 parent 86bb8d7 commit 673faed

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

element_array_ephys/ephys_no_curation.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ class EphysRecording(dj.Imported):
286286
class Channel(dj.Part):
287287
definition = """
288288
-> master
289-
channel_idx: int # channel index
289+
channel_idx: int # channel index (index of the raw data)
290290
---
291291
-> probe.ElectrodeConfig.Electrode
292-
channel_name="": varchar(64)
292+
channel_name="": varchar(64) # alias of the channel
293293
"""
294294

295295
class EphysFile(dj.Part):
@@ -1033,14 +1033,9 @@ def make(self, key):
10331033
) * (dj.U("electrode", "channel_idx") & EphysRecording.Channel)
10341034

10351035
channel_info = electrode_query.fetch(as_dict=True, order_by="channel_idx")
1036-
10371036
channel_info: dict[int, dict] = {
10381037
ch.pop("channel_idx"): ch for ch in channel_info
10391038
}
1040-
1041-
channel2electrode_map = dict(
1042-
zip(*electrode_query.fetch("channel_idx", "electrode"))
1043-
) # {channel: electrode}
10441039

10451040
# Get unit id to quality label mapping
10461041
try:
@@ -1056,15 +1051,16 @@ def make(self, key):
10561051
] = cluster_quality_label_map.set_index("cluster_id")[
10571052
"KSLabel"
10581053
].to_dict() # {unit: quality_label}
1059-
1054+
1055+
# Get electrode where peak unit activity is recorded
10601056
peak_electrode_ind = np.array(
10611057
[
10621058
channel_info[unit_peak_channel_map[unit_id]]["electrode"]
10631059
for unit_id in si_sorting.unit_ids
10641060
]
1065-
) # get the electrode where peak unit activity is recorded
1061+
)
10661062

1067-
# Get channel to depth mapping
1063+
# Get channel depth
10681064
channel_depth_ind = np.array(
10691065
[
10701066
channel_info[unit_peak_channel_map[unit_id]]["y_coord"]
@@ -1707,7 +1703,7 @@ def get_openephys_probe_data(ephys_recording_key: dict) -> list:
17071703

17081704
def get_neuropixels_channel2electrode_map(
17091705
ephys_recording_key: dict, acq_software: str
1710-
) -> dict:
1706+
) -> dict: #TODO: remove this function
17111707
"""Get the channel map for neuropixels probe."""
17121708
if acq_software == "SpikeGLX":
17131709
spikeglx_meta_filepath = get_spikeglx_meta_filepath(ephys_recording_key)

0 commit comments

Comments
 (0)