mxcubecore.HardwareObjects.abstract.AbstractXRFSpectrum#
Abstract XRF spectrum class. Complient with queue_entry/xrf_spectrum.py
Classes
|
Abstract XRFSpectrum procedure. |
- class mxcubecore.HardwareObjects.abstract.AbstractXRFSpectrum.AbstractXRFSpectrum(name)[source]#
Bases:
HardwareObject
Abstract XRFSpectrum procedure.
- Emits:
stateChanged: (“stateChanged”, (state)) xrfSpectrumStatusChanged: (“xrfSpectrumStatusChanged”, (error_msg)
- lims#
reference to the lims hardware object
- States:
HardwareObjectStates: READY, BUSY, FAULT
Note
_execute_spectrum and spectrum_analyse are hooks to be overloaded for spcific implementation.
- create_directory(directory)[source]#
Create a directory, if needed. :param directory: Directory to save the data (full path). :type directory: str
- Returns:
Tue if directory created or already exists, False if error.
- Return type:
(bool)
- execute_spectrum(integration_time=None, filename=None)[source]#
Do the acquisition.
- Parameters:
- Raises:
RuntimeError – Cannot acquire data.
- get_filename(directory, prefix)[source]#
Create file template. :param directory: directory name (full path) :type directory: str
- Returns:
File template
- Return type:
(str)
- spectrum_analyse()[source]#
Get the spectrum data. Do analysis and save fitted data. The method has to be implemented as specific for each site.
- spectrum_status_change(status_msg)[source]#
Emit the signal xrfSpectrumStatusChanged with appropriate message. :param status_msg: Message to send. :type status_msg: str
- start_spectrum(integration_time=None, data_dir=None, prefix=None, archive_dir=None, session_id=None, blsample_id=None, cpos=None)[source]#
Start the procedure. Called by the queue_model.
- Parameters:
integration_time (float) – Inregration time [s].
data_dir (str) – Directory to save the data (full path).
archive_dir (str) – Directory to save the archive data (full path).
prefix (str) – File prefix
session_id (int) – Session ID number (from ISpyB)
blsample_id (int) – Sample ID number (from ISpyB)