Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error cannot convert float NaN to integer need to fix #73

Open
LionLion123 opened this issue Aug 13, 2024 · 0 comments
Open

Error cannot convert float NaN to integer need to fix #73

LionLion123 opened this issue Aug 13, 2024 · 0 comments

Comments

@LionLion123
Copy link

https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3626

(venv) C:\Windows\System32\Impulcifer>python impulcifer.py --test_signal="data/sweep-6.15s-48000Hz-32bit-2.93Hz-24000Hz.pkl" --dir_path="F:\바탕화면\측정"
Creating impulse response estimator...
Running room correction...
Running headphone compensation...
Creating headphone equalization...
Creating frequency response target...
Opening binaural measurements...
C:\Windows\System32\Impulcifer\venv\lib\site-packages\scipy\stats\_stats_mstats_common.py:130: RuntimeWarning: invalid value encountered in double_scalars
slope = r_num / ssxm
C:\Windows\System32\Impulcifer\venv\lib\site-packages\scipy\stats\_stats_mstats_common.py:140: RuntimeWarning: invalid value encountered in sqrt
t = r * np.sqrt(df / ((1.0 - r + TINY)*(1.0 + r + TINY)))
C:\Windows\System32\Impulcifer\venv\lib\site-packages\scipy\stats\_stats_mstats_common.py:142: RuntimeWarning: invalid value encountered in double_scalars
sterrest = np.sqrt((1 - r**2) * ssym / ssxm / df)
Traceback (most recent call last):
File "impulcifer.py", line 556, in <module>
main(**create_cli())
File "impulcifer.py", line 84, in main
write_readme(os.path.join(dir_path, 'README.md'), hrir, fs)
File "impulcifer.py", line 417, in write_readme
peak_ind, knee_point_ind, noise_floor, window_size = ir.decay_params()
File "C:\Windows\System32\Impulcifer\impulse_response.py", line 120, in decay_params
n = int(len(squared) / self.fs / wd) # Number of time windows
ValueError: cannot convert float NaN to integer

There's been a bug like this since a long time ago.
The impulcifer often experiences an error called float NaN to integrer.
If a recorded file is recorded incorrectly in the first place, understandably, even a normal file sometimes experiences such an error.
My way around that is to loop FL,FR or Hesuvi (no headphone) back using VBcable and Audacity, REW.
Then something is not changed and recorded again, but there were times when that error was avoided.

What's even weird is that when applying headphone correction, for example, it can be converted well even if you use Decay parameter, and when headphone correction is turned off, such error can occur even if you don't use Decay parameter.

In that case, loopback can sometimes solve it, but it wasn't a perfect solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant