File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -597,10 +597,17 @@ def _parse_header(self):
597597 for c in range (spike_channels .size ):
598598 st_ann = seg_ann ["spikes" ][c ]
599599 channel_id , unit_id = self .internal_unit_ids [c ]
600- unit_tag = {0 : "unclassified" , 255 : "noise" }.get (unit_id , str (unit_id ))
601600 st_ann ["channel_id" ] = channel_id
602601 st_ann ["unit_id" ] = unit_id
603- st_ann ["unit_tag" ] = unit_tag
602+ if unit_id == 0 :
603+ st_ann ["unit_classification" ] = "unclassified"
604+ elif 1 <= unit_id <= 16 :
605+ st_ann ["unit_classification" ] = "sorted"
606+ elif unit_id == 255 :
607+ st_ann ["unit_classification" ] = "noise"
608+ else : # 17-254 are reserved
609+ st_ann ["unit_classification" ] = "reserved"
610+ st_ann ['unit_tag' ] = st_ann ['unit_classification' ]
604611 st_ann ["description" ] = f"SpikeTrain channel_id: { channel_id } , unit_id: { unit_id } "
605612 st_ann ["file_origin" ] = self ._filenames ["nev" ] + ".nev"
606613
You can’t perform that action at this time.
0 commit comments