trspectrometer.plugins.chopper.dummychopper module

class trspectrometer.plugins.chopper.dummychopper.DummyChopper(**kwargs)[source]

Bases: Chopper

A dummy chopper class which simulates the presence of a real chopper device.

To use this chopper driver class, ensure "chopper" 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.chopper]]
name = "Chopper"
class = "DummyChopper"

Note that multiple choppers may be added, indicated by the double square brackets around the section header. Acquisition methods may then select which chopper entry to use.

get_divider() int[source]

Get the frequency divider of the chopper.

Returns:

Frequency divider.

get_enabled() bool[source]

Get the current running state of the chopper.

Returns:

True if chopper is running, False if not.

get_frequency() Optional[int][source]

Get the source frequency of the chopper.

A value of None indicates that the frequency is synced to an external source.

Returns:

Source frequency, or None if external sync.

set_divider(value: int) None[source]

Set the frequency divider of the chopper.

Parameters:

value – Frequency divider.

set_enabled(value: bool) None[source]

Set the current running state of the chopper.

Parameters:

valueTrue to start the chopper, False to stop.

set_frequency(value: Optional[int]) None[source]

Set the internal source frequency of the chopper.

A value of None indicates that the frequency should be synced to an external source.

Parameters:

value – Source frequency, or None if external sync.

description

Description of the chopper device.