Giter VIP home page Giter VIP logo

acoustic_indices's People

Contributors

ecila avatar patriceguyot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

acoustic_indices's Issues

AttributeError: module 'yaml' has no attribute 'FullLoader'

First, thanks in advance for the library and any support.

When I try to run main_test_indices.py, I get the following error code:

Read the audio file: audio_files/BALMER-02_0_20150620_0445.wav
Successful read of the audio file: audio_files/BALMER-02_0_20150620_0445.wav
Traceback (most recent call last):
File "main_test_indices.py", line 36, in
data_config = yaml.load(stream, Loader=yaml.FullLoader)
AttributeError: module 'yaml' has no attribute 'FullLoader'

Any ideas what I'm missing? Installed and using PyYAML 3.13.

Thanks!

please correct typo in window type in python scripts: correct spelling is hamming

Dear Patrice and Alice,

Congratulations on an excellent and well documented set of analytical scripts for bioacoustic analysis.

There is a small typo in the current version that breaks the following scripts: main_compute_indices_from_dir, main_test_indices.py, config_014_butter.yaml
In all these scripts there are several references to windowType: hanning when the correct spelling is windowType: hamming.

Best regards, Roberto

no numpy module found although it is installed

Hi there, thanks for the useful repo!

However, when I tried running the main_test_indices.py file after fetching the entire repo on Ubuntu 20.04 and making sure that all 4 required packages were installed with PIP and also APT, I was unsuccessful:

 python main_test_indices.py
Traceback (most recent call last):
  File "main_test_indices.py", line 16, in <module>
    from compute_indice import *
  File "/home/kdarras/Documents/Boulot/2020 Hangzhou/ecoSound-web/indices/Acoustic_Indices/compute_indice.py", line 23, in <module>
    from scipy import signal, fftpack
  File "/usr/lib/python3/dist-packages/scipy/__init__.py", line 62, in <module>
    from numpy import show_config as show_numpy_config
ImportError: No module named numpy

please advise whether this is a bug or an error on my part.

KeyError: 'roll_off'

Hi, i'm trying to test the 'windowed_sinc' pre-processing type but I am facing a problem with the 'roll_off' key.
To what does this key correspond to ?

data_config['Filtering']['type'] = 'windowed_sinc'

    # Pre-processing -----------------------------------------------------------------------------------
    if 'Filtering' in data_config:
        if data_config['Filtering']['type'] == 'butterworth':
            print('- Pre-processing - High-Pass Filtering:', data_config['Filtering'])
            freq_filter = data_config['Filtering']['frequency']
            Wn = freq_filter/float(file.niquist)
            order = data_config['Filtering']['order']
            [b,a] = signal.butter(order, Wn, btype='highpass')
            # to plot the frequency response
            # w, h = signal.freqz(b, a, worN=2000)
            # plt.plot((file.sr * 0.5 / np.pi) * w, abs(h))
            # plt.show()
            file.process_filtering(signal.filtfilt(b, a, file.sig_float))
            
        elif data_config['Filtering']['type'] == 'windowed_sinc':
            print('- Pre-processing - High-Pass Filtering:', data_config['Filtering'])
            freq_filter = data_config['Filtering']['frequency']
            fc = freq_filter / float(file.sr)
            roll_off = data_config['Filtering']['roll_off']
            b = roll_off / float(file.sr)
            N = int(np.ceil((4 / b)))
            if not N % 2: N += 1  # Make sure that N is odd.
            n = np.arange(N)
            # Compute a low-pass filter.
            h = np.sinc(2 * fc * (n - (N - 1) / 2.))
            w = np.blackman(N)
            h = h * w
            h = h / np.sum(h)
            # Create a high-pass filter from the low-pass filter through spectral inversion.
            h = -h
            h[(N - 1) / 2] += 1
            file.process_filtering(np.convolve(file.sig_float, h))

Read the audio file: audio_files\S4A12065_20200808_160000.wav
	Successful read of the audio file: audio_files\S4A12065_20200808_160000.wav
	The audio file contains more than one channel. Only the channel 0 will be used.
- Pre-processing - High-Pass Filtering: {'type': 'windowed_sinc', 'order': 8, 'frequency': 300}
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-16-1a5bba1bece8> in <module>
     19         freq_filter = data_config['Filtering']['frequency']
     20         fc = freq_filter / float(file.sr)
---> 21         roll_off = data_config['Filtering']['roll_off']
     22         b = roll_off / float(file.sr)
     23         N = int(np.ceil((4 / b)))

KeyError: 'roll_off'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.