pympi icon indicating copy to clipboard operation
pympi copied to clipboard

add_annotation does not check if the time stamp (left/right) does already exist

Open thomaskisler opened this issue 5 years ago • 4 comments

I would expect if I add an annotation that first, the add_annotation(...) method would check if the timestamp does already exist in a linked tier. And if so, it would use the already existing time stamp, before adding a new one. However, that is not what I see. Is this on purpose?

I am using pympi 1.69

thomaskisler avatar Jun 03 '19 10:06 thomaskisler

This is not on purpose and would be a perfect enhancement of the library

dopefishh avatar Jun 03 '19 10:06 dopefishh

This could be implemented by patching the generate_ts_id function.

dopefishh avatar Jun 03 '19 12:06 dopefishh

I've reverted the MR because not all functions take this property into mind and therefore some functionality behaves off due to reusing timeslots.

dopefishh avatar Feb 03 '21 15:02 dopefishh

Adding new annotations works only for nonadjacent annotations, that is when the onset of the annotation I add does not equal to the ending of a previous one. Suppose I have two annotations with timestamps: 1000-2000 and 2000-3000. I can't add new annotation starting at 3000 and I can't change the first annotation with re moving it and adding a new one with a new label. Is there any other way to remove or change annotation which have the same ending as the next one? I hope it is clear ;)

Cogitarian avatar Apr 06 '21 19:04 Cogitarian