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):
597
597
for c in range (spike_channels .size ):
598
598
st_ann = seg_ann ["spikes" ][c ]
599
599
channel_id , unit_id = self .internal_unit_ids [c ]
600
- unit_tag = {0 : "unclassified" , 255 : "noise" }.get (unit_id , str (unit_id ))
601
600
st_ann ["channel_id" ] = channel_id
602
601
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' ]
604
611
st_ann ["description" ] = f"SpikeTrain channel_id: { channel_id } , unit_id: { unit_id } "
605
612
st_ann ["file_origin" ] = self ._filenames ["nev" ] + ".nev"
606
613
You can’t perform that action at this time.
0 commit comments