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

Document 'filter' #360

Closed William-N-Havard closed 2 years ago

William-N-Havard commented 2 years ago

Would it be possible to document the filter parameter and give an example script of what happens when this parameter is given v. not given, and when it should (or should not) be used?

I think I got a hang of what it does: filter out the annotations that do not correspond to the given recording filename provided as a filter when importing annotations from a single file (all.rttm, ALUCs_out_individual.txt). Though, if it had been documented, it would have spared me an afternoon of understanding what was going wrong with my importation.

Edit: I also find the term filter inadequate. I usually expect filters to be lambda expressions, not raw strings. Maybe a more explicit term would have helped me, such as target_recording_name

lucasgautheron commented 2 years ago

Although I agree I am not so sure about changing the name, because of compatibility issues. I think renaming the columns should work (two columns would co-exist in the index if old annotations are mixed up with newly imported annotations), but I am not 100% sure. Maybe, if it is explicitly documented, it would not matter so much?

William-N-Havard commented 2 years ago

Agreed! If it's documented the name shouldn't matter so much!

lucasgautheron commented 2 years ago

Just thought of something: what about throwing warnings when rttm/alice converter detects that the input contains annotations from several recordings, but no filter was set?

William-N-Havard commented 2 years ago

Just thought of something: what about throwing warnings when rttm/alice converter detects that the input contains annotations from several recordings, but no filter was set?

Great idea! That would hint to people that something is going wrong and that something unexpected might have happened with the imported annotations.