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.
CrystallographyParameterTweaker
Bases: OmGuiBase
See documentation of the __init__
function.
__init__(*, url, monitor_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 data frames.
The GUI then displays the detector frames, and allows a user to choose a set of
peak-finding parameters. The chosen parameters are used to apply the
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
viewer 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 new set of parameters).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
The URL at which the GUI will connect and listen for data. This must be a string in the format used by the ZeroMQ protocol. |
required |
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 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.
main(*, url, config)
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 image. The program can also temporarily disconnect from the monitor, and any of the last 10 displayed frames can be recalled and reprocessed.
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.
crystallography_parameter_tweaker.py
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 image. The program can also temporarily disconnect from the monitor, and any of the last 10 displayed frames can be recalled and reprocessed.
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:
crystallography_parameter_tweaker.py [OPTIONS] [URL]
Options:
-c, --config PATH configuration file (default: monitor.yaml file in the
current working directory
--help Show this message and exit.