File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -138,17 +138,18 @@ def _parse_header(self):
138138
139139 # Loop over list of list of dict and annotate each st
140140 for annotation_list in annotation_lists :
141- clust_key , property_name = tuple (annotation_list [0 ].
142- keys ())
143- if property_name == 'KSLabel' :
144- annotation_name = 'quality'
145- else :
146- annotation_name = property_name .lower ()
147- for annotation_dict in annotation_list :
148- if int (annotation_dict [clust_key ]) == clust_id :
149- spiketrain_an [annotation_name ] = \
150- annotation_dict [property_name ]
151- break
141+ clust_key , * property_names = tuple (annotation_list [0 ].
142+ keys ())
143+ for property_name in property_names :
144+ if property_name == 'KSLabel' :
145+ annotation_name = 'quality'
146+ else :
147+ annotation_name = property_name .lower ()
148+ for annotation_dict in annotation_list :
149+ if int (annotation_dict [clust_key ]) == clust_id :
150+ spiketrain_an [annotation_name ] = \
151+ annotation_dict [property_name ]
152+ break
152153
153154 def _segment_t_start (self , block_index , seg_index ):
154155 assert block_index == 0
You can’t perform that action at this time.
0 commit comments