beacon-biosignals / OndaEDF.jl

utilities for importing/exporting EDF Files to/from Onda datasets
Other
3 stars 2 forks source link

export assumes `value` field is present in the annotations #54

Open kleinschmidt opened 2 years ago

kleinschmidt commented 2 years ago

In the brave new world of Legolas schemas for annotations, the annotations table is only required to have recording, id, and span columns. Previous iterations of Beacon's annotation format also had a value field, but that's no longer universally true. The current export code fails on those tables (where the relevant "value" information is recorded in a field with a different name). I think what we should do is

From a very quick perusal of the code, the same schema could be used for both (the import puts the the zero or more strings in .annotations field of the EDF annotation into the value field of one or more Onda.Annotations), so we could define

Legolas.@row("edf.annotation@1" > "onda.annotation@1", value::String=string(value))