diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-07-24 19:29:28 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-07-24 19:29:28 +0200 |
commit | 7cf035567488dae9326e55b9290be50e0fd5e56f (patch) | |
tree | 33e7c133158e85cadc364ebd39f32063934f2025 /correlate_with_ref.py | |
parent | 694fe86688a003c8ab468afb1f72f3cd8bd617cc (diff) | |
download | odr-dab-cir-7cf035567488dae9326e55b9290be50e0fd5e56f.tar.gz odr-dab-cir-7cf035567488dae9326e55b9290be50e0fd5e56f.tar.bz2 odr-dab-cir-7cf035567488dae9326e55b9290be50e0fd5e56f.zip |
Add bottle.py based webpage
Diffstat (limited to 'correlate_with_ref.py')
-rwxr-xr-x | correlate_with_ref.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/correlate_with_ref.py b/correlate_with_ref.py index 0199730..c086567 100755 --- a/correlate_with_ref.py +++ b/correlate_with_ref.py @@ -25,11 +25,15 @@ class CIR_Correlate: channel_out2 = channel_out1.reshape(2, int(len(channel_out1)/2)) channel_out3 = channel_out2[0,...] + 1j * channel_out2[1,...] self.channel_out = channel_out3.astype(np.complex64) / 256.0 - (0.5+0.5j) - elif sys.argv[1] == "fc64": + elif iq_format == "fc64": self.channel_out = np.fromfile(iq_filename, np.complex64) + else: + raise ValueError("Unsupported format {}".format(iq_format)) - print(" File contains {} samples ({}ms)".format( - len(self.channel_out), len(self.channel_out) / 2048000.0)) + print(" File contains {} samples ({}ms, {} transmission frames)".format( + len(self.channel_out), + len(self.channel_out) / 2048000.0, + len(self.channel_out) / T_TF)) # Keep track of where the NULL symbols are located self.null_symbol_ixs = [] @@ -97,7 +101,7 @@ class CIR_Correlate: pp.subplot(212) pp.imshow(cirs) - if file_figure: + if plot_file: pp.savefig(plot_file) else: pp.show() |