devices Package

base Module

Basic device class

class pyfusion.devices.base.Device(config_name, **kwargs)[source]

Bases: object

Represent a laboratory device.

In general, a customised subclass of Device will be used.

Usage: Device(device_name, **kwargs)

Arguments: device_name – name of device as listed in configuration file,

i.e.: [Device:device_name]

Keyword arguments: Any setting in the [Device:device_name] section of the configuration file can be overridden by supplying a keyword argument to here, e.g.: Device(device_name)

getdata(shots, diag)[source]
pyfusion.devices.base.getDevice(device_name)[source]

Find and instantiate Device (sub)class from config.

pyfusion.devices.base.orm_load_devices(man)[source]

tests Module

Test cases for pyfusion.devices.

class pyfusion.devices.tests.CheckDevice[source]

Bases: pyfusion.test.tests.PfTestBase

Test for the Device class in pyfusion.devices.base.

testDeviceAcquisition()[source]

Test that we can use an acquisition specified in config file.

testORM()[source]

Check that creating a new device is reflected in the database

test_device_keyword_args()[source]

Check that Device correctly processes config/kwarg options.

test_device_no_config()[source]

Check Device works with only keyword args (no reference to config)

class pyfusion.devices.tests.CheckEmptyDevice[source]

Bases: pyfusion.test.tests.PfTestBase

Make sure things don’t fail for device with no config settings.

test_empty_device()[source]
class pyfusion.devices.tests.CheckGetDevice[source]

Bases: pyfusion.test.tests.PfTestBase

test getDevice.

test_getDevice()[source]
test_getDevice_from_pf()[source]
class pyfusion.devices.tests.TestDeviceGetdata[source]

Bases: pyfusion.test.tests.PfTestBase

dev = False
test_device_getdata_single_shot()[source]
test_device_getdatat_multishot()[source]