data_sources_http
HTTP-based data sources.
This module contains Data Source classes that deal with data retrieved from the HTTP/REST interface of detectors manufactured by the company Dectris.
Eiger16MHttp
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Detector data frames from Eiger 16M's HTTP/REST interface.
This class deals with the retrieval of Eiger 16M detector data frames from the detector's HTTP/REST interface.
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 Eiger 16M's HTTP/REST data 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 the Eiger 16M'S HTTP/REST- interface, so this function actually does nothing.
get_data(*, event)
Retrieves an Eiger 16M detector data frame.
Please see the documentation of the base Protocol class for additional information about this method.
This function extracts the detector data frame stored in the provided HTTP/REST-based event. It 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. |
TimestampEiger16MHttp
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Timestamp information from Eiger's 16M HTTP/REST interface.
This class deals with the retrieval of timestamp information for data events originating from an Eiger 16M's HTTPS/REST interface.
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 Eiger 16M's HTTP/REST interface 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 the Eiger 16M's HTTP/REST interface, so this function actually does nothing.
get_data(*, event)
Retrieves timestamp information from an Eiger 16M'S HTTP/REST interface.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves the timestamp information associated with the provided HTTPS/REST-based event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
numpy.float64
|
The timestamp of the Jungfrau 1M data event. |
EventIdEiger16MHttp
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Event identifier from Eiger 16M's HTTP/REST interface.
This class deals with the retrieval of unique event identifiers for events originating from an Eiger 16M's HTTP/REST interface.
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 Eiger 16M's HTTP/REST interface event identifier data source.
Please see the documentation of the base Protocol class for additional information about this method.
No initialization is needed to retrieve event identifiers for Eiger 16M data events, so this function actually does nothing.
get_data(*, event)
Retrieves an event identifier from an Eiger 16M'S HTTP/REST interface.
Please see the documentation of the base Protocol class for additional information about this method.
A data event retrieved from Eiger 16M's HTTP/REST interface contains detector
frame data in the format of a TIFF image. The combination of the series_id and
frame_id tags retrieved from the header of the TIFF image are used to
generate an event identifier, with the format: `
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
str
|
A unique event identifier. |