-
Notifications
You must be signed in to change notification settings - Fork 5
add ContextlessAnnotation #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
#= 5 =# AnnotationV1(recording=recs[2], id=uuid4(), span=TimeSpan(67, 95)), | ||
#= 6 =# AnnotationV1(recording=recs[2], id=uuid4(), span=TimeSpan(15, 170)), | ||
#= 7 =# AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(43, 89)), | ||
#= 8 =# AnnotationV1(recording=recs[3], id=uuid4(), span=TimeSpan(0, 50)), | ||
#= 9 =# AnnotationV1(recording=recs[2], id=uuid4(), span=TimeSpan(2, 10)), | ||
#= 10 =# AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(111, 140)), | ||
#= 11 =# AnnotationV1(recording=recs[3], id=uuid4(), span=TimeSpan(60, 100)), | ||
#= 12 =# AnnotationV1(recording=recs[3], id=uuid4(), span=TimeSpan(23, 80)), | ||
#= 13 =# AnnotationV1(recording=recs[3], id=uuid4(), span=TimeSpan(100, 110)), | ||
#= 14 =# AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(200, 300))] | ||
sources = [AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(0, 100)), #= 1 =# | ||
AnnotationV1(recording=recs[2], id=uuid4(), span=TimeSpan(55, 100)), #= 2 =# | ||
AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(34, 76)), #= 3 =# | ||
AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(120, 176)), #= 4 =# | ||
AnnotationV1(recording=recs[2], id=uuid4(), span=TimeSpan(67, 95)), #= 5 =# | ||
AnnotationV1(recording=recs[2], id=uuid4(), span=TimeSpan(15, 170)), #= 6 =# | ||
AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(43, 89)), #= 7 =# | ||
AnnotationV1(recording=recs[3], id=uuid4(), span=TimeSpan(0, 50)), #= 8 =# | ||
AnnotationV1(recording=recs[2], id=uuid4(), span=TimeSpan(2, 10)), #= 9 =# | ||
AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(111, 140)), #= 10 =# | ||
AnnotationV1(recording=recs[3], id=uuid4(), span=TimeSpan(60, 100)), #= 11 =# | ||
AnnotationV1(recording=recs[3], id=uuid4(), span=TimeSpan(23, 80)), #= 12 =# | ||
AnnotationV1(recording=recs[3], id=uuid4(), span=TimeSpan(100, 110)), #= 13 =# | ||
AnnotationV1(recording=recs[1], id=uuid4(), span=TimeSpan(200, 300))] #= 14 =# | ||
merged = merge_overlapping_annotations(sources) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes seem unrelated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatter autoformatted, my bad. Will fix
On slack we decided the |
when one only has a Samples object (and not a signal), and they run some algorithm over it that generates annotations, that algo doesn’t have the context of recording or start of the signal, and can only output things relative to the samples itself. That leads to the need for something like this
ContextlessSpanV1
.More beacon-internal context: https://beacon-biosignals.slack.com/archives/CKS1Y5F5X/p1695907224398859