macaodha / batdetect2

Other
53 stars 10 forks source link

Cannot pass --time_expansion_factor argument #5

Closed Jeff37 closed 1 year ago

Jeff37 commented 1 year ago

No success to pass the time expansion argument when I want to process audio files which are already 10x time expanded (although it works fine with the very first version).

When I run (with the environment correctly activated):

batdetect2 detect --time_expansion_factor 10 /home/jf/Music/Training_Sounds/tmpADD/ /home/jf/Music/Training_Sounds/tmpADD/anns102/ 0.3 or batdetect2 detect /home/jf/Music/Training_Sounds/tmpADD/ /home/jf/Music/Training_Sounds/tmpADD/anns102/ 0.3 --time_expansion_factor 10

The processing runs well but the first lines of the console output are:

Saving results to: /home/jf/Music/Training_Sounds/tmpADD/anns102/ time_exp_fact 1 25 call(s) detected above the threshold. species name probablity present Myotis nattereri 0.456 Rhinolophus ferrumequinum 0.248 Pipistrellus pipistrellus 0.136 ...

Which of course gives inconsistent results! Line 2 tells "time_exp_fact 1" i.e. it considers the files as real time and not as 10x time expanded.

Am I missing something about using the flag?

mbsantiago commented 1 year ago

Hi @Jeff37!

There was a bug in the way the command line parameters were used. I've fixed the code now and it should work as you are using it. Please update your batdetect2 version by running:

pip install -U batdetect2

Let me know if you have any further issues. Thanks for pointing this out! Cheers, Santiago

Jeff37 commented 1 year ago

It works perfectly after updating to 1.0.3 ! Thank you for the quick reaction.

Saving results to: /home/jf/Music/Training_Sounds/tmpADD/anns103/ time_exp_fact 10 13 call(s) detected above the threshold. species name probablity present Pipistrellus pipistrellus 0.972 Nyctalus leisleri 0.017 Pipistrellus nathusii 0.007