Skip to content
Snippets Groups Projects
Commit 0d4823e0 authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

-Set reorder back to True;

-Set deinterleaving factor to 1 instead of 64 (due to reorder=True above) in
 tc_wpfb_src_out_arr.py. Also improved plotting, now plots by channel index.
parent cfca045d
No related branches found
No related tags found
No related merge requests found
......@@ -143,7 +143,7 @@ ARCHITECTURE str OF apertif_unb1_correlator IS
CONSTANT c_wpfb_in_dat_w : NATURAL := 8; --6; -- = 8, number of input bits
CONSTANT c_wpfb_out_dat_w : NATURAL := 14; --12; -- = 14, number of output bits: in_dat_w + natural((cei
CONSTANT c_wpfb_use_separate : BOOLEAN := FALSE; -- = false for complex input, true for two real inputs
CONSTANT c_wpfb_use_reorder : BOOLEAN := TRUE;
CONSTANT c_wpfb_use_reorder : BOOLEAN := FALSE;
CONSTANT c_wpfb : t_wpfb := (c_wpfb_wb_factor, c_wpfb_nof_points, c_wpfb_nof_chan, c_wpfb_nof_wb_streams,
c_wpfb_nof_taps, c_wpfb_in_dat_w, 16, 16,
......
......@@ -4,7 +4,7 @@ from common_dsp import *
from file_io import *
REC_FILE = os.environ['RADIOHDL']+'/applications/apertif/apertif_unb1_correlator/tb/rec/correlator_src_out_arr0.rec'
USE_NEW_REC_FILE = False
USE_NEW_REC_FILE = True
NOF_INPUTS = 12
NOF_CHANNELS = 64
......@@ -35,6 +35,6 @@ correlator_src_out_arr = rec_file_to_complex(REC_FILE, complex_width=CORRELATOR_
# Plot the phase shifts
for i in range(1000):
print i
plot_phase_shifts(correlator_src_out_arr[i*64], NOF_VISIBILITIES)
plot_phase_shifts(correlator_src_out_arr[i], NOF_VISIBILITIES)
......@@ -10,6 +10,7 @@ from scipy.fftpack import fft,ifft, fftfreq, fftshift
REC_FILE = os.environ['RADIOHDL']+'/applications/apertif/apertif_unb1_correlator/tb/rec/wpfb_src_out_arr0.rec'
WPFB_OUT_DATA_WIDTH = 14
NOF_CHANNELS = 64
################################################################################
# Read the lines from the file and turn them into a list
......@@ -19,18 +20,14 @@ complex_list = rec_file_to_complex(REC_FILE, complex_width=WPFB_OUT_DATA_WIDTH)
################################################################################
## Plot FFT
################################################################################
f = deinterleave(complex_list[0], 2, 1)[0]
f = deinterleave(complex_list[5], 2, 1)[0]
N=64
T = 1.0 / N
T = 1.0 / NOF_CHANNELS
yf = f
xf = fftfreq(N, T)
xf = range(NOF_CHANNELS)
xf = fftshift(xf)
yplot = fftshift(yf)
plt.bar(xf, 1.0/N * np.abs(yplot))
plt.bar(xf, 1.0/NOF_CHANNELS * np.abs(yplot))
plt.grid()
plt.show()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment