Files
slsDetectorPackage/pyctbgui
Martin Mueller 0837de2a5a CTB frequency rounding, CTB frequency measurement, CTB frequency units (#1423)
* round CTB clocks to next closest possible value, added freq measurement

* added time for firmware to measrue actual value after frequency change

* add check for backwards compatibility

* change CTB and XCTB clock values to MHz, TODO: units and validation errors

* changed runclk command to use units and float, TODO: dbit, adcclk, why is everything called StringTo ?

* do the same for dbit and adcclk

* added tolerance to exptime, fixed test

* update default values in server defs

* added virtual check in Altera_PLL, update testcases

* change python and pyctbgui to accept and return floating point MHz

* update help and comments

* Dev/ctb clocks fix (#1434)

* introduced new type Hz, typetraits, String conversions, command generation (not yet generated)

* incorrect unit typo

* cmd generation and compiles

* default to MHz, removed space between units for consistency with timers, min and max checks for clks

* in python, but need to change the default to Hz again for clean code and intuition

* allow ints, doubles, implicit conversions

* dont allow raw ints, doubles and implicit conversions

* fixed tests

* added operators for Hz in python

* fix test for min clk for xilinx ctb

* fix test

* fix python tests

* fixed xilinx period and default clks

* test fix

* removed the 3 clock cycle check for ctb and implemented properly the max adc clk frq for altera ctb

* removing 3 clock cycle code from xilinx as well

* formatting

* loadpattern before 3 clk cycles code

* actualtime and measurement time to be implemented in 100ns already in fw

* fix tests

* pyzmq dependency forthe tests

* fixed pyctbgui for freq

* insert tolerance check again

* also added tolerance check for patwaittime

* formatting

* minor: rounding test

* removed Rep redundant in ToString for freq

* intro frequency unit enums, removed unnecessary template behavior for ToString with freq unit, switching from parsing string unit argument to the enum argument for ToString, adding parsing string to unit at CLI boundary

* minor, and binaries

* minor, default clk vals are 0 but set up at detector setup

* get frequency only for that unit

* tolerance process

* missed in previous commit

* some more changes to exptime and validations

* ctb is probably done

* periodleft and delayleft

* fixed xilinx freq conv as well

* fixed m3 bug, binaries

* xilinx: setup also done in stop server so that the clk is not 0

* missed a test marker

* binaries in

* review fixes, simpler validation of timers in ctb and xilinx ctb

* typo fix

* format

* fix tests

---------

Co-authored-by: Martin Mueller <martin.mueller@psi.ch>
Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
2026-05-06 15:52:13 +02:00
..
2026-02-23 12:33:10 +01:00
2024-09-10 16:00:04 +02:00
2024-09-10 16:00:04 +02:00
2024-09-10 16:00:04 +02:00
2026-02-23 12:33:10 +01:00

New Chip Test Board Gui using Python

Prototype for a new python based GUI for the Chip Test Board

Getting started

To install all dependencies build the package with python package build. This requires that you have build installed. We recommend using a virtual conda environment.

git clone https://github.com/slsdetectorgroup/pyctbgui.git
cd pyctbgui
python -m build 
pip install dist/pyctbgui-0.0.0-cp313-cp313-linux_x86_64.whl 
./CtbGui

Note that the above package installs slsdet and aare. If you want to work on your local branch add the locally build python modules first to your PYTHONPATH.

Format Code

To check python code is formatted correctly according to style guides in pyproject.toml run (requires yapf to be installed.):

yapf --style pyproject.toml -r -d tests pyctbgui *.py

To format inplace using style in pyproject.toml run:

yapf --style pyproject.toml -m -r -i tests pyctbgui *.py

Run Tests:

The following command runs the unit tests (Requires pytestto be installed):

	python -m pytest -v tests/unit

The following command runs end to end tests:

	python -m pytest -v tests/gui

setup pre-commit hooks

pre-commit install