Skip to content

data_sources_asapo

ASAP::O-related data sources.

This module contains Data Source classes that deal with data retrieved from the ASAP::O software framework (used at the PETRA III facility).

EigerAsapo

Bases: OmDataSourceProtocol

See documentation of the __init__ function.

__init__(*, data_source_name, monitor_parameters)

Eiger 16M detector data frames from ASAP::O at the PETRA III facility.

This class deals with the retrieval of EIGER 16M detector data frames from the ASAPO software framework, as used at the PETRA III facility.

This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.

Parameters:

Name Type Description Default
data_source_name str

A name that identifies the current data source. It is used, for example, in communications with the user or for the retrieval of a sensor's initialization parameters.

required
monitor_parameters MonitorParameters

An object storing OM's configuration parameters.

required

initialize_data_source()

Initializes the ASAP::O Eiger 16M detector data frame source.

Please see the documentation of the base Protocol class for additional information about this method.

No initialization is needed to retrieve detector data frames from ASAP::O, so this function actually does nothing.

get_data(*, event)

Retrieves an Eiger 16M detector data frame from ASAP::O.

Please see the documentation of the base Protocol class for additional information about this method.

This function retrieves from ASAP::O the detector data frame associated with the provided event, and returns the detector frame as a 2D array storing pixel information.

Parameters:

Name Type Description Default
event Dict[str, Any]

A dictionary storing the event data.

required

Returns:

Type Description
Union[NDArray[numpy.float_], NDArray[numpy.int_]]

A detector data frame.

TimestampAsapo

Bases: OmDataSourceProtocol

See documentation of the __init__ function.

__init__(*, data_source_name, monitor_parameters)

Timestamp information from ASAP::O at the PETRA III facility.

This class deals with the retrieval of timestamp information from the ASAP::O software framework. ASAP::O provides this information for each event.

This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.

Parameters:

Name Type Description Default
data_source_name str

A name that identifies the current data source. It is used, for example, in communications with the user or for the retrieval of a sensor's initialization parameters.

required
monitor_parameters MonitorParameters

An object storing OM's configuration parameters.

required

initialize_data_source()

Initializes the ASAP::O timestamp data source.

Please see the documentation of the base Protocol class for additional information about this method.

No initialization is needed to retrieve timestamp information from ASAP::O, so this function actually does nothing.

get_data(*, event)

Retrieves timestamp information from ASAP::O.

Please see the documentation of the base Protocol class for additional information about this method.

This function retrieves from ASAP::O the timestamp information associated with the provided event.

Parameters:

Name Type Description Default
event Dict[str, Any]

A dictionary storing the event data.

required

Returns:

Type Description
numpy.float64

The timestamp for the data event.

EventIdAsapo

Bases: OmDataSourceProtocol

See documentation of the __init__ function.

__init__(*, data_source_name, monitor_parameters)

Data event identifiers from ASAP::O at the PETRA III facility.

This class deals with the retrieval of unique event identifiers for ASAP::O-based data events.

This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.

Parameters:

Name Type Description Default
data_source_name str

A name that identifies the current data source. It is used, for example, in communications with the user or for the retrieval of a sensor's initialization parameters.

required
monitor_parameters MonitorParameters

An object storing OM's configuration parameters.

required

initialize_data_source()

Initializes the ASAP::O event identifier data source.

Please see the documentation of the base Protocol class for additional information about this method.

No initialization is required to retrieve event identifiers for ASAP::O, so this function actually does nothing.

get_data(*, event)

Retrieves an event identifier from ASAP::O.

Please see the documentation of the base Protocol class for additional information about this method.

This function retrieves a unique event identifier for the provided event. Since an ASAP::O-based OM data event corresponds to the content of a single ASAP::O event, the function constructs the event identifier by joining the following elements in a single string, with the "//" symbol placed between them:

  • The name of the ASAP::O stream.

  • The ID of the ASAP::O event in the stream.

Parameters:

Name Type Description Default
event Dict[str, Any]

A dictionary storing the event data.

required

Returns:

Type Description
str

A unique event identifier.

BeamEnergyAsapo

Bases: OmDataSourceProtocol

See documentation of the __init__ function.

__init__(*, data_source_name, monitor_parameters)

Beam energy information from ASAP::O at the PETRA III facility.

This class deals with the retrieval of beam energy information from ASAP::O. ASAP::O provides this information for each event.

This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.

Parameters:

Name Type Description Default
data_source_name str

A name that identifies the current data source. It is used, for example, in communications with the user or for the retrieval of a sensor's initialization parameters.

required
monitor_parameters MonitorParameters

An object storing OM's configuration parameters.

required

initialize_data_source()

Initializes the ASAP::O beam energy data source.

Please see the documentation of the base Protocol class for additional information about this method.

No initialization is required to retrieve beam energy information from ASAP::O, so this function actually does nothing.

get_data(*, event)

Retrieves beam energy information from ASAP::O.

Please see the documentation of the base Protocol class for additional information about this method.

This function retrieves from ASAP::O the beam energy information associated with the provided event.

Parameters:

Name Type Description Default
event Dict[str, Any]

A dictionary storing the event data.

required

Returns:

Type Description
float

The beam energy.

DetectorDistanceAsapo

Bases: OmDataSourceProtocol

See documentation of the __init__ function.

__init__(*, data_source_name, monitor_parameters)

Detector distance information from ASAP::O at the PETRA III facility.

This class deals with the retrieval of detector distance information from ASAP::O. ASAP::O provides this information for each event.

This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.

Parameters:

Name Type Description Default
data_source_name str

A name that identifies the current data source. It is used, for example, in communications with the user or for the retrieval of a sensor's initialization parameters.

required
monitor_parameters MonitorParameters

An object storing OM's configuration parameters.

required

initialize_data_source()

Initializes the ASAP::O detector distance data source.

Please see the documentation of the base Protocol class for additional information about this method.

No initialization is required to retrieve detector distance information from ASAP::O, so this function actually does nothing.

get_data(*, event)

Retrieves detector distance information from ASAP::O.

Please see the documentation of the base Protocol class for additional information about this method.

This function retrieves from ASAP::O the detector distance information associated with the provided event.

Parameters:

Name Type Description Default
event Dict[str, Any]

A dictionary storing the event data.

required

Returns:

Type Description
float

The beam energy.