How to store metadata in annotations? Also, How to annotate data in another montage beside the original? Concerns on the file IO.

Hello :waving_hand::waving_hand:

I have two questions about annotations and my biggest concern is how channel management and file IO affects annotations.

First: I want to store some metadata in the annotations. The fields i am interested in, are values like annotator (e.g. Dr X, Nurse Y, AI Model, …), confidence (e.g. 95 %), and ideally type (e.g. Seizure, Eye Blink, …). My current solution is to store them as a json string in the description of annotation. Is there any better solution? I hoped I could subclass the annotations class, but it seems that’s not how it works.

Second: My data is in monopolar montage, but the annotators (doctors and AI model) use bipolar montage for the annotations. If I make a projection like Fp1-Cz from Fp1 and Cz electrodes, then add annotations to it, is there any way to store this annotation and the projection Info (not its calculated data) to a file?

Thanks in advance

I can answer your first question, annotations are just arbitrary text, so there is no standard way to include metadata as annotations. JSON is certainly an option, but personally I’d prefer something simpler (such as a comma separated values string or similar).

1 Like

My point was that we could have a dataclass called annotation, and then annotations could be a list of instances of this dataclass. This would make it possible to easily subclass it and expand its functionality.

Anyways, now thanks to your answer i know my solution isn’t far off. Thank You.