Commit 71f4fe32 authored by Holger Witsch's avatar Holger Witsch
Browse files

Merge branch 'holger-flint-doc' into 'master'

Update doc/docs/bliss_flint.md

See merge request !4677
parents b5069d50 940d6fab
Pipeline #75402 failed with stages
in 109 minutes and 47 seconds
......@@ -2,9 +2,9 @@
* Flint is not silx-view
* Flint is not PyMca
* Flint have to replace Spec GUI and Oxidis
* Flint is meant to replace the Spec GUI and Oxidis
Flint is a GUI to display raw data generated by BLISS, mostly to help beamline
Flint is a GUI intending to display raw data generated by BLISS, mostly to help beamline
alignment.
It also provides graphic interaction for user scripts.
......@@ -21,8 +21,8 @@ This script launches simulation devices together with beacon and Redis.
## Starting Flint
If the session is configured for (which is the case for the demo session),
Flint will be started by the invocation of any standard scan command.
If the session is configured for it (which is the case for the demo session),
Flint will be started by the call to any standard scan command.
It can be enabled this way:
```python
......@@ -46,7 +46,7 @@ ascan(slit_vertical_offset, -5.0, 5.0, 20, 0.1, beamviewer.roi_counters)
Flint provides a ➊ *Live screen* containing various widgets.
A widget ➋ provides the current scan progress, a ➌ *property widget* to
customize the content of the plots, and ➍ many others are provided to display
customize the content of the plots, and ➍ the following are provided to display
scan data.
## Curve
......@@ -60,33 +60,31 @@ tools to:
* zoom and pan the view
* customize the refresh rate of the data
* change the axes configuration
* change the axes' configuration
* plus other specific actions
The property view provides tools to custom items displayed by the plot. Items
are identified by there ➋ names (usually the name of the counter), the ➌ x-axis
The property view provides tools to customise items displayed by the plot. Items
are identified by their ➋ names (usually the name of the counter), the ➌ x-axis
can be selected, the data can be ➍ displayed using the left or right y-axis.
The ➎ style for each curves is automatically picked depending on the content of
the scan. For curves, this can not be customed.
Curve styles ➎ are automatically selected depending on the content of the scan. These styles cannot be customized.
This items can be ➏ removed from the plot. A removed item is still available
and can be displayed back. But no style is allocated for it.
Items can be ➏ removed from the plot. A removed item is still available
and can be re-displayed. However, no style is assigned to it.
### Manual selection
The curve widget can be configured to display or hide data acquired by the scan.
The curve widget can be configured to display or hide the data obtained during the scan.
![Curve selection](flint/img/demo-curve-selection.png)
This setup will be reused and be unchanged while the same devices are scanned
(technically while the scanned acquisition chain is the same as the previous
displayed scan).
As long as the same devices are scanned, this setup will be reused unchanged
(technically speaking, while the acquisition chain is the same as used for the
displayed scan previously).
### Refinment of the scan
So values of the scan can be tuned, like the motor range or the number of points,
without losing the customed selection.
The scan values, like the motor range or the number of points, can be tuned, without losing the custom selection.
```python
ascan(slit_vertical_offset, -4.0, 2.0, 40, 0.1, beamviewer.roi_counters)
......@@ -96,44 +94,36 @@ ascan(slit_vertical_offset, -4.0, 2.0, 40, 0.1, beamviewer.roi_counters)
### Gaussian, derivative, and markers
Flint provides few helpers to annotate the displayed curves.
Several tools are provided to annotate the displayed curves in Flint.
![Gaussian, derivative, and markers](flint/img/demo-curve-markers.png)
Computed items ➊➋ can be created, and a data processed will be applyed and
displayed based on a selected curve.
Computed items ➊➋ can be created based on a selected curve. The result can be displayed after data processing of choice.
A tool ➌ is provided to create computed markers or functions to the actual
selected item.
It provides ➍ few features like markers for the location of the maximum or minimum,
a gaussian fit, or a derivative function.
A tool ➌ is provided to create computed markers or apply functions to the selected curve.
It provides ➍ a few features, like markers for the location of maximum or minimum, a gaussian fit or a derivative function.
As for curve selection, this information will persist only while the same devices
are scanned.
As for curve selection, this information will only persist while the acquisition chain remains unchanged.
### Command-line selection
From BLISS, two mechanisms are also provided to select a specific curve.
BLISS offers two ways to select a specific curve.
Using `SCAN_DISPLAY` before a scan. It describes that the scan has to display
a specific data. Others will still be acquired, but only the ones named here
will be displayed by default. This information became part of the scan.
`plotselect` chooses the counters to be displayed. It can be used any time and even changes a plot on display. The same can be done with the mouse.
```python
plotinit("beamviewer:roi_counters:roi1_avg")
ascan(slit_vertical_offset, -4.0, 2.0, 40, 0.1, beamviewer.roi_counters)
...
plotselect("beamviewer:roi_counters:roi1_avg")
```
Using `plotselect` after the start and the first display of the scan. It interacts
with an existing plot using the same behaviour as what you could do with the
mouse.
`plotinit` can be used before an acquisition and remains valid only for this next scan. It selects the counters to be displayed when reading back a scan from the database (redis). All counters will be acquired and stored.
```python
plotinit("beamviewer:roi_counters:roi1_avg")
ascan(slit_vertical_offset, -4.0, 2.0, 40, 0.1, beamviewer.roi_counters)
...
plotselect("beamviewer:roi_counters:roi1_avg")
```
## Scatters
......@@ -149,18 +139,18 @@ amesh(sy, -.75, .75, 30, sz, -.75, .75, 30, .001, fluo_diode)
The default plot for meshes uses a ➊ scatter plot, with an image based rendering.
The property widget allows to ➋ select the main diode to display and the data to
use as ➌ axes. It also provide dialog to ➍ custom the rendering and to ➎ edit
the colormap level.
The property widget allows to ➋ select the main diode to display and to
choose the ➌ axes. It also provides a dialog for ➍ custom rendering and ➎ editing
colormap and brightness.
Few other ➍ rendering are provided, like point based, or solid interpolation.
Flint also supports fix rendering, to display for example points on top of a
solid rendering.
Other ➍ renderings are provided, like point based -, or solid interpolation.
Flint also supports fixed rendering. For example, points can be displayed on top of a
solid rendering,
### Scatters with motor displacement
The demo session provides motor encoders configured to follow `sy` and `sz` but
including noice. THis can be used to simulate displacements in the scans.
The demo session provides motor encoders configured to follow `sy` and `sz` and
offers noise as a signal. This can be used to simulate scans.
```python
amesh(sy, -.1, .1, 20, sz, -.3, .3, 30, .001, fluo_diode,
......@@ -180,24 +170,24 @@ displacements.
The *irregular grid mode* is based on mesh computed around the mesured points.
This rendering is much slower without OpenGL, but can help to notice bigger
displacements. The overlay can also be added.
displacements. The points can also be overlayed.
### Curves from scatter data
The curve widget can also be used to display meshes.
Curve widgets can also be used to display grids.
![Curves widget from meshes](flint/img/demo-scatter-curve.png)
It presents the values of data acquisition according to the time.
They present the values of data acquisition over time.
## MCAs
Flint provides a basic view of the MCAs.
Flint provides a basic view of MCA spectra.
A single scan can involve many widgets for MCAs.
The policy is to use a single and always the same widget per detector.
A single scan can involve many spectra.
Usually one would use a single and always the same widget for each detector.
```python
timescan(1, tomocam)
......@@ -205,19 +195,18 @@ timescan(1, tomocam)
![MCA widget](flint/img/demo-mca.png)
The configuration dialog allow to select one or many MCAs to display.
The configuration dialog allows to select one or several spectra to display.
For now, only the ➋ raw data of the MCAs (count per channels) is displayed.
For now, only raw spectra ➋ (count per channels) are displayed.
Few things could also be provided like plots in energy, but Flint is not
targetted to replace PyMca.
More features, like plots in energy, could be provided, but Flint should not replace pymca.
## Images
Images are the last supported kind of data.
Flint supports image (2d) display.
A single scan can involve many widgets for MCAs.
The policy is to use a single and always the same widget per detector.
A single scan can contain many spectra.
Usually one would use a single and always the same widget for each detector.
The demo session provides a tomography projection example.
......@@ -229,14 +218,11 @@ timescan(1, tomocam)
We can distinguish a diatom on a top of a needle.
The property widget allow to ➊ select the displayed image if there is many.
It also provides dialog to ➋ custom the default used colormap and to ➌ edit
the colormap level.
The property widget ➊ allows to select one image if there are many. It also provides a dialog for ➋ custom rendering and ➌ editing colormap and brightness.
### Editing Lima ROIs
Lima ROIs can be edited with `edit_roi_counters` command. This BLISS command is
based on a Flint programming interface which also can be used for user scripts.
Lima ROIs can be edited from within BLISS by way of the `edit_roi_counters` command. This command uses the Flint programming interface, which is available for user scripts.
```python
edit_roi_counters(tomocam, 0.1)
......@@ -244,14 +230,11 @@ edit_roi_counters(tomocam, 0.1)
![Editing Lima ROIs](flint/img/demo-image-roi.png)
A tool ➊ have to be selected to switch the interaction to 'ROI mode'. This allows to
create ➋ new rectangle ROIs into the image. A list of available ROIs is displayed
and can be used to edit or remove ROIs. Finally a ➍ button have to be
validated to apply the new ROIs.
Switch the interaction to 'ROI mode' ➊. This allows to create ➋ new rectangular ROIs. A list of available ROIs ➌ is displayed and can be used to edit or remove ROIs. The Apply button ➍ is there to validate the choice.
The selection can be cancelled using `Ctrl-c` in the BLISS shell.
When used from BLISS the selection can be cancelled using `Ctrl-c`.
This ROIs can now be scanned.
This ROIs can now be used in a scan.
```python
loopscan(20, 1, tomocam.counters.roi2_avg)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment