|
@@ -758,9 +758,15 @@ class ReachGraspIO(BlackrockIO):
|
|
|
events.array_annotate(belongs_to_trialtype=belongs_to_trialtype)
|
|
|
|
|
|
# add modified trial_performance_codes to annotations
|
|
|
- performance_in_trial = [
|
|
|
- trialsequence[tid] for tid in trial_timestamp_ID]
|
|
|
+ performance_in_trial = [trialsequence[tid] for tid in trial_timestamp_ID]
|
|
|
+ performance_in_trial_str = []
|
|
|
+ for pit in performance_in_trial:
|
|
|
+ if pit in self.performance_str:
|
|
|
+ performance_in_trial_str.append(self.performance_str[pit])
|
|
|
+ else:
|
|
|
+ performance_in_trial_str.append('unknown')
|
|
|
events.array_annotate(performance_in_trial=performance_in_trial)
|
|
|
+ events.array_annotate(performance_in_trial_str=performance_in_trial_str)
|
|
|
|
|
|
def __annotate_units_with_odml(self, units):
|
|
|
"""
|
|
@@ -1440,6 +1446,10 @@ class ReachGraspIO(BlackrockIO):
|
|
|
self.__annotate_channelindex_with_odml(chidx)
|
|
|
self.__annotate_units_with_odml(chidx.units)
|
|
|
|
|
|
+ for chidx in bl.channel_indexes:
|
|
|
+ if isinstance(chidx.index, int):
|
|
|
+ chidx.index = [chidx.index]
|
|
|
+
|
|
|
return bl
|
|
|
|
|
|
def read_segment(
|
|
@@ -1523,6 +1533,7 @@ class ReachGraspIO(BlackrockIO):
|
|
|
cascade=cascade)
|
|
|
|
|
|
for asig in seg.analogsignals:
|
|
|
+ asig.name = str(asig.name)
|
|
|
self.__annotate_analogsignals_with_odml(asig)
|
|
|
if correct_filter_shifts:
|
|
|
self.__correct_filter_shifts(asig)
|