diff --git a/libraries/dsp/correlator/tb/python/tc_correlator.py b/libraries/dsp/correlator/tb/python/tc_correlator.py index 6dc2bb0c2ccdca3c6d27e774548bb9167b535709..d897a8d174344ff9f9a2d6d4742bc38cf27d73ee 100644 --- a/libraries/dsp/correlator/tb/python/tc_correlator.py +++ b/libraries/dsp/correlator/tb/python/tc_correlator.py @@ -64,6 +64,7 @@ data = transpose(data) for sample_nr in range(NOF_TIMESAMPLES): mat_list = [] + amplitudes = [] for channel_nr in range(NOF_CHANNELS): ############################################################################### # Convert the unsigned words to complex @@ -80,14 +81,16 @@ for sample_nr in range(NOF_TIMESAMPLES): ############################################################################### for index,word in enumerate(channel_data): 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 = [] + for word in channel_data: + amplitudes.append(word[0]) phases.append(word[1]) - + ################################################################################ # Re-shape the flat list into a matrix ################################################################################ @@ -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 ################################################################################ + 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) plot_matrix_color(mat_mat)