Skip to content

GlazeClient

pyglaze.scanning.GlazeClient

Warning

Ensure that you are properly connected to the lock-in amp, have it selected, and a configuration is chosen.

Open a connection to and start continuously scanning using the Glaze device.

Parameters:

Name Type Description Default
config DeviceConfiguration

Configuration to use for scans

required

__enter__()

Start the scanner and return the client.

__exit__(*args)

Stop the scanner and close the connection.

get_firmware_version()

Get the firmware version of the connected device.

get_serial_number()

Get the serial number of the connected device.

read(n_pulses)

Read a number of pulses from the Glaze system.

Parameters:

Name Type Description Default
n_pulses int

The number of terahertz pulses to read from the CCS server.

required

Examples

Initialize a Scanner and perform two scans
from pyglaze.device import LeDeviceConfiguration
from pyglaze.scanning import GlazeClient


def main() -> None:
    n_pulses = 2
    device_config = LeDeviceConfiguration(
        amp_port="mock_device", delayunit="mock_delay"
    )
    with GlazeClient(device_config) as client:
        unprocessed_waveforms = client.read(n_pulses=n_pulses)


if __name__ == "__main__":
    main()
  1. The config file should be valid JSON of the DeviceConfiguration type. See a list of configuration options under "API Reference > Device".