Concatenated raws lose combined annotations extras lists.
When concatenating or appending raws, the final raw object contains annotations with correct onsets but without the extras list associated with the annotations.
raw_2.annotations.append([1.0], [1.0], 'stim', extras=[dict(response=1, react_time=0.5)]
raw.append([raw_2])
print(raw.annotations) # => annotations 1 segment 'stim'
print(raw.annotations.extras) # => [{}]
It seems the issue lies in annotations.py/_combine_annotations function where it doesn't handle the extras between the two annots objects and construct the new returned object without the extras keyword argument.
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴
Hi! Thanks for reporting this and pointing to _combine_annotations. If no one is currently working on this, I would love to take it up! I can look into merging the extras lists properly in _combine_annotations and add a test case to prevent regression. Could you please assign this to me?