Skip to content

Concatenated raws lose combined annotations extras lists. #14022

Description

@KareemShalabi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions