Lake Shore Adapters¶
-
class
pymeasure.instruments.lakeshore.
LakeShoreUSBAdapter
(port)¶ Bases:
pymeasure.adapters.serial.SerialAdapter
Provides a
SerialAdapter
with the specific baudrate, timeout, parity, and byte size for LakeShore USB communication.Initiates the adapter to open serial communcation over the supplied port.
Parameters: port – A string representing the serial port -
ask
(command)¶ Writes the command to the instrument and returns the resulting ASCII response
Parameters: command – SCPI command string to be sent to the instrument Returns: String ASCII response of the instrument
-
binary_values
(command, header_bytes=0, dtype=<class 'numpy.float32'>)¶ Returns a numpy array from a query for binary data
Parameters: - command – SCPI command to be sent to the instrument
- header_bytes – Integer number of bytes to ignore in header
- dtype – The NumPy data type to format the values with
Returns: NumPy array of values
-
read
()¶ Reads until the buffer is empty and returns the resulting ASCII respone
Returns: String ASCII response of the instrument.
-
values
(command, separator=', ', cast=<class 'float'>)¶ Writes a command to the instrument and returns a list of formatted values from the result
Parameters: - command – SCPI command to be sent to the instrument
- separator – A separator character to split the string into a list
- cast – A type to cast the result
Returns: A list of the desired type, or strings where the casting fails
-
write
(command)¶ Overwrites the
SerialAdapter.write
method to automatically append a Unix-style linebreak at the end of the command.Parameters: command – SCPI command string to be sent to the instrument
-