mxcubecore.HardwareObjects.abstract.AbstractXRFSpectrum#
Abstract XRF spectrum class. Compliant 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 specific implementation.
- create_directory(directory: str) bool [source]#
Create a directory, if needed. :param directory: Directory to save the data (full path).
- execute_spectrum(integration_time: float | None = None, filename: str | None = None)[source]#
Do the acquisition.
- Parameters:
- Raises:
RuntimeError – Cannot acquire data.
- get_filename(directory: str, prefix: str) str [source]#
Create file template. :param directory: directory name (full path) :type directory: 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, but is only optional.
- spectrum_status_change(status_msg: str)[source]#
Emit the signal xrfSpectrumStatusChanged with appropriate message. :param status_msg: Message to send. :type status_msg: str
- Parameters:
status_msg (str) –
- start_spectrum(integration_time: float | None = None, data_dir: str | None = None, prefix: str | None = None, archive_dir: str | None = None, session_id: int | None = None, blsample_id: int | None = None, cpos: dict | None = None)[source]#
Start the procedure. Called by the queue_model.
- Parameters:
integration_time (float | None) – Inregration time [s].
data_dir (str | None) – Directory to save the data (full path).
archive_dir (str | None) – Directory to save the archive data (full path).
prefix (str | None) – File prefix
session_id (int | None) – Session ID number (from ISpyB)
blsample_id (int | None) – Sample ID number (from ISpyB)
cpos (dict | None) – The centred position motors and their values.