Skip to content

Improve Flint architecture

Valentin Valls requested to merge valentin.valls/bliss:flint-modelization into master

Mainly rework the live scan architecture to improve flexibility. It provides mostly the same features as before but with a new revamped architecture.

Screenshot__112_ Screenshot__109_ Screenshot__107_ Screenshot__110_

On the user side

  • Provides dock widget for all the main widgets of the live window
  • Provides a widget to monitor the state of the current scan
  • Provides a single 'property' widget to configure the plots
  • Provides new widgets for curves, scatter, images, MCAs (it is supposed to provide the same features)
  • Curve widget supports many master (: only channels from the same master can define a curve)
  • Location of the docks are saved between 2 scans
  • Location of the docks are saved between 2 executions
  • Better default axis selection (limitation: between 2 scans the user selecting is lost (reset to default))
  • Default curve colors was updated
  • Many MCAs can be displayed on the same plot
  • Many scatters (sharing the same axis) can be displayed on the same plot (it will maybe not be the final implemented behaviour)
  • Many images can be displayed on the same plots. The first one is displayed as an image, others as scatter (it will not be the final implemented behaviour)
  • A IPython dialog is provided in the Help menu
  • Flint can be launched with:
    • --enable-opengl to use OpenGL rendering for plots (it should provide faster rendering, but could have issue with remote desktop)
    • --enable-event-interleave to use experimental Qt/gevent interleave of event loops (it should reduce CPU consumption but could be unstable)
    • --matplotlib-dpi to custom the plot DPI (this setting will be stored in the local user preferences)
    • --clear-settings to allow to start with cleared previous local user settings
  • SCAN_DIPSLAY.extra_args allows to see this command line argument (see above)
  • Your previous flint window location (from the previous bliss version) and size will be lost

On bliss side

  • bliss.scanning.Scan.get_plot API was changed, now it uses a channel object and a plot kind (image, scatter, mca or curve)
    • This API is only used by edit_roi_counters and should be removed
    • Please don't use it
  • SESSION:plot_select is not anymore synchronized with the GUI
    • It means the bliss selectplot will not update the plot
  • SESSION:scatter_select is not anymore synchronized with the GUI
  • flint.set_dpi was removed. A local use setting is provided now.
  • Yet, It is not possible to display at the same time 2 scans

On architecture side

  • Widgets live_plot_1d and live_scatter_plot are not anymore used
  • The main function initialize an hi-level modelization of flint bliss.flint.model.flint_model.
    • It contains global state of the application and object which have to be shared to internal objects.
  • A bliss.flint.helper.scan_manager transform the live scan events to bliss.flint.model.scan_model objects
  • A bliss.flint.model.plot_model is provided to modelize expected plots
    • A default modelization is generated from scan_info, then from user interaction using the property widget
  • A workspace is managed to store the used widgets and the expected plots
  • A plot widget is connected to a specific plot_model and the current scan_model. From that, and only that, it plots the result.
  • Flint can be launched with --enable-simulator to simulate few scans

On the project side

  • 2 scripts was added to optimize and convert SVG to PNG
    • scripts/export_svg.sh, scripts/optimize_svg.sh
Edited by Valentin Valls

Merge request reports