jaakkopasanen / Impulcifer

Measurement and processing of binaural impulse responses for personalized surround virtualization on headphones.
MIT License
211 stars 14 forks source link

Errors outputting plots #32

Closed rpx91 closed 4 years ago

rpx91 commented 5 years ago

I get the nice pretty graphs output fine but the following errors are reported on the console

(venv) C:\Users\dushy\Impulcifer>python impulcifer.py --test_signal="data/sweep-6.15s-48000Hz-32bit-2.93Hz-24000Hz.pkl" --dir_path="data/my_hrir" --plot
 ** On entry to DLASCLS parameter number  4 had an illegal value
 ** On entry to DLASCLS parameter number  4 had an illegal value
Traceback (most recent call last):
  File "impulcifer.py", line 257, in <module>
    main(**create_cli())
  File "impulcifer.py", line 76, in main
    compensate_headphones(headphones, hrir, fig_path=fig_path)
  File "impulcifer.py", line 141, in compensate_headphones
    min_mean_error=False
  File "C:\Users\dushy\Impulcifer\venv\lib\site-packages\autoeq\frequency_response.py", line 1036, in compensate
    iterations=DEFAULT_TREBLE_SMOOTHING_ITERATIONS
  File "C:\Users\dushy\Impulcifer\venv\lib\site-packages\autoeq\frequency_response.py", line 1180, in smoothen_fractional_octave
    treble_f_upper=treble_f_upper
  File "C:\Users\dushy\Impulcifer\venv\lib\site-packages\autoeq\frequency_response.py", line 1137, in _smoothen_fractional_octave
    y_normal = savgol_filter(y_normal, self._window_size(window_size), 2)
  File "C:\Users\dushy\Impulcifer\venv\lib\site-packages\scipy\signal\_savitzky_golay.py", line 337, in savgol_filter
    coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
  File "C:\Users\dushy\Impulcifer\venv\lib\site-packages\scipy\signal\_savitzky_golay.py", line 139, in savgol_coeffs
    coeffs, _, _, _ = lstsq(A, y)
  File "C:\Users\dushy\Impulcifer\venv\lib\site-packages\scipy\linalg\basic.py", line 1218, in lstsq
    raise LinAlgError("SVD did not converge in Linear Least Squares")
numpy.linalg.LinAlgError: SVD did not converge in Linear Least Squares
jaakkopasanen commented 5 years ago

Thanks for the issue. I'll look into it.

Could be share the whole folder with all the recordings etc? Maybe there is something that will trigger some edge case I haven't taken into account.

rpx91 commented 5 years ago

Ah nuts - I overwrote it with new recordings. Will post one when it happens again.

As an aside - if recordings could be moved into a time stamped folder that'd be ideal for trouble shooting and tracing things back.

jaakkopasanen commented 5 years ago

Did the same happen again with the newer recordings or was it just the old ones?

I've taken a position of not trying to implement Windows explorer functionality in Impulcifer. Recordings can be moved to timestamped folders by creating the folders in Windows and moving the files there.

rpx91 commented 5 years ago

Understood - in my experience of running multiple HRIR comps it's a good way to trouble shoot or figure out exactly why a recording resulted in a particularly good HRIR.

I'll figure out a script to do that.