diff options
author | Nao Pross <np@0hm.ch> | 2021-12-18 16:44:44 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-12-18 17:36:28 +0100 |
commit | 3a076cc5f308d7f67ce0a2033b99cff6b841d75c (patch) | |
tree | 7a45b48ed5369ee69ff3107b8383224899c7915b /doc/thesis/figures/data/qpsk_sim_const_static_firblock_los_vec.py | |
parent | Merge branch 'master' of github.com:NaoPross/Fading (diff) | |
download | Fading-3a076cc5f308d7f67ce0a2033b99cff6b841d75c.tar.gz Fading-3a076cc5f308d7f67ce0a2033b99cff6b841d75c.zip |
Rename flowgraph data files and remove static simulations
Diffstat (limited to '')
-rw-r--r-- | doc/thesis/figures/data/qpsk_sim_const_static_firblock_los_vec.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/thesis/figures/data/qpsk_sim_const_static_firblock_los_vec.py b/doc/thesis/figures/data/qpsk_sim_const_static_firblock_los_vec.py new file mode 100644 index 0000000..eae2afc --- /dev/null +++ b/doc/thesis/figures/data/qpsk_sim_const_static_firblock_los_vec.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) |