Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

t60_impulse estimation fails for octave bands up to 16kHz with fs=44100Hz #262

@happyTonakai

Description

@happyTonakai

Example code:

from acoustics import room, bands
t60 = room.t60_impulse(file, bands.octave(31.25, 16e3), "t30")

An error raised ValueError: Digital filter critical frequencies must be 0 < Wn < 1, which happens at the last frequency band

if band_type == 'octave':
low = octave_low(bands[0], bands[-1])
high = octave_high(bands[0], bands[-1])

octave_high() gives the largest element of high is 22627.41699797, which is out of range of Nyquist at 44100Hz. That results in the ValueError in

filtered_signal = bandpass(raw_signal, low[band], high[band], fs, order=8)

It may be better to check the frequency range in octave_high and third_high or just after they are called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions