doocspie.gui

This subpackage provides the modules for providing support for graphical user interfaces (GUIs).

datalyzer

Module with datalyzer class for providing a scriptable graphical user interface (GUI).

This module provides the datalyzer class for providing a scriptable GUI for data visualization.

class doocspie.gui.datalyzer.Datalyzer(properties=None, timeout_seconds=10, buffer_size=32, allow_zero_events=False)

Datalyzer class for providing a scriptable graphical user interface (GUI).

This class provides the methods for providing a scriptable GUI for data visualization.

__init__(properties=None, timeout_seconds=10, buffer_size=32, allow_zero_events=False)

Constructor of the datalyzer class.

This constructor initializes the instance with optional parameters (see ‘Args’ below).

Parameters:
  • properties (tuple or dict, optional) – The optional properties to get train events with readouts for.

  • timeout_seconds (int) – The optional timeout seconds for unsuccessful readout.

  • buffer_size (int) – The optional number of buffers to be used for storing previous readouts.

  • allow_zero_events (bool, optional) – The optional state for allow zero train events.

__str__()

Special method to return a properly formatted string representation of the datalyzer.

property registered_functions

The registered functions that can be used for synchronized readout in the datalyzer.

Type:

tuple

property usable_properties

The properties that can be used for synchronized readout in the datalyzer.

Type:

tuple

property unusable_properties

The properties that cannot be used for synchronized readout in the datalyzer.

Type:

tuple

property zero_event_properties

The properties that have an event number of ‘zero’.

Type:

tuple

property actual_properties

The properties that can actually be readout in the datalyzer.

Type:

tuple

add(address, label=None, offset=None, timestamp_event=None, meta_event=None, start=None, elements=None)

Add address with optional parameters to the properties for synchronous readout.

Parameters:
  • address (str) – The DOOCS address to add to the properties for synchronous readout.

  • label (str, optional) – Optional label for DOOCS address as a means for alternative property access.

  • offset (int, optional) – Optional offset to be applied on event numbers for synchronization.

  • timestamp_event (bool, optional) – Optional state to determine using the timestamp as an alternative event.

  • meta_event (str, optional) – Optional Meta property to replace the default event with.

  • start (int, optional) – Optional start position for reading out array-like types.

  • elements (int, optional) – Optional number of elements to read out for array-like types.

Returns:

None

Raises:

DoocspieException – Doocspie related exception for address duplication.

add_axis_labels(source, x_label=None, y_label=None)

Add axis labels to the given data source (either a property added or a registered function).

Parameters:
  • source (str) – The data source (property or registered function) to add the axis labels to.

  • x_label (str, optional) – Optional x-label for the given source.

  • y_label (str, optional) – Optional y-label for the given source.

Returns:

None

update()

Update the newly added properties to for synchronous readout.

Returns:

None

register(arg)

Decorator with optional label supplied via argument for registration of a function.

Parameters:

arg (str or function) – Either a label (str) attached to the function or the function itself.

Returns:

None

Raises:

DoocspieException – Doocspie related exception for an already registered function label.

startup()

Start up the datalyzer GUI application.

Returns:

None

property_server

Module with property server class for simplified access to the property servers.

This module provides the property server class for simplified access to property servers at FLASH.

class doocspie.gui.property_server.PropertyServer

PropertyServer class for simplified access to the property servers.

This class provides the property server class for simplified access to property servers at FLASH.

get_locations(full_address=False)

Get all available property server locations with the option to return the full addresses.

Parameters:

full_address (bool, optional) – The optional state for returning the full addresses.

Returns:

All available property server locations.

Return type:

tuple

get_properties_of_location(location, full_address=False)

Get all available property server properties with the option to return the full addresses.

Parameters:
  • location (str) – The property server location to request the properties from.

  • full_address (bool, optional) – The optional state for returning the full addresses.

Returns:

All available property server properties.

Return type:

tuple

Raises:

ValueError – Exception for non-existing location.

get(location, property)

Get the readout from the property server for the given location and property.

Parameters:
  • location (str) – The property server location to request the readout for the property from.

  • property (str) – The actual property to request the readout from.

Returns:

An instance of the readout object from the property server for the given location and property.

Return type:

Readout

Raises:
  • ValueError – Exception for non-existing location and/or property or not supported full address input.

  • DoocspieException – Doocspie related exception for unexpected events.

set(location, property, value, allow_resizing=False)

Set the property server content for the given location and property with the given value.

Parameters:
  • location (str) – The property server location of the property to set the value to.

  • property (str) – The actual property to set the value to.

  • value (property dependent) – The value to set the property to.

  • allow_resizing (bool, optional) – The optional state for allowing resizing of array-like DOOCS types.

Returns:

None

Raises:
  • ValueError – Exception non-existing location and/or property or for not supported full address input.

  • DoocspieException – Doocspie related exception for unexpected events.