beacon-biosignals / OndaEDF.jl

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

EDF-to-EDF roundtrip results in different annotations #73

Open a-cakir opened 1 year ago

a-cakir commented 1 year ago

I generated test edf data using the make_test_data function (slightly modified version of that), saved the resulting EDF to disk, and reread it and compared to two. The annotations were different as shown below.

The read EDF has extra two empty annotations per row.

julia> edf_read.signals[3].records
5-element Vector{Vector{EDF.TimestampedAnnotationList}}:
 [EDF.TimestampedAnnotationList(1.0, 2.0, ["annot", "", "1", "", "1"])]
 [EDF.TimestampedAnnotationList(2.0, 3.0, ["annot", "", "2", "", "2"])]
 [EDF.TimestampedAnnotationList(3.0, 4.0, ["annot", "", "3", "", "3"])]
 [EDF.TimestampedAnnotationList(4.0, 5.0, ["annot", "", "4", "", "4"])]
 [EDF.TimestampedAnnotationList(5.0, 6.0, ["annot", "", "5", "", "5"])]

julia> edf.signals[3].records
5-element Vector{Vector{EDF.TimestampedAnnotationList}}:
 [EDF.TimestampedAnnotationList(1.0, 2.0, ["annot", "1", "1"])]
 [EDF.TimestampedAnnotationList(2.0, 3.0, ["annot", "2", "2"])]
 [EDF.TimestampedAnnotationList(3.0, 4.0, ["annot", "3", "3"])]
 [EDF.TimestampedAnnotationList(4.0, 5.0, ["annot", "4", "4"])]
 [EDF.TimestampedAnnotationList(5.0, 6.0, ["annot", "5", "5"])]
kleinschmidt commented 9 months ago

I think this might be related https://github.com/beacon-biosignals/EDF.jl/issues/79