bec-widgets 0.52.1__py3-none-any.whl → 0.53.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- .git_hooks/pre-commit +3 -0
- .gitignore +177 -0
- .gitlab/issue_templates/bug_report_template.md +17 -0
- .gitlab/issue_templates/documentation_update_template.md +27 -0
- .gitlab/issue_templates/feature_request_template.md +40 -0
- .gitlab/merge_request_templates/default.md +28 -0
- .gitlab-ci.yml +225 -0
- .pylintrc +581 -0
- .readthedocs.yaml +25 -0
- CHANGELOG.md +176 -0
- PKG-INFO +33 -0
- bec_widgets-0.52.1.dist-info/METADATA → README.md +6 -42
- bec_widgets/cli/client.py +9 -9
- bec_widgets/cli/rpc_wigdet_handler.py +1 -3
- bec_widgets/examples/modular_app/___init__.py +0 -0
- bec_widgets/examples/modular_app/modular.ui +92 -0
- bec_widgets/examples/modular_app/modular_app.py +197 -0
- bec_widgets/examples/motor_movement/motor_control_compilations.py +1 -1
- bec_widgets/examples/motor_movement/motor_example.py +3 -12
- bec_widgets/utils/bec_dispatcher.py +1 -3
- bec_widgets/widgets/dock/dock_area.py +1 -4
- bec_widgets/widgets/figure/figure.py +3 -15
- bec_widgets/widgets/monitor/config_dialog.py +3 -19
- bec_widgets/widgets/monitor/example_configs/config_device.yaml +60 -0
- bec_widgets/widgets/monitor/example_configs/config_scans.yaml +92 -0
- bec_widgets/widgets/motor_map/motor_map.py +3 -14
- bec_widgets/widgets/plots/motor_map.py +2 -9
- bec_widgets/widgets/scan_control/scan_control.py +1 -3
- bec_widgets-0.53.1.dist-info/METADATA +33 -0
- {bec_widgets-0.52.1.dist-info → bec_widgets-0.53.1.dist-info}/RECORD +66 -23
- {bec_widgets-0.52.1.dist-info → bec_widgets-0.53.1.dist-info}/WHEEL +1 -2
- bec_widgets-0.53.1.dist-info/licenses/LICENSE +29 -0
- docs/Makefile +20 -0
- docs/_templates/custom-class-template.rst +34 -0
- docs/_templates/custom-module-template.rst +66 -0
- docs/conf.py +81 -0
- docs/developer/developer.md +26 -0
- docs/developer/reference.md +10 -0
- docs/index.md +39 -0
- docs/introduction/introduction.md +18 -0
- docs/make.bat +35 -0
- docs/requirements.txt +10 -0
- docs/user/apps/modular_app.md +6 -0
- docs/user/apps/motor_app.md +34 -0
- docs/user/apps/motor_app_10fps.gif +0 -0
- docs/user/apps/plot_app.md +6 -0
- docs/user/apps.md +39 -0
- docs/user/customisation.md +13 -0
- docs/user/installation.md +46 -0
- docs/user/user.md +38 -0
- docs/user/widgets/motor.gif +0 -0
- docs/user/widgets/scatter_2D.gif +0 -0
- docs/user/widgets/w1D.gif +0 -0
- docs/user/widgets.md +41 -0
- pyproject.toml +94 -0
- tests/unit_tests/test_bec_dispatcher.py +3 -26
- tests/unit_tests/test_bec_figure.py +1 -5
- tests/unit_tests/test_bec_motor_map.py +1 -4
- tests/unit_tests/test_config_dialog.py +1 -5
- tests/unit_tests/test_configs/config_device.yaml +33 -0
- tests/unit_tests/test_configs/config_device_no_entry.yaml +27 -0
- tests/unit_tests/test_configs/config_scan.yaml +82 -0
- tests/unit_tests/test_motor_control.py +1 -1
- tests/unit_tests/test_motor_map.py +5 -20
- tests/unit_tests/test_stream_plot.py +2 -12
- bec_widgets-0.52.1.dist-info/top_level.txt +0 -2
- /bec_widgets-0.52.1.dist-info/LICENSE → /LICENSE +0 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
{{ fullname | escape | underline}}
|
2
|
+
|
3
|
+
.. currentmodule:: {{ module }}
|
4
|
+
|
5
|
+
.. autoclass:: {{ objname }}
|
6
|
+
:members:
|
7
|
+
:show-inheritance:
|
8
|
+
:inherited-members:
|
9
|
+
:special-members: __call__, __add__, __mul__
|
10
|
+
|
11
|
+
{% block methods %}
|
12
|
+
{% if methods %}
|
13
|
+
.. rubric:: {{ _('Methods') }}
|
14
|
+
|
15
|
+
.. autosummary::
|
16
|
+
:nosignatures:
|
17
|
+
{% for item in methods %}
|
18
|
+
{%- if not item.startswith('_') %}
|
19
|
+
~{{ name }}.{{ item }}
|
20
|
+
{%- endif -%}
|
21
|
+
{%- endfor %}
|
22
|
+
{% endif %}
|
23
|
+
{% endblock %}
|
24
|
+
|
25
|
+
{% block attributes %}
|
26
|
+
{% if attributes %}
|
27
|
+
.. rubric:: {{ _('Attributes') }}
|
28
|
+
|
29
|
+
.. autosummary::
|
30
|
+
{% for item in attributes %}
|
31
|
+
~{{ name }}.{{ item }}
|
32
|
+
{%- endfor %}
|
33
|
+
{% endif %}
|
34
|
+
{% endblock %}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
{{ fullname | escape | underline}}
|
2
|
+
|
3
|
+
.. automodule:: {{ fullname }}
|
4
|
+
|
5
|
+
{% block attributes %}
|
6
|
+
{% if attributes %}
|
7
|
+
.. rubric:: Module attributes
|
8
|
+
|
9
|
+
.. autosummary::
|
10
|
+
:toctree:
|
11
|
+
{% for item in attributes %}
|
12
|
+
{{ item }}
|
13
|
+
{%- endfor %}
|
14
|
+
{% endif %}
|
15
|
+
{% endblock %}
|
16
|
+
|
17
|
+
{% block functions %}
|
18
|
+
{% if functions %}
|
19
|
+
.. rubric:: {{ _('Functions') }}
|
20
|
+
|
21
|
+
.. autosummary::
|
22
|
+
:toctree:
|
23
|
+
:nosignatures:
|
24
|
+
{% for item in functions %}
|
25
|
+
{{ item }}
|
26
|
+
{%- endfor %}
|
27
|
+
{% endif %}
|
28
|
+
{% endblock %}
|
29
|
+
|
30
|
+
{% block classes %}
|
31
|
+
{% if classes %}
|
32
|
+
.. rubric:: {{ _('Classes') }}
|
33
|
+
|
34
|
+
.. autosummary::
|
35
|
+
:toctree:
|
36
|
+
:template: custom-class-template.rst
|
37
|
+
:nosignatures:
|
38
|
+
{% for item in classes %}
|
39
|
+
{{ item }}
|
40
|
+
{%- endfor %}
|
41
|
+
{% endif %}
|
42
|
+
{% endblock %}
|
43
|
+
|
44
|
+
{% block exceptions %}
|
45
|
+
{% if exceptions %}
|
46
|
+
.. rubric:: {{ _('Exceptions') }}
|
47
|
+
|
48
|
+
.. autosummary::
|
49
|
+
:toctree:
|
50
|
+
{% for item in exceptions %}
|
51
|
+
{{ item }}
|
52
|
+
{%- endfor %}
|
53
|
+
{% endif %}
|
54
|
+
{% endblock %}
|
55
|
+
|
56
|
+
{% block modules %}
|
57
|
+
{% if modules %}
|
58
|
+
.. autosummary::
|
59
|
+
:toctree:
|
60
|
+
:template: custom-module-template.rst
|
61
|
+
:recursive:
|
62
|
+
{% for item in modules %}
|
63
|
+
{{ item }}
|
64
|
+
{%- endfor %}
|
65
|
+
{% endif %}
|
66
|
+
{% endblock %}
|
docs/conf.py
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
2
|
+
#
|
3
|
+
# For the full list of built-in configuration values, see the documentation:
|
4
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
5
|
+
|
6
|
+
# -- Project information -----------------------------------------------------
|
7
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
8
|
+
|
9
|
+
import os
|
10
|
+
import pathlib
|
11
|
+
|
12
|
+
import tomli
|
13
|
+
|
14
|
+
project = "BEC Widgets"
|
15
|
+
copyright = "2023, Paul Scherrer Institute"
|
16
|
+
author = "Paul Scherrer Institute"
|
17
|
+
|
18
|
+
# -- General configuration ---------------------------------------------------
|
19
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
20
|
+
|
21
|
+
current_path = pathlib.Path(__file__).parent.parent.resolve()
|
22
|
+
version_path = f"{current_path}/pyproject.toml"
|
23
|
+
|
24
|
+
|
25
|
+
def get_version():
|
26
|
+
"""load the version from the version file"""
|
27
|
+
with open(version_path, "r", encoding="utf-8") as file:
|
28
|
+
res = tomli.loads(file.read())
|
29
|
+
return res["project"]["version"]
|
30
|
+
|
31
|
+
|
32
|
+
release = get_version()
|
33
|
+
|
34
|
+
extensions = [
|
35
|
+
"sphinx.ext.autodoc",
|
36
|
+
"sphinx.ext.autosummary",
|
37
|
+
# "sphinx.ext.coverage",
|
38
|
+
"sphinx.ext.viewcode",
|
39
|
+
"sphinx.ext.napoleon",
|
40
|
+
"sphinx_toolbox.collapse",
|
41
|
+
"sphinx_copybutton",
|
42
|
+
"myst_parser",
|
43
|
+
"sphinx_design",
|
44
|
+
]
|
45
|
+
|
46
|
+
myst_enable_extensions = [
|
47
|
+
"amsmath",
|
48
|
+
"attrs_inline",
|
49
|
+
"colon_fence",
|
50
|
+
"deflist",
|
51
|
+
"dollarmath",
|
52
|
+
"fieldlist",
|
53
|
+
"html_admonition",
|
54
|
+
"html_image",
|
55
|
+
"replacements",
|
56
|
+
"smartquotes",
|
57
|
+
"strikethrough",
|
58
|
+
"substitution",
|
59
|
+
"tasklist",
|
60
|
+
]
|
61
|
+
|
62
|
+
autosummary_generate = True # Turn on sphinx.ext.autosummary
|
63
|
+
add_module_names = False # Remove namespaces from class/method signatures
|
64
|
+
autodoc_inherit_docstrings = True # If no docstring, inherit from base class
|
65
|
+
set_type_checking_flag = True # Enable 'expensive' imports for sphinx_autodoc_typehints
|
66
|
+
autoclass_content = "both" # Include both class docstring and __init__
|
67
|
+
|
68
|
+
# Add any paths that contain templates here, relative to this directory.
|
69
|
+
templates_path = ["_templates"]
|
70
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
71
|
+
|
72
|
+
language = "Python"
|
73
|
+
|
74
|
+
# -- Options for HTML output -------------------------------------------------
|
75
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
76
|
+
|
77
|
+
html_theme = "pydata_sphinx_theme"
|
78
|
+
html_static_path = ["_static"]
|
79
|
+
html_css_files = ["css/custom.css"]
|
80
|
+
html_logo = "_static/bec.png"
|
81
|
+
html_theme_options = {"show_nav_level": 1, "navbar_align": "content"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
(developer)=
|
2
|
+
# Development
|
3
|
+
|
4
|
+
```{toctree}
|
5
|
+
---
|
6
|
+
maxdepth: 1
|
7
|
+
hidden: true
|
8
|
+
---
|
9
|
+
reference/
|
10
|
+
```
|
11
|
+
|
12
|
+
To contribute to the development of BEC Widgets, start by setting up the development environment:
|
13
|
+
|
14
|
+
1. **Clone the Repository**:
|
15
|
+
```bash
|
16
|
+
git clone https://gitlab.psi.ch/bec/bec_widgets
|
17
|
+
cd bec_widgets
|
18
|
+
```
|
19
|
+
2. **Install in Editable Mode**:
|
20
|
+
|
21
|
+
Installing the package in editable mode allows you to make changes to the code and test them in real-time.
|
22
|
+
```bash
|
23
|
+
pip install -e .[dev,pyqt6]
|
24
|
+
```
|
25
|
+
|
26
|
+
|
docs/index.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# BEC Widgets documentation
|
2
|
+
|
3
|
+
<br><br>
|
4
|
+
|
5
|
+
````{grid} 3
|
6
|
+
:gutter: 5
|
7
|
+
|
8
|
+
```{grid-item-card} Introduction
|
9
|
+
:link: introduction
|
10
|
+
:link-type: ref
|
11
|
+
|
12
|
+
General information.
|
13
|
+
```
|
14
|
+
|
15
|
+
```{grid-item-card} User
|
16
|
+
:link: user
|
17
|
+
:link-type: ref
|
18
|
+
|
19
|
+
Information for users.
|
20
|
+
```
|
21
|
+
|
22
|
+
```{grid-item-card} Developer
|
23
|
+
:link: developer
|
24
|
+
:link-type: ref
|
25
|
+
|
26
|
+
Information for developers.
|
27
|
+
```
|
28
|
+
````
|
29
|
+
|
30
|
+
|
31
|
+
```{toctree}
|
32
|
+
---
|
33
|
+
numbered: true
|
34
|
+
maxdepth: 1
|
35
|
+
---
|
36
|
+
|
37
|
+
introduction/introduction
|
38
|
+
user/user
|
39
|
+
developer/developer
|
@@ -0,0 +1,18 @@
|
|
1
|
+
(introduction)=
|
2
|
+
# Introduction
|
3
|
+
|
4
|
+
## Overview
|
5
|
+
|
6
|
+
BEC Widgets is a GUI framework developed with beamline scientists in mind, aiming to provide a modern and modular environment for interacting with experiments. This package offers a suite of widgets specifically designed to enhance the workflow of beamline experiments, including features for running scans and data visualization.
|
7
|
+
|
8
|
+
Targeting the unique needs of beamline scientists, BEC Widgets stands out with its modular approach to widget design and high customizability. This flexibility allows for tailored solutions that meet the specific requirements of each beamline.
|
9
|
+
|
10
|
+
**Key Features**:
|
11
|
+
|
12
|
+
- **Integration:** Seamlessly integrates with [BEC (Beamline Experiment Control)](https://gitlab.psi.ch/bec/bec), ensuring a cohesive and efficient experiment control experience.
|
13
|
+
- **Support for PyQt5 and PyQt6:** Provides compatibility with both PyQt5 and PyQt6, offering versatility in your development environment.
|
14
|
+
- **Widget Modularity:** Features modular widgets that can be easily combined to create customized applications, perfectly aligning with the diverse needs of beamline experiments.
|
15
|
+
|
16
|
+
## Getting Started
|
17
|
+
|
18
|
+
For detailed usage instructions and examples showcasing the practical applications of BEC Widgets, please refer to the [User](#user) section. Developers interested in contributing or customizing BEC Widgets can find more information in the [Developer](#developer) section.
|
docs/make.bat
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
@ECHO OFF
|
2
|
+
|
3
|
+
pushd %~dp0
|
4
|
+
|
5
|
+
REM Command file for Sphinx documentation
|
6
|
+
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
8
|
+
set SPHINXBUILD=sphinx-build
|
9
|
+
)
|
10
|
+
set SOURCEDIR=.
|
11
|
+
set BUILDDIR=_build
|
12
|
+
|
13
|
+
%SPHINXBUILD% >NUL 2>NUL
|
14
|
+
if errorlevel 9009 (
|
15
|
+
echo.
|
16
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
17
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
18
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
19
|
+
echo.may add the Sphinx directory to PATH.
|
20
|
+
echo.
|
21
|
+
echo.If you don't have Sphinx installed, grab it from
|
22
|
+
echo.https://www.sphinx-doc.org/
|
23
|
+
exit /b 1
|
24
|
+
)
|
25
|
+
|
26
|
+
if "%1" == "" goto help
|
27
|
+
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
29
|
+
goto end
|
30
|
+
|
31
|
+
:help
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
33
|
+
|
34
|
+
:end
|
35
|
+
popd
|
docs/requirements.txt
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
(user.apps.motor_app)=
|
2
|
+
# Motor Alignment
|
3
|
+
|
4
|
+
The Motor Alignment Application is a key component of the BEC Widgets suite, designed to facilitate precise alignment of motors.
|
5
|
+
Users can easily launch this app using the script located at `/bec_widgets/example/motor_movement/motor_example.py` script.
|
6
|
+
The application's primary function is to enable users to align motors to specific positions and to visually track the motor's trajectory.
|
7
|
+
|
8
|
+
## Controlling Motors
|
9
|
+
|
10
|
+
In the top middle panel of the application, users will find combobox dropdown menus for selecting the motors they wish to track on the x and y axes of the motor map.
|
11
|
+
These motors are automatically loaded from the current active BEC instance, ensuring seamless integration and ease of use.
|
12
|
+
|
13
|
+
There are two primary methods to control motor movements:
|
14
|
+
|
15
|
+
|
16
|
+
1. **Manual Control with Arrow Keys:** Users can manually drive the motors using arrow keys. Before doing so, they need to select the step size for each motor, allowing for precise and incremental movements.
|
17
|
+
2. **Direct Position Entry:** Alternatively, users can input a desired position in the text input box and then click the Go button. This action will move the motor directly to the specified coordinates.
|
18
|
+
|
19
|
+
As the motors are moved, their trajectory is plotted in real-time, providing users with a visual representation of the motor's path. This feature is particularly useful for understanding the movement patterns and making necessary adjustments.
|
20
|
+
|
21
|
+
|
22
|
+
## Saving and Exporting Data
|
23
|
+
|
24
|
+
Users have the ability to save the current motor position in a table widget. This functionality is beneficial for recalling and returning to specific positions. By clicking the Go button in the table widget, the motors will automatically move back to the saved position.
|
25
|
+
|
26
|
+
Additionally, users can annotate each saved position with notes and comments directly in the table widget. This feature is invaluable for keeping track of specific alignment settings or observations. The contents of the table, including the notes, can be exported to a .csv file. This exported data can be used for initiating scans or for record-keeping purposes.
|
27
|
+
|
28
|
+
The table widget also supports saving and loading functionalities, allowing users to preserve their motor positions and notes across sessions. The saved files are in a user-friendly format for ease of access and use.
|
29
|
+
|
30
|
+
|
31
|
+
## Example of Use
|
32
|
+
|
33
|
+

|
34
|
+
|
Binary file
|
docs/user/apps.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
(user.apps)=
|
2
|
+
# Applications
|
3
|
+
|
4
|
+
In the `bec_widgets/examples` directory, you will find practical applications that demonstrate the capabilities of BEC Widgets in real-world scenarios. These applications showcase the adaptability and functionality of the framework for various beamline experiment needs.
|
5
|
+
|
6
|
+
**Motor Alignment Tool**
|
7
|
+
|
8
|
+
This tool assists in aligning motors with samples during experiments. It enables users to move motors, visually track their movement, and record positions for precise alignment.
|
9
|
+
|
10
|
+
- **Location:** `bec_widgets/examples/motor_movement`
|
11
|
+
- **Further Details:** [Motor Alignment Tool Documentation](#user.apps.motor_app)
|
12
|
+
|
13
|
+
**General Plotting Live Acquisition Tool**
|
14
|
+
|
15
|
+
This application is designed for live data visualization. It allows users to view real-time signals from detectors in a multi-grid layout, facilitating immediate analysis during experiments.
|
16
|
+
|
17
|
+
- **Location:** `bec_widgets/examples/plot_app`
|
18
|
+
- **Further Details:** [General Plotting Live Acquisition Tool Documentation](#user.apps.plot_app)
|
19
|
+
|
20
|
+
|
21
|
+
**Modular Application**
|
22
|
+
|
23
|
+
A bespoke application built entirely using BEC Widgets' modular components. This example illustrates the framework's flexibility in creating customized GUIs tailored to specific experimental setups.
|
24
|
+
|
25
|
+
- **Location:** `bec_widgets/examples/modular_app`
|
26
|
+
- **Further Details:** [Modular Application](#user.apps.modular_app)
|
27
|
+
|
28
|
+
---
|
29
|
+
Note: The documentation for these applications is currently under development. The provided links will direct you to their respective pages once the documentation is complete.
|
30
|
+
|
31
|
+
```{toctree}
|
32
|
+
---
|
33
|
+
maxdepth: 1
|
34
|
+
hidden: true
|
35
|
+
---
|
36
|
+
|
37
|
+
apps/motor_app
|
38
|
+
apps/plot_app
|
39
|
+
apps/modular_app
|
@@ -0,0 +1,13 @@
|
|
1
|
+
(user.customisation)=
|
2
|
+
# Customisation
|
3
|
+
|
4
|
+
BEC Widgets are designed to be used with QtDesigner to quicly design GUI.
|
5
|
+
|
6
|
+
|
7
|
+
## Example of promoting widgets in Qt Designer
|
8
|
+
|
9
|
+
_Work in progress_
|
10
|
+
|
11
|
+
## Implementation of plugins into Qt Designer
|
12
|
+
|
13
|
+
_Work in progress_
|
@@ -0,0 +1,46 @@
|
|
1
|
+
(user.installation)=
|
2
|
+
# Installation
|
3
|
+
|
4
|
+
|
5
|
+
**Prerequisites**
|
6
|
+
|
7
|
+
Before installing BEC Widgets, please ensure the following requirements are met:
|
8
|
+
|
9
|
+
1. **Python Version:** BEC Widgets requires Python version 3.10 or higher. Verify your Python version to ensure compatibility.
|
10
|
+
2. **BEC Installation:** BEC Widgets works in conjunction with BEC. While BEC is a dependency and will be installed automatically, you can find more information about BEC and its installation process in the [BEC documentation](https://beamline-experiment-control.readthedocs.io/en/latest/).
|
11
|
+
|
12
|
+
**Standard Installation**
|
13
|
+
|
14
|
+
Install BEC Widgets using the pip package manager. Open your terminal and execute:
|
15
|
+
|
16
|
+
```bash
|
17
|
+
pip install bec_widgets
|
18
|
+
```
|
19
|
+
|
20
|
+
This command installs BEC Widgets along with its dependencies, including the default PyQt6.
|
21
|
+
|
22
|
+
**Selecting a PyQt Version**
|
23
|
+
|
24
|
+
BEC Widgets supports both PyQt5 and PyQt6. To install a specific version, use:
|
25
|
+
|
26
|
+
For PyQt6:
|
27
|
+
|
28
|
+
```bash
|
29
|
+
pip install bec_widgets[pyqt6]
|
30
|
+
```
|
31
|
+
|
32
|
+
For PyQt5:
|
33
|
+
|
34
|
+
```bash
|
35
|
+
pip install bec_widgets[pyqt5]
|
36
|
+
```
|
37
|
+
|
38
|
+
**Troubleshooting**
|
39
|
+
|
40
|
+
If you encounter issues during installation, particularly with PyQt, try purging the pip cache:
|
41
|
+
|
42
|
+
```bash
|
43
|
+
pip cache purge
|
44
|
+
```
|
45
|
+
|
46
|
+
This can resolve conflicts or issues with package installations.
|
docs/user/user.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
(user)=
|
2
|
+
# User
|
3
|
+
|
4
|
+
**Overview**
|
5
|
+
|
6
|
+
Welcome to the User section of the BEC Widgets documentation! BEC Widgets is a versatile GUI framework tailored for beamline scientists, enabling efficient and intuitive interaction with beamline experiments. This section is designed to guide both new and experienced users through the essential aspects of utilizing BEC Widgets.
|
7
|
+
|
8
|
+
**Key Topics**
|
9
|
+
|
10
|
+
- [Installing BEC Widgets](#user.installation): Instructions for installing BEC Widgets on your system.
|
11
|
+
|
12
|
+
- [Example Applications](#user.apps): Overview of bespoke applications and demonstrations of BEC Widgets in action, showcasing its use in real-world beamline scenarios.
|
13
|
+
|
14
|
+
- [Widgets Overview](#user.widgets): Detailed information on the variety of widgets available, their functions, and how to use them effectively.
|
15
|
+
|
16
|
+
- [Customization and Configuration](#user.customisation): Tips on customizing and configuring BEC Widgets to suit your specific experimental needs using Qt Designer.
|
17
|
+
|
18
|
+
**Bug Reports and Feature Requests**
|
19
|
+
|
20
|
+
We value your feedback and contributions to improving BEC Widgets. If you encounter any issues or have ideas for new features, we encourage you to report them.
|
21
|
+
|
22
|
+
- **Bug Reports:** If you find a bug or an issue, please report it on our repository's [Issues page](https://gitlab.psi.ch/bec/bec-widgets/-/issues?sort=created_date&state=opened). We have a template for bug reporting to help you provide all necessary information.
|
23
|
+
- **Feature Requests:** Have an idea for a new feature or an enhancement? Share it with us on the [Issues page](https://gitlab.psi.ch/bec/bec-widgets/-/issues?sort=created_date&state=opened) of our repository. We have a feature request template that you can use to describe your proposal.
|
24
|
+
|
25
|
+
**Development**
|
26
|
+
|
27
|
+
For advanced details about BEC Widgets’ internal architecture, development contributions, or customization techniques, please explore the [Developer](#developer) section.
|
28
|
+
|
29
|
+
```{toctree}
|
30
|
+
---
|
31
|
+
maxdepth: 3
|
32
|
+
hidden: true
|
33
|
+
---
|
34
|
+
|
35
|
+
installation
|
36
|
+
apps
|
37
|
+
widgets
|
38
|
+
customisation
|
Binary file
|
Binary file
|
Binary file
|
docs/user/widgets.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
(user.widgets)=
|
2
|
+
# Widgets
|
3
|
+
|
4
|
+
## Visualization Widgets
|
5
|
+
|
6
|
+
BEC Widgets includes a variety of visualization widgets designed to cater to diverse data representation needs in beamline experiments. These widgets enhance the user experience by providing intuitive and interactive data visualizations.
|
7
|
+
|
8
|
+
### 1D Waveform Widget
|
9
|
+
|
10
|
+
**Purpose:** This widget provides a straightforward visualization of 1D data. It is particularly useful for plotting positioner movements against detector readings, enabling users to observe correlations and patterns in a simple, linear format.
|
11
|
+
|
12
|
+
**Key Features:**
|
13
|
+
- Real-time plotting of positioner versus detector values.
|
14
|
+
- Interactive controls for zooming and panning through the data.
|
15
|
+
- Customizable visual elements such as line color and style.
|
16
|
+
|
17
|
+
**Example of Use:**
|
18
|
+

|
19
|
+
### 2D Scatter Plot
|
20
|
+
|
21
|
+
**Purpose:** The 2D scatter plot widget is designed for more complex data visualization. It employs a false color map to represent a third dimension (z-axis), making it an ideal tool for visualizing multidimensional data sets.
|
22
|
+
|
23
|
+
**Key Features:**
|
24
|
+
|
25
|
+
- 2D scatter plot with color-coded data points based on a third variable (two positioners for x/y vs. one detector for colormap).
|
26
|
+
- Interactive false color map for enhanced data interpretation.
|
27
|
+
- Tools for selecting and inspecting specific data points.
|
28
|
+
|
29
|
+
**Example of Use:**
|
30
|
+

|
31
|
+
### Motor Position Map
|
32
|
+
|
33
|
+
**Purpose:** A specialized component derived from the Motor Alignment Tool. It's focused on tracking and visualizing the position of motors, crucial for precise alignment and movement tracking during scans.
|
34
|
+
|
35
|
+
**Key Features:**
|
36
|
+
- Real-time tracking of motor positions.
|
37
|
+
- Visual representation of motor trajectories, aiding in alignment tasks.
|
38
|
+
- Ability to record and recall specific motor positions for repetitive tasks.
|
39
|
+
|
40
|
+
**Example of Use:**
|
41
|
+

|
pyproject.toml
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "bec_widgets"
|
7
|
+
version = "0.53.1"
|
8
|
+
description = "BEC Widgets"
|
9
|
+
requires-python = ">=3.10"
|
10
|
+
classifiers = [
|
11
|
+
"Development Status :: 3 - Alpha",
|
12
|
+
"Programming Language :: Python :: 3",
|
13
|
+
"Topic :: Scientific/Engineering",
|
14
|
+
]
|
15
|
+
dependencies = [
|
16
|
+
"pydantic",
|
17
|
+
"qtconsole",
|
18
|
+
"jedi",
|
19
|
+
"qtpy",
|
20
|
+
"pyqtgraph",
|
21
|
+
"bec_lib",
|
22
|
+
"zmq",
|
23
|
+
"h5py",
|
24
|
+
"pyqtdarktheme",
|
25
|
+
"black",
|
26
|
+
]
|
27
|
+
|
28
|
+
|
29
|
+
[project.optional-dependencies]
|
30
|
+
dev = [
|
31
|
+
"pytest",
|
32
|
+
"pytest-random-order",
|
33
|
+
"pytest-timeout",
|
34
|
+
"coverage",
|
35
|
+
"pytest-qt",
|
36
|
+
"isort",
|
37
|
+
"fakeredis",
|
38
|
+
]
|
39
|
+
pyqt5 = ["PyQt5>=5.9"]
|
40
|
+
pyqt6 = ["PyQt6>=6.7"]
|
41
|
+
|
42
|
+
[project.urls]
|
43
|
+
"Bug Tracker" = "https://gitlab.psi.ch/bec/bec_widgets/issues"
|
44
|
+
Homepage = "https://gitlab.psi.ch/bec/bec_widgets"
|
45
|
+
|
46
|
+
[tool.hatch.build.targets.wheel]
|
47
|
+
include = ["*"]
|
48
|
+
|
49
|
+
[tool.black]
|
50
|
+
line-length = 100
|
51
|
+
skip-magic-trailing-comma = true
|
52
|
+
|
53
|
+
[tool.isort]
|
54
|
+
profile = "black"
|
55
|
+
line_length = 100
|
56
|
+
multi_line_output = 3
|
57
|
+
include_trailing_comma = true
|
58
|
+
|
59
|
+
[tool.semantic_release]
|
60
|
+
build_command = "python -m build"
|
61
|
+
version_toml = ["pyproject.toml:project.version"]
|
62
|
+
|
63
|
+
[tool.semantic_release.commit_author]
|
64
|
+
env = "GIT_COMMIT_AUTHOR"
|
65
|
+
default = "semantic-release <semantic-release>"
|
66
|
+
|
67
|
+
[tool.semantic_release.commit_parser_options]
|
68
|
+
allowed_tags = [
|
69
|
+
"build",
|
70
|
+
"chore",
|
71
|
+
"ci",
|
72
|
+
"docs",
|
73
|
+
"feat",
|
74
|
+
"fix",
|
75
|
+
"perf",
|
76
|
+
"style",
|
77
|
+
"refactor",
|
78
|
+
"test",
|
79
|
+
]
|
80
|
+
minor_tags = ["feat"]
|
81
|
+
patch_tags = ["fix", "perf"]
|
82
|
+
default_bump_level = 0
|
83
|
+
|
84
|
+
[tool.semantic_release.remote]
|
85
|
+
name = "origin"
|
86
|
+
type = "gitlab"
|
87
|
+
ignore_token_for_push = false
|
88
|
+
|
89
|
+
[tool.semantic_release.remote.token]
|
90
|
+
env = "GL_TOKEN"
|
91
|
+
|
92
|
+
[tool.semantic_release.publish]
|
93
|
+
dist_glob_patterns = ["dist/*"]
|
94
|
+
upload_to_vcs_release = true
|