crystallography_parameter_tweaker#
OM’s real-time Parameter Tweaker.
This module contains a graphical interface that can be used to test peak-finding parameters in real time during crystallography experiments.
- class CrystallographyParameterTweaker(*, url, parameters)#
OM Parameter Tweaker for Crystallography.
This class implements a graphical user interface that can be used to test new peak finding parameters in real time during Serial Crystallography experiments. The GUI receives data from an OnDA Monitor, but only when is is tagged with the omtweakingdata label. The data must contain calibrated detector frames, which the GUI displays. However, the GUI also allows users to choose a set of peak-finding parameters. It then uses the chosen parameters to apply the [Peakfinder8PeakDetection][om.algorithms.crystallography.Peakfinder8PeakDetection] algorithm on the fly to each received frame. The GUI displays the positions of all detected Bragg peaks on each frame image. A data storage buffer allows the GUI to stop receiving data from the OnDA Monitor, but still keep in memory the last 10 displayed frames for re-inspection and re-processing (peak-finding with a different set of parameters).
- Parameters:
url (str) – The URL where the GUI should connect and listen for data. This must be a string in the format used by the ZeroMQ protocol.
parameters (dict[str, Any])
- update_gui()#
Updates the elements of the Crystallography Parameter Tweaker.
This method overrides the corresponding method of the base class: please also refer to the documentation of that class for more information.
This method, which is called at regular intervals, performs the hit finding with the current chosen parameters, and updates the displayed detector frame and the shown positions of the detected Bragg peaks. Additionally, this function manages the data storage buffer that allows the last received frames to be re-inspected and re-processed.
- Return type:
None
om_crystallography_parameter_tweaker#
OM Parameter Tweaker for Crystallography. This program must connect to a running OnDA Monitor for Crystallography. If the monitor broadcasts the necessary information, this program displays detector frames received from the monitor. Additionally, it allows the user to choose a set of peak-finding parameters that is applied in real time to each received frame. The program displays the position of the detected Bragg peaks on each displayed detector frame image. The program can also temporarily disconnect from the monitor, and any of the last 10 displayed frames can be recalled and re-processed.
The graphical interface connects to and OnDA Monitor running at the IP address (or hostname) + port specified by the URL string. This is a string in the format used by the ZeroMQ protocol. The URL string is optional. If not provided, it defaults to “tcp://127.0.0.1:12321”: the GUI connects, using the tcp protocol, to a monitor running on the local machine at port 12321.
Usage
om_crystallography_parameter_tweaker [OPTIONS] [URL]
Options
- -c, --config <config>#
configuration file (default: monitor.yaml file in the current working directory
- Default:
PosixPath('monitor.yaml')
Arguments
- URL#
Optional argument
Experiment identifier