You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(pytta-env) ubuntu@op-mm-deeparts-os:~/PyTTa/examples$ python reverberation_time.py
Traceback (most recent call last):
File "reverberation_time.py", line 19, in <module>
maxFreq=float(2e4))
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 970, in __init__
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 996, in estimate_energy_parameters
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 1471, in cumulative_integration
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 1161, in _filter
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/filter.py", line 83, in __init__
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/filter.py", line 115, in get_sos_filters
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/filter.py", line 105, in __design_sos_butter
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/scipy/signal/filter_design.py", line 2867, in butter
output=output, ftype='butter', fs=fs)
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/scipy/signal/filter_design.py", line 2346, in iirfilter
raise ValueError("Digital filter critical frequencies "
ValueError: Digital filter critical frequencies must be 0 < Wn < 1
Hello @the-drunk-coder, thank you for the traceback and your interest in pytta.
My time for pytta lies only on the weekends, when there's spare time, so I won't be able to give you some more hints right away. If you don't mind trying to run it from de code in development and get us the traceback, we might coordinate a solution to this issue.
Thanks again, and feel free to question as much as you want!
The traceback above is from the latest development version, I checked it out this morning, in a conda environment generated from the requirements.yml.
I played around with it and tried to scale the edge frequencies to [0, 1] (by dividing them by samplerate//2, but now I get a different error, so I'm not sure whether that was the right way to go ...
That doesn't seem to be it, the samplerate is passed correctly to the OctFilter constructor.
I also tried the following (mentioned above but here's the details):
In filter.py, line 102, add: edges = edges / (samplingRate//2) to normalize the frequencies to [0,1]
This leaves me with another error, though:
Traceback (most recent call last):
File "revtime_local.py", line 21, in <module>
maxFreq=float(2e4))
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 970, in __init__
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 996, in estimate_energy_parameters
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 1488, in cumulative_integration
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 1414, in energy_decay_calculation
File "/home/ubuntu/miniconda3/envs/pytta-env/lib/python3.7/site-packages/PyTTa-0.1.2a0-py3.7.egg/pytta/classes/analysis.py", line 1281, in _Lundeby_correction
IndexError: index -1 is out of bounds for axis 0 with size 0
I tried this again on the current development branch (1d30852) with Python 3.12, numpy 1.26 and scipy 1.17. examples/reverberation_time.py runs to the end and no longer raises the ValueError from scipy.signal.butter. If it still fails for you, a traceback from development would help. Otherwise I think this issue can be closed.
Activity
the-drunk-coder commentedon Jun 9, 2022
Here's the full traceback:
Chum4k3r commentedon Jun 9, 2022
Hello @the-drunk-coder, thank you for the traceback and your interest in pytta.
My time for pytta lies only on the weekends, when there's spare time, so I won't be able to give you some more hints right away. If you don't mind trying to run it from de code in development and get us the traceback, we might coordinate a solution to this issue.
Thanks again, and feel free to question as much as you want!
the-drunk-coder commentedon Jun 9, 2022
Hi @Chum4k3r, no worries :)
The traceback above is from the latest development version, I checked it out this morning, in a conda environment generated from the
requirements.yml.I played around with it and tried to scale the edge frequencies to [0, 1] (by dividing them by
samplerate//2, but now I get a different error, so I'm not sure whether that was the right way to go ...Best,
Niklas
Chum4k3r commentedon Jun 9, 2022
Ok, from the scipy.signal.iirfilter documentation, it seems that the parameter
fsreceives aNone, instead of the actual.samplingRateproperty.If it is None, it is coming from the
OctFilterclass as asamplingRate == None.Can you debug the filtering steps to check?
This is the critical code line of the filtering process.
best,
João Vitor
the-drunk-coder commentedon Jun 10, 2022
That doesn't seem to be it, the samplerate is passed correctly to the OctFilter constructor.
I also tried the following (mentioned above but here's the details):
In
filter.py, line 102, add:edges = edges / (samplingRate//2)to normalize the frequencies to [0,1]This leaves me with another error, though:
aguirreSL commentedon Oct 31, 2026
I tried this again on the current
developmentbranch (1d30852) with Python 3.12, numpy 1.26 and scipy 1.17.examples/reverberation_time.pyruns to the end and no longer raises theValueErrorfromscipy.signal.butter. If it still fails for you, a traceback fromdevelopmentwould help. Otherwise I think this issue can be closed.