diff options
author | Nao Pross <np@0hm.ch> | 2021-12-21 00:32:06 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-12-21 00:32:06 +0100 |
commit | 1de862c5e2ac6e2baa76daf9fbe6b64050da12fc (patch) | |
tree | aa3f52261a3e1f0e1e2b359be8dd1435cca89135 /doc/thesis/figures/data/qam_sim_dynamic_grblock_nlos_etsi_doppler70.py | |
parent | Add data and flowgraph for (broken) QAM on hardware (diff) | |
download | Fading-1de862c5e2ac6e2baa76daf9fbe6b64050da12fc.tar.gz Fading-1de862c5e2ac6e2baa76daf9fbe6b64050da12fc.zip |
Add more data for QAM, fix colormap
Diffstat (limited to '')
-rw-r--r-- | doc/thesis/figures/data/qam_sim_dynamic_grblock_nlos_etsi_doppler70.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/thesis/figures/data/qam_sim_dynamic_grblock_nlos_etsi_doppler70.py b/doc/thesis/figures/data/qam_sim_dynamic_grblock_nlos_etsi_doppler70.py new file mode 100644 index 0000000..5b93750 --- /dev/null +++ b/doc/thesis/figures/data/qam_sim_dynamic_grblock_nlos_etsi_doppler70.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + +import utils +import numpy as np + +# get array of samples [channel, synchronized, equalized, locked] +samples = utils.load_samples(__file__) + +# range of samples we want to show +start = 1e3 +end = start +800 + +# select every second samples +select_samples = lambda arr: arr[int(start):int(end):8] +values = map(select_samples, samples) + +# split into imaginary and real parts +get_parts = lambda v: (np.real(v), np.imag(v)) +parts = [p for v in map(get_parts, values) for p in v] + +# zip data and add header +data = np.array(list(zip(*parts))) +headers = [ + "channel_re", "channel_im", + "synchronized_re", "synchronized_im", + "equalized_re", "equalized_im", + "locked_re", "locked_im" +] + +# save to file +utils.save_to_file(__file__, data, headers) |