mxcubecore.HardwareObjects.abstract.AbstractOnlineProcessing#

Abstract Online Processing class

Module Attributes

DEFAULT_RESULT_TYPES

AbstractOnlineProcessing hardware object handles online data processing.

Classes

class mxcubecore.HardwareObjects.abstract.AbstractOnlineProcessing.AbstractOnlineProcessing(name)[source]#

Bases: HardwareObject

align_processing_results(start_index, end_index)[source]#

Realigns all results. Each results (one dimensional numpy array) is converted to 2d numpy array according to diffractometer geometry. Function also extracts 10 (if they exist) best positions

create_processing_input_file(processing_input_filename)[source]#

Creates processing input file :param processing_input_filename: file name. :type processing_input_filename: str

extract_sweeps()[source]#

Extracts sweeps from processing results

init()[source]#

Hardware object init.

is_running()[source]#

Returns True if processing is running

prepare_processing()[source]#
Prepares processing parameters, creates empty result arrays and

create necessary directories to store results.

Parameters:

data_collection – data collection object

:type : queue_model_objects.DataCollection

run_processing(data_collection)[source]#

Starts Online processing :param data_collection: data collection object :type data_collection: queue_model_objects.DataCollection

save_snapshot_task(snapshot_filename)[source]#

Saves snapshot :param snapshot_filename: filename :type snapshot_filename: str

set_processing_status(status)[source]#
Sets processing status and finalize the processing

Method called from EDNA via xmlrpc

Parameters:

status (str) – processing status (Success, Failed)

stop_processing()[source]#

Stops processing

store_coordinate_map()[source]#

Store map

store_processing_results(status)[source]#
Stores result plots. In the case of MeshScan and XrayCentering

html is created and results saved in ISPyB

Parameters:

status (str) – status type

mxcubecore.HardwareObjects.abstract.AbstractOnlineProcessing.DEFAULT_RESULT_TYPES = [{'key': 'spots_resolution', 'descr': 'Resolution', 'color': (120, 0, 0)}, {'key': 'score', 'descr': 'Score', 'color': (0, 120, 0)}, {'key': 'spots_num', 'descr': 'Number of spots', 'color': (0, 0, 120)}, {'key': 'is', 'descr': 'Intensity', 'color': (0, 0, 120)}]#

AbstractOnlineProcessing hardware object handles online data processing. Typical example of online processing is a mesh scan where user is provided with real-time results describing diffraction quality. Method run_processing is called from the queue_entry when the data collection starts. Then empty arrays to store results are created. Typicaly an input file is created and processing is started with script via subprocess.Popen. Results are emited with onlineProcessingResults signal.

Implementations:
  • DozorOnlinelProcessing: online processing based on the EDNA Dozor plugin. Started with EDNA and results are set via xmlrpc.

  • OnlineProcessigMockup: mockup version allows to simulate online processing.