If I do the following command:
Code: Select all
gnuplot -p -e 'plot "Filterdata/firos3_144.dat" with lines'
Code: Select all
gnuplot -p -e 'plot "Filterdata/firos3_144.dat" with lines'
Code: Select all
import matplotlib.pyplot as plt
import os.path as path
with open(path.expanduser("~/apps/views/swapps/lib_dsp/lib_dsp/src/os3/FilterData/firos3_144.dat"), "r") as coeffs:
text = coeffs.readlines()
text = text[:-1]
data = [int(line.strip(",\n")) for line in text]
reordered = []
filter_length = len(data)
for index in range(filter_length/3):
reordered.append(data[index])
reordered.append(data[index + filter_length/3])
reordered.append(data[index + filter_length*2/3])
plt.plot(reordered)
plt.ylabel('coeffs')
plt.show()
Code: Select all
import matplotlib.pyplot as plt
import os.path as path
with open(path.expanduser("~/apps/views/swapps/lib_dsp/lib_dsp/src/os3/FilterData/firos3_144.dat"), "r") as coeffs:
text = coeffs.readlines()
text = text[:-1] #lose last
data = [int(line.strip(",\n"))/3 for line in text]
reordered = []
filter_length = len(data)
print "filter_length:", filter_length
for index in range(filter_length/3):
reordered.append(data[index + filter_length*2/3])
reordered.append(data[index + filter_length/3])
reordered.append(data[index])
plt.plot(reordered, marker="o")
plt.ylabel('coeffs')
plt.show()
.. However, am pretty sure this is not the case. The libraries have been used in commercial products (where poor filtering would have become apparent) and the algos were originally tested end to end for SNR and THD etc when developed in SFP. There is a bit perfect equivalence test run nightly on the xcore implementation against the golden reference which is passing.am led to believe that something is wrong with the library data files
Code: Select all
#define NUM_CHANNELS 1
#define NUM_OUTPUT_SAMPLES 144
const int32_t impulse[1024] = {0x7fffffff};