diff options
author | sara <sara.halter@gmx.ch> | 2021-12-21 13:09:35 +0100 |
---|---|---|
committer | sara <sara.halter@gmx.ch> | 2021-12-21 13:09:35 +0100 |
commit | 5a430d5c1982fc6f52c2402ba34da26d5ff16996 (patch) | |
tree | a638b0b767c006b14e332ae7da2a051c8c693a6e /doc/thesis/figures/data/qam_sim_dynamic_grblock_los_etsi_doppler5_k5.py | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
parent | Add more data for QAM, fix colormap (diff) | |
download | Fading-5a430d5c1982fc6f52c2402ba34da26d5ff16996.tar.gz Fading-5a430d5c1982fc6f52c2402ba34da26d5ff16996.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'doc/thesis/figures/data/qam_sim_dynamic_grblock_los_etsi_doppler5_k5.py')
-rw-r--r-- | doc/thesis/figures/data/qam_sim_dynamic_grblock_los_etsi_doppler5_k5.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/thesis/figures/data/qam_sim_dynamic_grblock_los_etsi_doppler5_k5.py b/doc/thesis/figures/data/qam_sim_dynamic_grblock_los_etsi_doppler5_k5.py new file mode 100644 index 0000000..a644402 --- /dev/null +++ b/doc/thesis/figures/data/qam_sim_dynamic_grblock_los_etsi_doppler5_k5.py @@ -0,0 +1,35 @@ +#!/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 = 10e3 +end = start +40000 + +# select every second samples +select_samples = lambda arr: arr[int(start):int(end):200] +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] + +# add 'samplenr' metadata +parts += [np.arange(0, len(parts[0]))] + +# zip data and add header +data = np.concatenate([np.array(list(zip(*parts)))]) +headers = [ + "channel_re", "channel_im", + "synchronized_re", "synchronized_im", + "equalized_re", "equalized_im", + "locked_re", "locked_im", + "samplenr", +] + +# save to file +utils.save_to_file(__file__, data, headers) |