trspectrometer.plugins.interface.dummyinterface module

class trspectrometer.plugins.interface.dummyinterface.DummyInterface(**kwargs)[source]

Bases: Interface

An interface class which simulates the presence of an interface device.

To use this interface driver class, ensure "interface" is present in the Configuration File’s load=[...] list inside the Plugins section, then include a section such as this in the Configuration File under the [hardware] section:

[[hardware.interface]]
name = "Interface"
class = "DummyInterface"

Note that multiple interfaces may be added, indicated by the double square brackets around the section header. The same class type may be initialised multiple times with different values for its options. Acquisition methods may then select which interface entry to use.

arm() None[source]

Arm the device, ready to be triggered by an external signal.

This acts similarly to using the start() method, but instead of immediately starting to trigger the detector, the interface will wait for a trigger signal from an external input, such as the “movement” signal from an attached delay stage.

This method is used by the ta_swept acquisition method, which requires a delay which provides both raw encoder position and movement trigger signals to the interface hardware.

set_encoder_count(value: int) None[source]

Configure the current value for the delay quadrature encoder reading.

This should be set to match the delay’s own record of its quadrature value. Note that to ensure accuracy, the delay should be homed and stopped prior to reading its quadrature position.

Parameters:

value – New quadrature encoder value.

start(count=0) None[source]

Begin acquisition of data.

The triggering of the detector will start immediately, and the state of the delay encoder and chopper will be collected for each trigger pulse sent to the detector. To stop the triggering, call the stop() method. Once stopped, data will be returned to any functions previously registered using the register_data_callback() method.

Setting the count parameter to a positive integer will cause the triggering to stop after the given number of trigger pulses have been sent. The default of 0 means to trigger until the stop() method is called.

Parameters:

count – Number of trigger of trigger pulses to send.

stop() None[source]

Abort the acquisition of data.

This will stop the interface regardless of whether it was started with the trigger(), start(), or arm() methods.

description

Description of this interface device.