Closed timsainb closed 5 years ago
Hello Tim, I'm sorry for the bug. I have fixed the problem and added tests. If you update to 3.7.1, _removeUltrashortIntervals should work correctly with your data.
Of course, if short intervals are not a problem for you, you can also leave it at null and bypass the check.
I found that the function _removeUltrashortIntervals
ignores the minTimestamp of a Textgrid. If the Textgrid's minTimestamp was 0, the code should have worked ok, but if the Textgrid's minTimestamp was non-zero, the behaviour would be as you described.
If you find any other bugs or would like to see any other features, please let me know. Thanks! Tim
Thanks!
I am saving textgrids of syllables of birdsong and noticed the tg.save function does not work as expected.
The save function
takes as input to
minimumIntervalLength
by default a hardcoded parameterMIN_INTERVAL_LENGTH = 0.00000001
.When segments are longer than that number, it would be expected that they would be left as is. However, with my song, when I do not set that flag, the first syllable in each of my textgrids is changed from:
Interval(start=0.339, end=0.387, label='syll')
to:Interval(start=0.0, end=0.387, label='syll')
Despite the segment length being longer thanMIN_INTERVAL_LENGTH
. SettingminimumIntervalLength
toNone
fixes the problem in my case, but it looks like something is not working as intended in this function.Thanks for an excellent toolset! Tim