LAAC-LSCP / ChildProject

Python package for the management of day-long recordings of children.
https://childproject.readthedocs.io
MIT License
13 stars 5 forks source link

shift annotations timestamps by time_seek during importation #245

Closed lucasgautheron closed 3 years ago

lucasgautheron commented 3 years ago

This ensures that all timestamps, within the index or the annotations themselves, will match the audio; it will no longer be required to perform any shift after the importation of annotations.

time_seek is preserved as it is useful to keep a record of the shift that has been applied.

@alecristia suggested we add raw_range_onset/raw_range_offset and raw_segment_onset/raw_segment_offset columns (using the timestamps of the input annotations) for clarity. I might add that later

lucasgautheron commented 3 years ago

I am not absolutely convinced we should have both the absolute and relative timestamps. I feel people actually have no reason to use the relative timestamps, what's most natural seems having them all relative. This means less code, less documentation, less redundancy, and less bandwidth/memory usage in some cases when it matters (e.g. superdatasets with so many rows such as EL1k). It also means users will need to make no decision about how they use the data as we've made the decision for them already! What do you think @alecristia @sarpu ?