From 90f12d729a20f0f63f3eca775da9f7be345db7dc Mon Sep 17 00:00:00 2001 From: LorenzoMonti Date: Fri, 28 Jan 2022 11:03:04 +0100 Subject: [PATCH] Fix exponent notation for frequency values --- src/Anritsu_MS2830A.py | 6 +++--- src/Utils.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Anritsu_MS2830A.py b/src/Anritsu_MS2830A.py index 19004ab..9187151 100644 --- a/src/Anritsu_MS2830A.py +++ b/src/Anritsu_MS2830A.py @@ -141,7 +141,7 @@ class Anritsu_MS2830A(): """ sets the center frequency """ - self._visainstrument.write('CNF %i' % (centerfreq)) + self._visainstrument.write('CNF %e' % (centerfreq)) def do_get_centerfreq(self): """ @@ -167,7 +167,7 @@ class Anritsu_MS2830A(): sets the start frequency """ - self._visainstrument.write('STF %i'%(freq)) + self._visainstrument.write('STF %e'%(freq)) def do_get_startfreq(self): """ @@ -181,7 +181,7 @@ class Anritsu_MS2830A(): sets the stop frequency """ - self._visainstrument.write('SOF %i'%(freq)) + self._visainstrument.write('SOF %e'%(freq)) def do_get_stopfreq(self): """ diff --git a/src/Utils.py b/src/Utils.py index ae5d519..496b34c 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -27,7 +27,7 @@ def set_SPA_for_measure(ms2830a, config_file, manual_command): log_list.append("Start Frequency: " + str(ms2830a.do_get_startfreq())) log_list.append("Stop Frequency: " + str(ms2830a.do_get_stopfreq())) - log_list.append("Center Frequency: " + str(ms2830a.do_get_centerfreq())) + #log_list.append("Center Frequency: " + str(ms2830a.do_get_centerfreq())) # Time sweep ms2830a.set_trace_points_sweeptime(config_file["sweep_trace_points"]) -- GitLab