id4_common.devices.scaler ========================= .. py:module:: id4_common.devices.scaler .. autoapi-nested-parse:: Scalers Module Contents --------------- .. py:class:: PresetMonitorSignal(*args, **kwargs) Bases: :py:obj:`ophyd.signal.Signal` Signal that control the selected monitor channel .. py:method:: get(**kwargs) Return the monitor preset converted to seconds for the time channel. .. py:method:: 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.) :type metadata: dict, optional :param force: Check the value prior to setting it, defaults to False :type force: bool, optional .. py:class:: LocalScalerCH(*args, **kwargs) Bases: :py:obj:`id4_common.devices.counters_mixin.CountersMixin`, :py:obj:`ophyd.scaler.ScalerCH` ScalerCH subclass with a flexible monitor channel and plot/read channel selection. .. py:attribute:: preset_time :value: None .. py:attribute:: 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. .. py:attribute:: freq .. py:property:: channels_name_map Return a dict mapping EPICS channel name strings to component attribute names. .. py:method:: select_plot_channels(chan_names=None) Set the Kind of each channel to hinted (in chan_names) or normal (others). .. py:method:: select_read_channels(chan_names=None) Select channels based on the EPICS name PV. :param chan_names: The names (as reported by the channel.chname signal) of the channels to select. If *None*, select all channels named in the EPICS scaler. :type chan_names: Iterable[str] or None .. py:property:: monitor Return the EPICS name of the currently selected monitor channel. .. py:property:: plot_options Return a list of all named scaler channel names available for plotting. .. py:method:: select_plot(channels) Set the hinted kind for the given channels by delegating to select_plot_channels. .. py:property:: label_option_map :type: dict Identity map — scaler labels are already field names after match_names(). .. py:method:: 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(). .. py:method:: default_settings() Set default monitor to chan01 and select all named read and plot channels.