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

get segments of annotations from a list of (recording_filename, onset, offset, set) #335

Closed lucasgautheron closed 2 years ago

lucasgautheron commented 2 years ago

Is your feature request related to a problem? Please describe. So far get_segments requires the annotation_filename column in the input dataframe. It would be nice to have a function that does not require it. This would have helped for #334

Describe the solution you'd like

a get_segments_from_ranges (or something like that) function for AnnotationManager that takes a dataframe as input, with 4 columns: recording_filename, range_onset, range_offset, set.

lucasgautheron commented 2 years ago

This is a WIP. can be used this way: https://childproject.readthedocs.io/en/annotations-get-within-range/ChildProject.html#ChildProject.annotations.AnnotationManager.get_within_ranges