data_sources_psana
Psana-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).
This module contains Data Source classes that deal with data retrieved from the psana software framework (used at the LCLS facility).
CspadPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
CSPAD detector data frames from psana at the LCLS facility.
This class deals with the retrieval of CSPAD detector data frames from the psana software framework.
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 psana CSPAD detector frame data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes data retrieval for the detector whose psana name
matches the entry psana_{source_protocols_name}_name
in OM's
data_retrieval_layer
configuration parameter group, or for the detector with
a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves a CSPAD detector data frame from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the detector data frame associated with the
provided event. It returns the frame as a 2D array storing pixel information.
Data is retrieved in calibrated or non-calibrated form depending on the
value of the {source_protocols_name}_calibration
entry in OM's
data_retrieval_layer
configuration parameter group.
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. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
Epix10kaPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Epix10KA 2M detector data frames from psana at the LCLS facility.
This class deals with the retrieval of Epix10Ka 2M detector data frames from the psana software framework.
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 Epix10KA 2M detector frame data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes data retrieval for the detector whose psana name
matches the psana_{source_protocols_name}_name
entry in OM's
data_retrieval_layer
configuration parameter group, or for the detector with
a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves an Epix10KA 2M detector data frame from psana.
This method overrides the corresponding method of the base class: please also refer to the documentation of that class for more information.
This function retrieves from psana the detector data frame associated with the
provided event. It returns the frame as a 2D array storing pixel information.
Data is retrieved in calibrated or non-calibrated form depending on the
value of the {source_protocols_name}_calibration
entry in OM's
data_retrieval_layer
configuration parameter group.
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. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
Jungfrau4MPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Jungfrau 4M detector data frames from psana at the LCLS facility.
This class deals with the retrieval of Jungfrau 4M detector data frames from the psana software framework.
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 psana Jungfrau 4M detector frame data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the data retrieval interface for the detector whose
psana name matches the psana_{source_protocols_name}_name
entry in the
OM's data_retrieval_layer
configuration parameter group, or for the detector
with a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves a Jungfrau 4M detector data frame from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the detector data frame associated with the
provided event. It returns the frame as a 2D array storing pixel information.
Data is retrieved in calibrated or non-calibrated form depending on the
value of the {source_protocols_name}_calibration
entry in OM's
data_retrieval_layer
configuration parameter group..
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. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
Epix100Psana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Epix100 detector data frames from psana at the LCLS facility.
This class deals with the retrieval of Epix 100 detector data frames from the psana software framework.
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 psana Epix100 detector frame data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes data retrieval for the detector whose psana name
matches the psana_{source_protocols_name}_name
entry in OM's
data_retrieval_layer
configuration parameter group, or for the detector with
a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves a Epix100 detector data frame from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the detector data frame associated with the
provided event. It returns the frame as a 2D array storing pixel information.
Data is retrieved in calibrated or non-calibrated form depending on the
value of the {source_protocols_name}_calibration
entry in OM's
data_retrieval_layer
configuration parameter group.
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. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
RayonixPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Rayonix detector data frames at the LCLS facility.
This class deals with the retrieval of Rayonix detector data frames from the psana software framework.
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'a configuration parameters. |
required |
initialize_data_source()
Initializes the psana Rayonix detector frame data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes data retrieval for the detector whose psana name
matches the psana_{source_protocols_name}_name
entry in OM's
data_retrieval_layer
configuration parameter group, or for the detector with
a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves a Rayonix detector data frame from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the detector data frame associated with the provided event. It returns the 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 |
---|---|
NDArray[numpy.float_]
|
A detector data frame. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
OpalPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Opal camera data frames from psana at the LCLS facility.
This class deals with the retrieval of Opal camera data frames from the psana software framework.
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 psana Opal camera frame data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes data retrieval for the camera whose psana name
matches the psana_{source_protocols_name}_name
entry in OM's
data_retrieval_layer
configuration parameter group, or for the camera with
a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves an Opal camera data frame from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the camera data frame associated with the provided event. It returns the 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 |
---|---|
NDArray[numpy.float_]
|
A camera data frame. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
AcqirisPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Acqiris time/voltage waveform data from psana at the LCLS facility.
This class deals with the retrieval of waveform data from an Acqiris time/voltage detector at the LCLS 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 psana Acqiris waveform data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the data retrieval for the Acqiris detector whose
psana name matches the psana_{source_protocols_name}_name
entry in OM's
data_retrieval_layer
configuration parameter group, or for the detector with
a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves Acqiris waveform data from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the waveform data for the provided event. The Acqiris data is retrieved for all of the detector's channels at the same time, and returned in the form of a tuple with two entries:
-
The first entry in the tuple is a 1D array storing information about the time points at which the waveform data has been digitized. The size of this array matches the size of each waveform in the second entry.
-
The second entry is a 2D array that stores the waveform information from all the channels. The first axis of the array corresponds to the channel number, the second one stores, for each channel, the digitized waveform data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
Tuple[NDArray[numpy.float_], NDArray[numpy.float_]]
|
A tuple, with two entries, storing the digitized waveform data from the Acqiris detector. |
AssembledDetectorPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Assembled detector data frames from psana at the LCLS facility.
This class deals with the retrieval of assembled detector data frames from the psana software framework. Assembled detector data frames are detector data frames to which geometry information has already been applied.
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'a configuration parameters. |
required |
initialize_data_source()
Initializes the psana assembled detector frame data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes data retrieval for the detector whose psana name
matches the psana_{source_protocols_name}_name
entry in OM's
data_retrieval_layer
configuration parameter group, or for the detector with
a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves an assembled detector data frame from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the assembled detector data frame associated with the provided event. It returns the 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 |
---|---|
NDArray[numpy.float_]
|
An assembled detector data frame. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
Wave8TotalIntensityPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Wave8 intensity data from psana at the LCLS facility.
This class deals with the retrieval the intensity data recorded by a Wave8 detector from the psana software framework.
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 psana Wave8 intensity data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the intensity data retrieval for the Wave8 detector
whose psana name matches the psana_{source_protocols_name}_name
entry in OM's
data_retrieval_layer
configuration parameter group, or for the detector with
a given psana name, if the source_protocols_name
argument has the format
psana-{psana detector name}
.
get_data(*, event)
Retrieves Wave8 intensity data from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the total intensity recorded by the detector for the provided event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
float
|
The total intensity recorded by the Wave8 detector. |
TimestampPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Timestamp information from psana at the LCLS facility.
This class deals with the retrieval of timestamp information from the psana software framework.
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 psana 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 psana, so this function actually does nothing.
get_data(*, event)
Retrieves timestamp information from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the timestamp information for the provided event. Psana provides this information with nanosecond precision.
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. |
EventIdPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Data event identifiers from psana at the LCLS facility.
This class deals with the retrieval of unique event identifiers for psana-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 psana 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 psana-based data events, so this function actually does nothing.
get_data(*, event)
Retrieves an event identifier from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana a unique identifier for the provided event.
The psana software framework provides timestamp information with
nanosecond-level precision for each event, plus a specific fiducial string for
more detailed identification. The identifier is generated by combining the
timestamp and fiducial information that psana provides for the event. It has
the following format:
{timestamp: seconds}-{timestamp: nanoseconds}-{fiducial_string}
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
str
|
A unique event identifier. |
EpicsVariablePsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Epics variable values from psana at the LCLS facility.
This class deals with the retrieval of Epics variable values from the psana software framework.
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 psana Epics variable data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the data retrieval for the Epics variable whose psana
name matches the psana_{source_protocols_name}_name
entry in the OM's
data_retrieval_layer
configuration parameter group, or for the Epics
variable with a given psana name, if the source_protocols_name
argument has
the format psana-{psana detector name}
.
get_data(*, event)
Retrieves an Epics variable's value from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the value of the requested Epics variable associated with the provided event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
Any
|
The value of the Epics variable. |
BeamEnergyPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Beam energy information from psana at the LCLS facility.
This class deals with the retrieval of beam energy information from the psana software framework.
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 psana beam energy data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the psana Detector interface for the retrieval of beam energy information.
get_data(*, event)
Retrieves beam energy information from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the beam energy information for 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. |
BeamEnergyFromEpicsVariablePsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Beam energy information from psana at the LCLS facility, via an Epics variable.
This class deals with the retrieval of beam energy information from the psana framework via an Epics variable. This is a different approach from how psana usually provides the beam energy information.
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 psana Epics-based beam energy data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the data retrieval only for the Epics variable storing the beam energy information ("SIOC:SYS0:ML00:AO192").
get_data(*, event)
Retrieves beam energy information from psana using an Epics variable.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the value of the beam energy associated to the provided event. It calculates the beam energy from the value of the SIOC:SYS0:ML00:AO192 Epics variable attached to the event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
float
|
The beam energy in eV. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
EvrCodesPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
EVR event codes from psana at the LCLS facility.
This class deals with the retrieval EVR event codes from the psana software framework.
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 psana EVR event code data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the data retrieval for the EVR event code number
specified by the {data_source_name}_evr_code
entry in OM's
Data Retrieval Layer
configuration parameter group. The EVR event source
to monitor for the emission of the event is instead determined by the
psana_evr_source_name
entry in the same parameter group.
get_data(*, event)
Retrieves EVR events code information from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function checks whether the event code attached to the Data Source has been emitted, for the provided event, by the monitored EVR source.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
bool
|
Whether the required event code has been emitted for the provided event. |
Raises:
Type | Description |
---|---|
OmDataExtractionError
|
Raised when data cannot be retrieved from psana. |
DiodeTotalIntensityPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Diode intensity data from psana at the LCLS facility.
This class deals with the retrieval of the intensity data recorded by a diode from the psana software framework.
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 psana diode intensity data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the intensity data retrieval for the diode whose
psana name matches the psana_{source_protocols_name}_name
entry in OM's
data_retrieval_layer
configuration parameter group, or for the diode with
a given psana name, if the source_protocols_name
argument has the format
psana-{diode name}
.
get_data(*, event)
Retrieves diode intensity data from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the total intensity recorded by the diode for the provided event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
float
|
The total intensity recorded by the diode. |
LclsExtraPsana
Bases: OmDataSourceProtocol
See documentation of the __init__
function.
__init__(*, data_source_name, monitor_parameters)
Additional facility-specific information from psana at the LCLS facility.
This class deals with the retrieval of information that is specific to the LCLS facility. Due to its non-generic nature, the nature of the information that can be collected is limited to a few predefined types. The collected information, due to its specific nature, should not be processed by OM at all, but only saved to a storage media, or passed to a facility-specific downstream application.
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 psana LCLS-specific information data source.
Please see the documentation of the base Protocol class for additional information about this method.
This function initializes the data retrieval for the LCLS-specific information
defined by the lcls_extra
entry in the OM's data_retrieval_layer
configuration parameter group. The entry must have the
format of a list of tuples. Each tuple must be made up of three elements:
-
The first entry must be a string that defines the nature of the information to retrieve. Currently, only the following types of information are supported:
-
acqiris_waveform
: A waveform from an Acqiris detector. For a description of the format of the data, Please refer to the documentation of theget_data
function of theAcqirisPsana
class. -
epics_pv
: The value of an Epics variable. For a description of the format of the data, Please refer to the documentation of theget_data
function of theEpicsVariablePsana
class. -
wave8_total_intensity
: The total intensity recorded by a Wave8 detector (expressed as a float number). -
opal_camera
: An data frame collected by an Opal camera. For a description of the format of the data, Please refer to the documentation of theget_data
function of theOpalPsana
class. -
assembled_detector_data
: A detector data frame with geometry applied, as generated by the psana software framework. The data must have the format of a 2D array storing pixel information. -
The second entry must be a string identifying the source of the retrieved information.
-
This is the name, in the psana software framework, of the detector generating the data to be retrieved.
-
For the
epics_pv
data type, this is the Epics name of the variable to retrieve. -
The third entry is string that assigns an identifying name to data. This is only used by OM, and only within the set of retrieved LCLS-specific data.
Raises:
Type | Description |
---|---|
OmWrongParameterTypeError
|
Raised when the |
get_data(*, event)
Retrieves LCLS-specific information from psana.
Please see the documentation of the base Protocol class for additional information about this method.
This function retrieves from psana the LCLS-specific information associated with the provided event. It returns the data in the format of a dictionary.
-
The keys in the dictionary match the OM identifiers assigned to each data entry.
-
The corresponding dictionary values the retrieved information for each required data element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
Dict[str, Any]
|
A dictionary storing the event data. |
required |
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
A dictionary storing the retrieved LCLS-specific information for the |
Dict[str, Any]
|
provided event. |