Python backend for command line programmes¶
Python backend for installed command line programmes. These can also be integrated in python scripts or used as examples.
list_visa_devices()
: listing visa devicespath_of_config()
: finding path of config.py to set default optionsget_single_trace()
: taking a single trace and saving it to csv and pngget_traces_single_connection_loop()
get_traces_connect_each_time_loop()
: two programmes for taking multiple traces when a key is pressed, see descriptions for differenceget_num_traces()
: get a specific number of traces
-
keyoscacquire.programmes.
get_num_traces
(fname='data', ext='.csv', num=1, address='USB0::1234::1234::MY1234567::INSTR', timeout=15000, wav_format='WORD', channels=None, acq_type='HRESolution', num_averages=None, p_mode='RAW', num_points=0, start_num=0, file_delim=' n')[source]¶ This program connects to the oscilloscope, sets options for the acquisition, and captures and stores ‘num’ traces.
-
keyoscacquire.programmes.
get_single_trace
(fname='data', ext='.csv', address='USB0::1234::1234::MY1234567::INSTR', timeout=15000, wav_format='WORD', channels=None, acq_type='HRESolution', num_averages=None, p_mode='RAW', num_points=0)[source]¶ This programme captures and stores a single trace.
-
keyoscacquire.programmes.
get_traces_connect_each_time_loop
(fname='data', ext='.csv', address='USB0::1234::1234::MY1234567::INSTR', timeout=15000, wav_format='WORD', channels=None, acq_type='HRESolution', num_averages=None, p_mode='RAW', num_points=0, start_num=0, file_delim=' n')[source]¶ This program consists of a loop in which the program connects to the oscilloscope, a trace from the active channels are captured and stored for each loop.
This permits the active channels to be changing thoughout the measurements, but has larger overhead due to establishing and closing a new connection every time.
The loop runs each time ‘enter’ is hit. Alternatively one can input n-1 characters before hitting ‘enter’ to capture n traces back to back. To quit press ‘q’+’enter’.
-
keyoscacquire.programmes.
get_traces_single_connection_loop
(fname='data', ext='.csv', address='USB0::1234::1234::MY1234567::INSTR', timeout=15000, wav_format='WORD', channels=None, acq_type='HRESolution', num_averages=None, p_mode='RAW', num_points=0, start_num=0, file_delim=' n')[source]¶ This program connects to the oscilloscope, sets options for the acquisition and then enters a loop in which the program captures and stores traces each time ‘enter’ is pressed.
Alternatively one can input n-1 characters before hitting ‘enter’ to capture n traces back to back. To quit press ‘q’+’enter’. This programme minimises overhead for each measurement, permitting measurements to be taken with quicker succession than if connecting each time a trace is captured. The downside is that which channels are being captured cannot be changing thoughout the measurements.