Fix select function when annotaiton start and end times have incorrect values
If an annotation had incorrect values for start and end time, the time_shift
function in the selection_table
module would enter an infinite loop.
This happened when start time was bigger than end time. For example this line in the annotation of the tutorial:
start | end | label | sound_file | datetime | |
---|---|---|---|---|---|
3054 | 899.1548 | 0.596399999999903 | upcall | NOPP6_EST_20090328_004500.wav | 2009-03-28 00:45:00 |
The fix now skips the annotation and doesnt create any segments with it. It gives a warning indicating the annotation filename and start and end time.
In addition, added an assertion for the time_shift
function to check the length
argument.
This resolves the issue found with the ketos_tutorial ketos_tutorials#3 (closed) (Although the values in the table are still incorrect)
Now, the curios thing is, this entry was present before. So who knows what the select function was doing before :)