id4_common.devices.scaler#

Scalers

Module Contents#

class id4_common.devices.scaler.PresetMonitorSignal(*args, **kwargs)#

Bases: ophyd.signal.Signal

Signal that control the selected monitor channel

get(**kwargs)#

Return the monitor preset converted to seconds for the time channel.

put(value, *, timestamp=None, force=False, metadata=None)#

Put updates the internal readback value.

The value is optionally checked first, depending on the value of force. In addition, VALUE subscriptions are run. Extra kwargs are ignored (for API compatibility with EpicsSignal kwargs pass through). :param value: Value to set :type value: any :param timestamp: The timestamp associated with the value, defaults to time.time() :type timestamp: float, optional :param metadata: Further associated metadata with the value (such as alarm status,

severity, etc.)

Parameters:

force (bool, optional) – Check the value prior to setting it, defaults to False

class id4_common.devices.scaler.LocalScalerCH(*args, **kwargs)#

Bases: id4_common.devices.counters_mixin.CountersMixin, ophyd.scaler.ScalerCH

ScalerCH subclass with a flexible monitor channel and plot/read channel selection.

preset_time = None#
preset_monitor#

Return the ophyd signal used to control scan count time.

Resolved by walking the dotted path in _preset_monitor_attr. Set that class attribute in subclasses instead of overriding this property.

freq#
property channels_name_map#

Return a dict mapping EPICS channel name strings to component attribute names.

select_plot_channels(chan_names=None)#

Set the Kind of each channel to hinted (in chan_names) or normal (others).

select_read_channels(chan_names=None)#

Select channels based on the EPICS name PV.

Parameters:

chan_names (Iterable[str] or None) – The names (as reported by the channel.chname signal) of the channels to select. If None, select all channels named in the EPICS scaler.

property monitor#

Return the EPICS name of the currently selected monitor channel.

property plot_options#

Return a list of all named scaler channel names available for plotting.

select_plot(channels)#

Set the hinted kind for the given channels by delegating to select_plot_channels.

property label_option_map: dict#

Identity map — scaler labels are already field names after match_names().

field_for_label(label)#

Return the ophyd field name for a plot-option label.

For scalers the label is already the field name after match_names().

default_settings()#

Set default monitor to chan01 and select all named read and plot channels.