diff options
author | sara <sara.halter@gmx.ch> | 2021-12-18 18:46:14 +0100 |
---|---|---|
committer | sara <sara.halter@gmx.ch> | 2021-12-18 18:46:14 +0100 |
commit | c94a745f532edfa33a620f90c04e7b6e76de8531 (patch) | |
tree | 7e6b148d11419376349a59b6023c7651cae76e0f /doc/thesis/figures/data/qpsk_sim_dynamic_grblock_los_etsi_doppler70_k5.py | |
parent | littel changes doku (diff) | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
download | Fading-c94a745f532edfa33a620f90c04e7b6e76de8531.tar.gz Fading-c94a745f532edfa33a620f90c04e7b6e76de8531.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to '')
-rw-r--r-- | doc/thesis/figures/data/qpsk_sim_dynamic_grblock_los_etsi_doppler70_k5.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/thesis/figures/data/qpsk_sim_dynamic_grblock_los_etsi_doppler70_k5.py b/doc/thesis/figures/data/qpsk_sim_dynamic_grblock_los_etsi_doppler70_k5.py new file mode 100644 index 0000000..eae2afc --- /dev/null +++ b/doc/thesis/figures/data/qpsk_sim_dynamic_grblock_los_etsi_doppler70_k5.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):4] +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) |