Skip to content

Flint API to monitor Lima camera

Valentin Valls requested to merge valentin.valls/bliss:monitor-camera into master

This MR provide an API usable by BLISS to allow to start and stop monitoring of a Lima detector.

Related to #1602

  • It will create a widget if none are available
  • Or it will reuse the widget used to display the scans from the detector
  • Flint stop the monitoring if a scan is started in the same widget (requesting to stop it with the API will then fail)
  • Restarting the monitoring on the same widget will stop and restart a new one
  • The exposure time represent the time between 2 images in the detector (the min time to wait before reaching a new image)
    • If unset it will be reached from the detector
  • The GUI provides a tool to update live/stop and exposure time
# Display the Lima detector widget
SCAN_DISPLAY.auto = True
loopscan(1, 1 ,lima_tomo_simulator)
# The info for the monitoring
channel_name = lima_tomo_simulator.image.fullname
tango_address = lima_tomo_simulator.proxy.name()
# Start the monitoring
from bliss.common import plot as plot_mdl
flint = plot_mdl.get_flint()
flint.start_image_monitoring(channel_name, tango_address)
# OR
flint.start_image_monitoring(channel_name, tango_address, exposure_time=5)
...

# Stop the monitoring
try:
    flint.stop_image_monitoring(channel_name)
except:
    # Make it safe in case it was already stopped by Flint (cause of a new scan)
    pass

Capture_d_écran_de_2020-04-27_20-42-31

Capture_d_écran_du_2020-05-20_16-38-14

Edited by Valentin Valls

Merge request reports