skippylab.scpi package

Submodules

skippylab.scpi.commands module

A namespace for oscilloscope string commands. The commands are send as ASCII to the scope using a socket connection

class skippylab.scpi.commands.KeysightE3631APowerSupplyCommands[source]

Bases: object

Namespace for the commands of the KeysightE3631APowerSupply

APPLY = 'APPLY'
CHANNEL = 'INST'
CURRENT = 'CURRENT'
DC = 'DC'
ERROR_STATEQ = 'SYST:ERR?'
MEASURE = 'MEASURE'
N25 = 'N25V'
OFF = 'OFF'
ON = 'ON'
OUTPUT = 'OUTPUT:STATE'
P25 = 'P25V'
P6 = 'P6V'
VOLT = 'VOLT'
class skippylab.scpi.commands.RhodeSchwarzRTO1044Commands[source]

Bases: object

Namespace for the commands for the RhodeSchwarz oscilloscope

CH1 = 'CHAN1'
CH2 = 'CHAN2'
CH3 = 'CHAN3'
CH4 = 'CHAN4'
CURVE = 'DATA:VALues?'
N_ACQUISITONS = 'ACQuire:CURRent?'
RUN = 'RUN'
SINGLE = 'SINGLE'
STOP = 'STOP'
WAVEFORM = 'DATA?'
WF_HEADER = 'DATA:HEADer?'
class skippylab.scpi.commands.TektronixDPO4104BCommands[source]

Bases: object

Namespace for the commands for the TektronixDP04104B

ACQUISITON_MODE = 'ACQuire:STOPAfter'
CH1 = 'CH1'
CH2 = 'CH2'
CH3 = 'CH3'
CH4 = 'CH4'
N_ACQUISITIONS = 'ACQuire:NUMACq?'
OFF = 'OFF'
ON = 'ON'
ONE = '1'
TRIGGER_FREQUENCYQ = 'TRIGger:FREQuency?'
TRIGGER_FREQUENCY_ENABLED = 'DISplay:TRIGFrequency'
WF = 'WAVFrm?'
WF_BYTEWIDTH = 'DATA:WIDTH'
WF_HEADER = 'WFMOutpre:BYT_Nr?;:WFMOutpre:ENCdg?; :WFMOutpre:NR_Pt?; :WFMOutpre:XZEro?; :WFMOutpre:XINcr?; :WFMOutpre:YZEro?; :WFMOutpre:YOFf?; :WFMOutpre:YMUlt?; :WFMOutpre:XUNit?; :WFMOutpre:YUNit?; '
WF_NOHEAD = 'CURVE?'
ZERO = '0'
skippylab.scpi.commands.add_arg(cmd, arg)[source]

Add an argument to a command string. Concat the two.

Parameters:
  • cmd (str) – The base command
  • arg (str) – An argument
Returns:

str

skippylab.scpi.commands.clean_response(response)[source]

Remove some EOL remainders from the resulting scope response

Parameters:response (str) – response from the scope
Returns:str
skippylab.scpi.commands.concat(*cmd)[source]

Combine several commands

Parameters:cmd – list of commands
Returns:str
skippylab.scpi.commands.histbox_coordinates(left, top, right, bottom)[source]

Create a string for the box coordinates for the histogram set up by the scope itself. The result can be send to the scope to set the box.

Parameters:
  • left (int) –
  • top (int) –
  • right (int) –
  • bottom (int) –
Returns:

str

skippylab.scpi.commands.parse_curve_data(header, curve)[source]

Make sense out of that what is returned by CURVE. This works only if the scope is set to return the data in ASCII, not binary.

Parameters:
  • header (dict) – a parsed header
  • curv (str) – returned by CURVE?
Returns:

np.ndarray xs, np.ndarray values

Return type:

tuple

skippylab.scpi.commands.query(cmd)

Module contents