jaakkopasanen / AutoEq

Automatic headphone equalization from frequency responses
MIT License
13.55k stars 2.48k forks source link

Error with frequency_response.py #27

Closed bunkbail closed 5 years ago

bunkbail commented 5 years ago

I own an Onkyo A800 headphone and it doesn't being supported by AutoEQ. So I made a CSV file using WebPlotDigitizer, plotting the graph based on the frequency response I got from here. I made a header row consisting frequency,raw in said CSV file (pastebin link here), then put it into a new folder called onkyo inside the AutoEQ folder. I set up everything and I can't seem to make it work. I use the following line:

python frequency_response.py --input_dir="onkyo" --compensation="headphonecom\resources\headphonecom_compensation_sbaf-serious.csv" --equalize --show_plot

And it then shows the following error:

Traceback (most recent call last): File "frequency_response.py", line 1482, in FrequencyResponse.main(**FrequencyResponse.cli_args()) File "frequency_response.py", line 1435, in main treble_gain_k=treble_gain_k File "frequency_response.py", line 1299, in process self.interpolate() File "frequency_response.py", line 765, in interpolate interpolator = InterpolatedUnivariateSpline(np.log10(self.frequency), self.raw, k=pol_order) File "D:\AutoEq-master\venv\lib\site-packages\scipy\interpolate\fitpack2.py", line 601, in init raise ValueError('x must be strictly increasing') ValueError: x must be strictly increasing

What did I do wrong here?

I use Python 3.6.8.

jaakkopasanen commented 5 years ago

WebPlotDigitizer doesn't sort the values by default. There is a sorting option in "View data" which can be used to sort the data by x in asceding order. This should fix the issue. Sometimes there are datapoints with same x value (frequency) and those can be removed from the file manually or you can choose larger averaging window for x axis in the main view.

Thanks for this issue. I'm going to write a guide for using WebPlotDigitizer and would have probably forgotten to include this if you hadn't made the issue.

bunkbail commented 5 years ago

Thanks! That worked!