kitzeslab / opensoundscape

Open source, scalable software for the analysis of bioacoustic recordings
http://opensoundscape.org
MIT License
134 stars 14 forks source link

cryptic error from detect_peak_sequence_cwt #410

Closed sammlapp closed 2 years ago

sammlapp commented 2 years ago
TypeError                                 Traceback (most recent call last)
<ipython-input-114-d63c90715843> in <module>
     17     duration_range=[0.1,2],
     18     points_range=[5,100],
---> 19     max_skip=1,
     20 #     plot=True,
     21 )

~/opensoundscape/opensoundscape/signal.py in detect_peak_sequence_cwt(audio, sr, window_len, center_frequency, wavelet, peak_threshold, peak_separation, dt_range, dy_range, d2y_range, max_skip, duration_range, points_range, plot)
    375 
    376         # convert seq_t to time since beginning of audio file
--> 377         seq_t = list(np.array(seq_t) + window_start_t)
    378 
    379         # save df of detected sequences in list

TypeError: can only concatenate list (not "int") to list
sammlapp commented 2 years ago

there's also an error that occurs when the audio duration is < window_length

sammlapp commented 2 years ago

I fixed this in the branch issue_410_cwtpeaks