data_retrieval_files
Data retrieval from files.
This module contains Data Retrieval classes that deal with files.
PilatusFilesDataRetrieval
Bases: OmDataRetrievalProtocol
See documentation of the __init__
function.
__init__(*, monitor_parameters, source)
Data retrieval for Pilatus' single-frame CBF files.
This class implements OM's Data Retrieval Layer for a set of single-frame files written by a Pilatus detector in CBF format.
This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.
-
This class considers an individual data event as corresponding to the content of a single Pilatus CBF file.
-
The full path to the CBF file is used as event identifier.
-
Since Pilatus files do not contain any timestamp information, the modification time of the each file is taken as a first approximation of the timestamp of the data it contains.
-
Since Pilatus files do not contain any detector distance or beam energy information, their values are retrieved from OM's configuration parameters (specifically, the
fallback_detector_distance_in_mm
andfallback_beam_energy_in_eV
entries in thedata_retrieval_layer
parameter group). -
The source string required by this Data Retrieval class is the path to a file containing a list of CBF files to process, one per line, with their absolute or relative path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
monitor_parameters |
MonitorParameters
|
An object storing OM's configuration parameters. |
required |
source |
str
|
A string describing the data event source. |
required |
get_data_event_handler()
Retrieves the Data Event Handler used by the Data Retrieval class.
Please see the documentation of the base Protocol class for additional information about this method.
Returns:
Type | Description |
---|---|
OmDataEventHandlerProtocol
|
The Data Event Handler used by the Data Retrieval class. |
Jungfrau1MFilesDataRetrieval
Bases: OmDataRetrievalProtocol
See documentation of the __init__
function.
__init__(*, monitor_parameters, source)
Data Retrieval for Jungfrau 1M's HDF5 files.
This class implements OM's Data Retrieval Layer for a set of files written by a Jungfrau 1M detector in HDF5 format.
This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.
-
This class considers an individual data event as equivalent to a single detector frame stored in an HDF5 file, with all its attached information.
-
The full path to the file containing the frame and the index of the frame in the file, combined into a single string and separated by the '//' symbol, are used as event identifier.
-
Jungfrau 1M files do not contain any absolute timestamp information, but they store the readout of the internal detector clock for every frame. As a first approximation, the modification time of each file is taken as the timestamp of the first frame it contains, and the timestamp of all other frames is computed according to the internal clock difference.
-
Since Jungfrau 1M files do not contain any detector distance or beam energy information, their values are retrieved from OM's configuration parameters (specifically, the
fallback_detector_distance_in_mm
andfallback_beam_energy_in_eV
entries in thedata_retrieval_layer
parameter group). -
The source string required by this Data Retrieval class is the path to a file containing a list of master HDF5 files to process, one per line, with their absolute or relative path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
monitor_parameters |
MonitorParameters
|
An object storing OM's configuration parameters. |
required |
source |
str
|
A string describing the data event source. |
required |
get_data_event_handler()
Retrieves the Data Event Handler used by the Data Retrieval class.
This method overrides the corresponding method of the base class: please also refer to the documentation of that class for more information.
Returns:
Type | Description |
---|---|
OmDataEventHandlerProtocol
|
The Data Event Handler used by the Data Retrieval class. |
EigerFilesDataRetrieval
Bases: OmDataRetrievalProtocol
See documentation of the __init__
function.
__init__(*, monitor_parameters, source)
Data Retrieval for Eiger's HDF5 files.
This class implements OM's Data Retrieval Layer for a set of files written by an Eiger detector in HDF5 format.
This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.
-
This class considers an individual data event as corresponding to a single detector frame stored in an HDF5 file.
-
The full path to the file containing the frame and the index of the frame in the file, combined into a single string and separated by the '//' symbol, are used as event identifier.
-
Since Eiger's files do not contain any absolute timestamp information, the modification time of a file is taken as a first approximation of the timestamp of the data it contains.
-
Since Eiger's files do not contain any detector distance or beam energy information, their values are retrieved from OM's configuration parameters (specifically, the
fallback_detector_distance_in_mm
andfallback_beam_energy_in_eV
entries in thedata_retrieval_layer
parameter group). -
The source string required by this Data Retrieval class is the path to a file containing a list of HDF5 files to process, one per line, with their absolute or relative path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
monitor_parameters |
MonitorParameters
|
An object storing OM's configuration parameters. |
required |
source |
str
|
A string describing the data event source. |
required |
get_data_event_handler()
Retrieves the Data Event Handler used by the Data Retrieval class.
Please see the documentation of the base Protocol class for additional information about this method.
Returns:
Type | Description |
---|---|
OmDataEventHandlerProtocol
|
The Data Event Handler used by the Data Retrieval class. |
RayonixMccdFilesDataRetrieval
Bases: OmDataRetrievalProtocol
See documentation of the __init__
function.
__init__(*, monitor_parameters, source)
Data Retrieval for Rayonix MX340-HS's single-frame mccd files.
This class implements OM's Data Retrieval Layer for a set of single-frame files written by a Rayonix detector in mccd format.
This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.
-
This class considers an individual data event as corresponding to the content of a single Rayonix mccd file.
-
The full path to the mccd file is used as event identifier.
-
Since Rayonix mccd files do not contain any timestamp information, the modification time of each file is taken as a first approximation of the timestamp of the data it contains.
-
Since Rayonix mccd files do not contain any detector distance or beam energy information, their values are retrieved from OM's configuration parameters (specifically, the
fallback_detector_distance_in_mm
andfallback_beam_energy_in_eV
entries in thedata_retrieval_layer
parameter group). -
The source string required by this Data Retrieval class is the path to a file containing a list of mccd files to process, one per line, with their absolute or relative path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
monitor_parameters |
MonitorParameters
|
An object storing OM's configuration parameters. |
required |
source |
str
|
A string describing the data event source. |
required |
get_data_event_handler()
Retrieves the Data Event Handler used by the Data Retrieval class.
Please see the documentation of the base Protocol class for additional information about this method.
Returns:
Type | Description |
---|---|
OmDataEventHandlerProtocol
|
The Data Event Handler used by the Data Retrieval class. |
Lambda1M5FilesDataRetrieval
Bases: OmDataRetrievalProtocol
See documentation of the __init__
function.
__init__(*, monitor_parameters, source)
Data Retrieval for Lambda 1.5M's HDF5 files.
This class implements OM's Data Retrieval Layer for a set of files written by a Lambda 1.5M detector in HDF5 format.
This class implements the interface described by its base Protocol class. Please see the documentation of that class for additional information about the interface.
-
This class considers an individual data event as equivalent to an single detector frame, stored in two separate HDF5 files written by two detector modules, together with its attached information.
-
The full path to the file written by the first detector module ("*_m01.nxs"), and the index of the frame in the file, combined into a single string and separated by '//' symbol, are used as event identifier.
-
Since Lambda 1.5M files do not contain any timestamp information, the modification time of each file is taken as a first approximation of the timestamp of the data it contains.
-
Since Lambda 1.5M files do not contain any detector distance or beam energy information, their values are retrieved from OM's configuration parameters (specifically, the
fallback_detector_distance_in_mm
andfallback_beam_energy_in_eV
entries in thedata_retrieval_layer
parameter group). -
The source string required by this Data Retrieval class is the path to a file containing a list of HDF5 files written by the first detector module ("_m01.nxs"), one per line, with their absolute or relative path. Each file can store more than one detector data frame, and each frame in the file is processed as a separate event.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
monitor_parameters |
MonitorParameters
|
An object storing OM's configuration parameters. |
required |
source |
str
|
A string describing the data event source. |
required |
get_data_event_handler()
Retrieves the Data Event Handler used by the Data Retrieval class.
Please see the documentation of the base Protocol class for additional information about this method.
Returns:
Type | Description |
---|---|
OmDataEventHandlerProtocol
|
The Data Event Handler used by the Data Retrieval class. |