Loading src/Anritsu_MS2830A.py +4 −4 Original line number Diff line number Diff line Loading @@ -96,9 +96,9 @@ class Anritsu_MS2830A(): # TIME SWEEP # ###################################### def do_get_sweeptime(self): def get_sweeptime(self): """ gets the center frequency query the sweep time """ return float(self._visainstrument.query('swe:time?')) Loading Loading @@ -294,12 +294,12 @@ class Anritsu_MS2830A(): # TRACE # ###################################### def get_trace(self, tracenumber=1, sleeping_time=25): def get_trace(self, tracenumber=1): """ gets trace data """ # in ASCII form (slow, but human readable) and binary (fast, but more difficult to debug) sleep(sleeping_time) sleep(self.get_sweeptime() + 1) trace = self._visainstrument.query_ascii_values("TRAC? TRAC%i" %(tracenumber) , container = np.array) # Trace A (default) return trace Loading src/pyvisa_commands.py +4 −1 Original line number Diff line number Diff line Loading @@ -15,9 +15,11 @@ print("Who am i? " + inst.query("*IDN?")) inst.write("*RST") # Preset print("Self Test: " + inst.query("*TST?")) print("SW: " + inst.query("swe:time?")) #inst.write("INST SPECT") # set Spectrum Analyzer inst.write("INST SPECT") # set Spectrum Analyzer """ ###################################### # FREQUENCY # ###################################### Loading Loading @@ -72,3 +74,4 @@ print(track) #inst.write("*WAI") #print("Measurement status query: " + inst.query("MSTAT?")) """ No newline at end of file Loading
src/Anritsu_MS2830A.py +4 −4 Original line number Diff line number Diff line Loading @@ -96,9 +96,9 @@ class Anritsu_MS2830A(): # TIME SWEEP # ###################################### def do_get_sweeptime(self): def get_sweeptime(self): """ gets the center frequency query the sweep time """ return float(self._visainstrument.query('swe:time?')) Loading Loading @@ -294,12 +294,12 @@ class Anritsu_MS2830A(): # TRACE # ###################################### def get_trace(self, tracenumber=1, sleeping_time=25): def get_trace(self, tracenumber=1): """ gets trace data """ # in ASCII form (slow, but human readable) and binary (fast, but more difficult to debug) sleep(sleeping_time) sleep(self.get_sweeptime() + 1) trace = self._visainstrument.query_ascii_values("TRAC? TRAC%i" %(tracenumber) , container = np.array) # Trace A (default) return trace Loading
src/pyvisa_commands.py +4 −1 Original line number Diff line number Diff line Loading @@ -15,9 +15,11 @@ print("Who am i? " + inst.query("*IDN?")) inst.write("*RST") # Preset print("Self Test: " + inst.query("*TST?")) print("SW: " + inst.query("swe:time?")) #inst.write("INST SPECT") # set Spectrum Analyzer inst.write("INST SPECT") # set Spectrum Analyzer """ ###################################### # FREQUENCY # ###################################### Loading Loading @@ -72,3 +74,4 @@ print(track) #inst.write("*WAI") #print("Measurement status query: " + inst.query("MSTAT?")) """ No newline at end of file