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

-Printing channel amplitudes.

parent 57379911
No related branches found
No related tags found
Loading
...@@ -64,6 +64,7 @@ data = transpose(data) ...@@ -64,6 +64,7 @@ data = transpose(data)
for sample_nr in range(NOF_TIMESAMPLES): for sample_nr in range(NOF_TIMESAMPLES):
mat_list = [] mat_list = []
amplitudes = []
for channel_nr in range(NOF_CHANNELS): for channel_nr in range(NOF_CHANNELS):
############################################################################### ###############################################################################
# Convert the unsigned words to complex # Convert the unsigned words to complex
...@@ -82,10 +83,12 @@ for sample_nr in range(NOF_TIMESAMPLES): ...@@ -82,10 +83,12 @@ for sample_nr in range(NOF_TIMESAMPLES):
channel_data[index] = complex_binomial_to_phasor(word) channel_data[index] = complex_binomial_to_phasor(word)
############################################################################### ###############################################################################
# Extract the phases from the complex data # Extract the phases and amplitudes from the complex data
############################################################################### ###############################################################################
phases = [] phases = []
for word in channel_data: for word in channel_data:
amplitudes.append(word[0])
phases.append(word[1]) phases.append(word[1])
################################################################################ ################################################################################
...@@ -97,6 +100,11 @@ for sample_nr in range(NOF_TIMESAMPLES): ...@@ -97,6 +100,11 @@ for sample_nr in range(NOF_TIMESAMPLES):
################################################################################ ################################################################################
# re-shape the flat list of 64 matrices into a an 8*8 matrix of matrices, plot # re-shape the flat list of 64 matrices into a an 8*8 matrix of matrices, plot
################################################################################ ################################################################################
print 'Plotting phases of timesample %d, %d channels.' %(sample_nr,NOF_CHANNELS)
print '. Channel amplitudes:'
for channel_nr in range(NOF_CHANNELS):
print ' .', channel_nr, ' - ', amplitudes[channel_nr]
mat_mat = split_list(mat_list, 8) mat_mat = split_list(mat_list, 8)
plot_matrix_color(mat_mat) plot_matrix_color(mat_mat)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment