Commit Graph

9263 Commits

Author SHA1 Message Date
a0bd26fa7c resolved merge conflict
All checks were successful
Build on RHEL9 / build (push) Successful in 3m33s
Build on RHEL8 / build (push) Successful in 5m48s
2025-11-18 12:06:23 +01:00
e4f47cedf7 Merge pull request #1333 from slsdetectorgroup/1001/fix_format
Some checks failed
Build on RHEL9 / build (push) Failing after 3m39s
Build on RHEL8 / build (push) Failing after 5m48s
changed format to clang-format 17
2025-11-18 12:02:47 +01:00
e92fafbb4b formatted with clang format 12 2025-11-18 12:02:13 +01:00
4730236170 changed format to clang-format 17 2025-11-18 11:31:17 +01:00
85edf98133 disable user id and port test
All checks were successful
Build on RHEL9 / build (push) Successful in 3m20s
Build on RHEL8 / build (push) Successful in 5m25s
2025-11-17 11:00:37 +01:00
ea07eb36d0 added colorama in github workflows
Some checks failed
Build on RHEL9 / build (push) Failing after 2m54s
Build on RHEL8 / build (push) Failing after 5m40s
2025-11-17 09:37:58 +01:00
7d1809642e updated release 2025-11-14 14:58:39 +01:00
c5357a4d73 wrapped virtual detector setup in a test fixture 2025-11-14 14:51:09 +01:00
e6c6b8f4c5 release notes is a markdown file 2025-11-14 12:31:42 +01:00
6474029c42 added tests 2025-11-14 12:29:42 +01:00
f2ee88ba68 clear_rx_roi accessible from python API 2025-11-14 11:15:20 +01:00
f1736b5e7f API also allows single sequence for single ROI 2025-11-14 11:12:34 +01:00
e471b81b84 added typecaster for slsdefs::ROI and added setter and getter for ROI 2025-11-14 10:20:56 +01:00
54e4c46f02 10.0.0.rc (#1260)
Some checks failed
Build on RHEL9 / build (push) Failing after 4m23s
Build on RHEL8 / build (push) Failing after 4m58s
* alignedData now uses std::align_alloc

* imagedata is now allocated on the heap

* m3 server fix for trimbits and badchannels that are shifted by 1

* formatting

* binary in

* added check for proper memory allocation

* commenting out the example in receiver data call back changing size as it affects users using debugging mode to print out headers

* fixed warnings

* commenting out the example in receiver data call back changing size as it affects users using debugging mode to print out headers

* got rid of cast to uint64

* got rid of Reorder function

* added sanity check to only enable for chipttestboard and xilinx

* removed Gotthard stuff

* update the comment about how to modify data on a data call back from the receiver

* autogenerated commands and make format

* changed font size in GUI

* clang-format with clang-format version 17

* updated update_image_size in xilinx

* version number automated for python build

* mistakenly set version back to 0.0.0

* updated github workflow scripts to support automatic version numbering with environment variable

* managed to load VERSION file in yaml file - simplifies things

* saving changes in git workflow failed

* got typo in github workflow

* updatet regex pattern to support postfix

* normalized version to PEP 440 specification in update_version.py

* bug did not support version 0.0.0

* upgrading to c++17 from c++11 and patch command has to be found before applying patch on libzmq (#1195)

* Dev/allow localhost for virtual tests (#1190)

* remove the check for localhost being used in rx_hostname for python test for simulators, run rx_arping test only if hostname is not 'localhost'

* fix tests for fpath: cannot set back to empty anymore (empty is default)

* default rx_hostname arg = localhost, and default settings path =../../settingsdir

* changed virtual tests script for better printout on exceptions

* fix for catching generaltests exceptions and exiting instead of continuing

* fix minor

* fixed shared memeory tests to include current env and fixed prints for errors

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>

* added regex pattern matching to version in toml file

* Dev/gitea docker (#1194)

* gitea workflows for RH8 and RH9
* using our docker images

* version now supports . before postfix

* rough draft of test acquire of all detectors for frames caught and file size. ctb not included yet

* moved dbitoffset, dbitreorder and dbitlist to GeneralData

* added error message on receiver side, throw error

* removed log as error already printed

* added tests to check file size and frames caught with an acquire (virtual) for every detector

* minor printout removed

* typo fixed

* removed minor printout

* incorrect counter mask tested

* fix 10g adc enable mask, switched with 1g

* fixed hardcoded values of nchip nchan etc from detPArameters

* fixed ctb tests, need to fix in develoepr (if digital modfe not enabled, should not take into accoutn dbitlist or dbitoffset or dbitreorder

* only reorder bits if some sort of digital readout mode enabled

* trying to fix acquire for xilinx

* fix for xilinx ctb virtual

* alloweing all tests

* typo

* fix for slsreceiver killed but complaining for virtual tests with script

* fixed bug found by @AliceMazzoleni99 that for ctb server is still shown in pgrep -f if xilinx server running, so now the pid is killed and looking for any DetectorServer_virtual instead. also reset color coding after Log

* check if process running for kill -9 slsReceiver fail

* removed -9 to kill with cleanup

* frame synchonrizer fixes: typo of iterator for loop and zmg_msg_t list cleaned up before sending multi part zmq; test written for the frame synchronizer, test_simulator.py rewritten for more robustness and refactoring commonality between both scripts

* better error messageS

* minor

* typo

* moving the erasure of the fnum to after sending the zmg packets and also deleteing all old frames when end of acquisition

* fix bug in blackfin read access to firmware registers

* updates api version based on version file & converted shell script files to python

* updated all makefiles

* refactoring code and compiling binary

* formatting

* rewrote end() for StaticVector

* rearranged receiver topics, differentiated btween receiver variants and added info about slsFrameSynchronizer

* typo

* minor aesthetics

* minor

* added extra fs link and fixed execute_program warning

* and now with link

* updating pmods

* adresses review comments

* dummy commit for versionAPI

* formatted and updated versionAPI.h

* added expat to host section

* updated documentation for pip installation as well

* Dev/add numpy  (#1227)

* added numpy dependency
* added build specifications for python version and platform

* updates files/variants for pmods for 9.2.0 (#1233)

* tests for bool in ToString/StringTo (#1230)

- Added tests for ToString/StringTo<bool>
- Added overload for ToString of bool (previously went through int)

* added docs for SLSDETNAME (#1228)

* added docs for SLSDETNAME

* clarification on hostname

* added examples on module index

* fixes

* fixed typo

* Dev/update test framesynchronizer (#1221)

* raise an exception if the pull socket python script had errors at startup (for eg if pyzmq was not installed)

* minor changes that got lost in the merge of automate_version_part 2 PR

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>

* added workflow for python wheels

* wip

* formatting

* wip

* wip to parse vector of rois at command line

* wip

* first level test

* can get individual rois, but not connected to command yet

* rois shoudl work. left to implement tests for individual rois, create multiple datasets (1 for each roi) in the virutal data file. currently virutal dataset with roi is not implemented and a warning is given instead. wonder why since the inviduviaual roi files are clipped

* all tests pased

* minor

* fixed rx_roi for multi modules jungfrau , tests for eiger, multi modules jungfrau in x and 2 interfaces

* works for eiger as well

* switched to vector instead of std::array<ROI, 2>>, which prints extra [-1, -1] when theres only 1 udp interface

* wip

* fix for empty roi vectors (which shouldnt be) as you cant know if its all or not in roi

* wip: to map roi to virutal

* fix for eiger, added python test for testig roi in different module and detector type configurations

* wip, fails with master and virtual

* works for complete roi

* wip, works for a single roi

* works for all rois

* wip to fix tests

* 1d fixes

* rois test work on 1d as well

* check master file creation as well in rx_roi tests

* get rx_roi from metadata from rxr, cant reconstruct. fixed clear roi should give 1 roi min

* gui shows roi now

* format

* updated python bindings

* updated master file versions

* cmd generation and formatting

* minor fixes in command line and help

* minor

* doesnt happen anymore

* comment

* minor

* redundant getRxROI in Detector class for multi level and module level

* refactor cmd parsing (detid can be parsed directly)

* refactor cmd line

* refactor command line parsing of roi

* modified comments about ctb and xilinx not using roi

* refactoring

* refactorign

* refactoring wip

* wip refactoring

* formattin

* to avoid confusion, moved default initialized, single sized declared vector of roi to be created at setDetectorType

* pybind only 1 function for getRxROI

* command line help

* specified number of receiver error message

* minor comment

* refactored to take out repetitive code, need to adjust for slsMulti and slsFrameSync

* wip

* works, need to add tests

* made Commadnlineoptions into a class

* wip test

* fixed tests

* cleaning up properly , semaphore leaks, child process/thread throwing handled

* getuid issue on github workflow

* constexpr and checking if options object type is same

* unnecessary capture

* remove testing code, minor

* fixed help, -t for multi should not be supported as it never had it

* Formatting

* hdf5 definitions in test when not compiled with hdf5

* typo

* moved optstring and long options to the constructor

* raising a SIGINT when the child thread has an exception so that the parent thread can exit all the threads and clean up gracefully

* minor test typo

* check status of child exiting and use that to send sigint to all the child processes from the parent

* fixed validation in network_utils, added a tests to throw for port 65535 in test mode (option on for sls_use_tests), multi:parent process checks child process exit status to send sigint to others

* moving set signal handler to network utils

* readoutspeed in rx master file and  other master file inconsistencies (#1245)

readout speed added to json and h5 master files.
Also fixed master file inconsistencies

Sserver binaries
- update server binaries because readoutspeed needs to be sent to receiver with rx_hostname command

API
- added const to Detector class set/getburstmode

Python
- updated python bindings (burstmode const and roi arguments)

Cmd generation
- added pragma once in Caller.in.h as Caller is included in test files

m3: num channels due to #counters < 3
* workaround for m3 for messed up num channels (client always assumes all counters enabled and adds them to num channels), fix for hdf5

g2: exptime master file inconsistency
- exptime didnt match because of round of when setting burst mode (sets to a different clk divider)
- so updating actual time for all timers (exptime, period, subexptime etc, )  in Module class, get timer values from detector when setting it and then send to receiver to write in master file

ctb image size incorrect:
-  write actual size into master file and not the reserved size (digital reduces depending on dbit list and dbit offset)
- added a calculate ctb image size free function in generalData.h that is used there as well as for the tests.


master file inconsistencies
- refactored master attributes writing using templates
-    names changed to keep it consistent between json and hdf5 master file (Version, Pixels, Exposure Times, GateDelays, Acquisition Period, etc.)
-  datatypes changed to keep it simple where possible: imageSize, dynamicRange, tengiga, quad, readnrows, analog, analogsamples, digital, digitalsamples, dbitreorder, dbitoffset, transceivermask, transeiver, transceiversamples, countermask, gates =>int
- replacing "toString" with arrays, objects etc for eg for scan, rois, etc.
- json header always written (empty dataset or empty brackets)
- hdf5 needs const char* so have to convert strings to it, but taking care that strings exist prior to push_back
- master attributes (redundant string literals->error prone

tests for master file
- suppressed deprecated functions in rapidjson warnings just for the tests
- added slsREceiverSoftware/src to allow access to receiver_defs.h to test binary/hdf5 version
- refactored acquire tests by moving all the acquire tests from individual detector type files to a single one=test-Caller-acquire.cpp
- set some default settings (loadBasicSettings) for a basic acquire at load config part for the test_simulator python scripts. so minimum number of settings for detector to be set for any acquire tests.
- added tests to test master files for json and hdf5= test-Caller-master-attributes.cpp
- added option to add '-m' markers for tests using test_simulator python script

* doc: added inst on how to set persistentn NIC changes after reboot for each ethernet interface such as rx 4096, rx-usecs, adaptive-rx and gro etc.

* added permanent ethtool settings also for fedora or modern rhel

* troubleshooting doc: permanent changes for 10g pc tuning (#1247)

* doc: added inst on how to set persistentn NIC changes after reboot for each ethernet interface such as rx 4096, rx-usecs, adaptive-rx and gro etc.

* added permanent ethtool settings also for fedora or modern rhel

* ifcfg scripts still work on rhel8, just not preferred

* added dataformat for jungfrau

* eiger basic mod

* eiger doc done

* added moench

* done

* free shm exposed in python as free function and detector function

* minimum change

* added quad and updated about 1gbe/10gbe

* more info

* remove arguments info

* replacing commands with links

* minor

* detail explanation of eiger

* fixed imagesize ctb issue (out values not transferred, setting any dbit values was not recalculatign image size in generaldata)

* fixed ctb dbit clock changing period in tests as it was setting run clock instead

* python accessing freed shared memory object (#1253)

* added a 'isValid' member in shared memory (also updated shm version) with default true, any access to shared memory() checks also for validity. any free will set this to false and then unmap shm. Any access to shm will then check validity in python.

* fixed tests for shm

* added tests in python as well

---------

Co-authored-by: Alice <alice.mazzoleni@psi.ch>

* updated error message

* made markers argument in ParseArguments a boolean instead of an int

* removed relative path compared to where executable run in test script for settingsdir

* fix roi test

* updating versions (#1258)

* updating package version, client version, server versions. Renaming server versions, using hardlinks in serverBin. Removing ctb servers in serverBin. (#1259)

* fixed no interpolation mode for moench (#1262)

Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>

* fixed multi receiver and frames sync help throw of bad variant access (#1265)

* 1000/doc c standard (#1267)

* updated c++11 to c++17

* more about c++11 and updating readme

* updated documentation for receiver arguments and also making receiver constructor explicit

* minor fix for rxr err message

* fixed doc about gcc version

* 1000/release notes (#1269)

* updated firmware and server version in release notes

* release notes wip

* updated notes(prs done)

* updated release notes. wip

* Release notes

* minor

* minor fix

* 1000/doc architecture commands (#1271)

* sw architecture and setup commands

* 1000/shm free obsolete (#1273)

* freeing obsolete shm withoua a 'isValid' should access raw pointers. Need to move this all into the shm class

* fixed obsolete shm free issue

* minor

* ensuring the test works platform independent for size of int

* removed verify, update, fixed getUser to be a free function, generated commands, python bindings yet to do

* python bindings

* fixed tests

* minor

* minor

* format

* userdetails refinedg

* fixed caller test

* updated client api version (#1277)

* one doesnt need to open shared memory to call removesharedmemory, and calling hasMemoryvalid without opening will cause segfault (not used now, but could in the future)

* fix test on shm

* minor

* added image source files from draw.io to create the images (#1280)

* 1000/fix_actual_tests (#1282)

- fix acquire fail in tests (adcreg test)
- roi tests fail after overlapping invalid test and acquire after
- print udp dest mac in server properly
- fixed udp dst list get (server was not sending entry proper size to match proper struct size in client)
- updated server binaries and updated hard links in serverBin
- added documentation regarding gui:  zmqport and zmqip in terms of gui, rx_zmqstream
- removed print - probably ended there for debuggung

---------

Co-authored-by: Alice <alice.mazzoleni@psi.ch>

* 1000/fix_m3_tests (#1286)

* testing clkdiv one must ensure the exptime delay etc all are reset to the exact values for tests

* change dac max values for vth values for m3 in client side (set module

* 1000/doc_cmake (#1289)

* more detail documentation in installation

* more detail documentation in installation

* added links to api examples

* reverted back that vthreshold dacs in m3 have min and max as 200 and 2400 (#1294)

* update release notes and date (#1298)

---------

Co-authored-by: Mazzoleni Alice Francesca <mazzol_a@pc17378.psi.ch>
Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
Co-authored-by: Martin Mueller <martin.mueller@psi.ch>
Co-authored-by: froejdh_e <erik.frojdh@psi.ch>
Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>
10.0.0
2025-09-10 11:13:36 +02:00
c10bc5e530 9.2.0.rc (#1232)
Some checks failed
Native CMake Build / Configure and build using cmake (push) Failing after 3s
* Python module is now built using scikit-build-core: Dev/scikitbuild #1164
* slsdet is available on PyPI from this release onwards
* Fixed broken import in typecaster.h #1181
* Dev/automate version number #1193
* Dev/automate version part2 #1209
* 9111: added expat to host section to fix conda #1216
* fix for gotthard.py to import slsdet properly
* added slsFramesynchronizer to conda copy_lib.sh
* version of release
* update version of client
* removed cmake <=3.28 that was added in 9.1.11 (main_library in meta.yaml in conda-recipes)
* added slsFrameSynchronizer binary to conda
* added numpy dependency to toml
* added documentation for pip in installation

Detailed Commits:
* skeleton pyproject.toml
* moved compiled extension into slsdet
* WIP
* WI{
* separated the recipes
* restored comments, cleanup
* cleaned meta yaml
* added back some python versions
* conda build of main library
* fixed typo
* removed conda build pin
* added zlib
* added workflow for python lib
* patching libzmq and cleaned up cmake
* removed compiler version
* switched patch tool
* reverted to scikit-build in pyproject.toml
* added sls_detector bin
* added sync, renamed action
* update cmake<=3.28 in conda build requirements
* Fixed broken import in typecaster.h (#1181)
- Fixed the broken import _slsdet --> slsdet._slsdet caused by a previous upgrade
- added tests that exercises the conversion from python to C++ and from C++ to python
- Python unit tests now run in CI (!)
* removed 3.28 restriction on cmake in meta.yaml
* from #1216 to 9.1.1.rc that got lost in merge from develoepr, added expat to host section to fix conda build
* back with the cmake restriction
* fixing gotthard1 import
* version number automated for python build
* mistakenly set version back to 0.0.0
* updated github workflow scripts to support automatic version numbering with environment variable
* managed to load VERSION file in yaml file - simplifies things
* saving changes in git workflow failed
* got typo in github workflow
* updatet regex pattern to support postfix
* normalized version to PEP 440 specification in update_version.py
* bug did not support version 0.0.0
* added regex pattern matching to version in toml file
* version now supports . before postfix
* updates api version based on version file & converted shell script files to python
* updated all makefiles
* adresses review comments
* updated release version and the api lib version
* raise an exception if the pull socket python script had errors at startup (for eg if pyzmq was not installed)
* cmake<=3.28 not required anymore
* updated documentation for pip installation as well
* 920/add numpy  (#1226)
* added numpy dependency
* aded build specifications for python version and platform
* release notes
---------
Co-authored-by: froejdh_e <erik.frojdh@psi.ch>
Co-authored-by: Fröjd Lars Erik <froejdh_e@pcmoench03.psi.ch>
Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
Co-authored-by: mazzol_a <mazzol_a@pc17378.psi.ch>
Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
9.2.0
2025-06-02 13:45:06 +02:00
0d1642c56e 9.1.1: Merge pull request #1217 from slsdetectorgroup/9.1.1.rc
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
9.1.1
2025-05-22 11:33:01 +02:00
9bb25445f5 formatting 2025-05-22 10:54:02 +02:00
376514606f updated relase notes 2025-05-22 10:51:57 +02:00
8707196f58 Merge pull request #1216 from slsdetectorgroup/911/fix-conda
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
added expat to host section to fix conda build
2025-05-22 10:06:41 +02:00
froejdh_e
9f9b1d496c added expat to host section 2025-05-22 09:51:01 +02:00
b2dd964907 Merge pull request #1212 from slsdetectorgroup/911/doc_frame_sync
911/documentation for slsFrameSynchronizer
2025-05-22 08:43:11 +02:00
348d820265 minor 2025-05-21 17:27:31 +02:00
d414c7459b minor aesthetics 2025-05-21 17:05:38 +02:00
8eb2134d9f Merge pull request #1213 from slsdetectorgroup/fix/StaticVector
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
911: rewrote end() for StaticVector
2025-05-21 16:34:07 +02:00
b8b067d74b typo 2025-05-21 15:46:49 +02:00
froejdh_e
3619a032ac rewrote end() for StaticVector 2025-05-21 15:46:04 +02:00
2ee7e36fb3 rearranged receiver topics, differentiated btween receiver variants and added info about slsFrameSynchronizer 2025-05-21 14:45:01 +02:00
d739453f2b added support to release notes
Some checks failed
CMake / Configure and build using cmake (push) Failing after 1s
2025-05-14 09:10:15 +02:00
3bfa3bfba3 update receiver version
Some checks failed
CMake / Configure and build using cmake (push) Failing after 1s
2025-05-13 23:30:35 +02:00
894c227723 update release notes and package version 2025-05-13 23:26:04 +02:00
f3e5804d02 Merge pull request #1205 from slsdetectorgroup/911/fix_frame_sync
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
911/fix frame sync
2025-05-12 01:01:16 +02:00
2c4cd80748 moving the erasure of the fnum to after sending the zmg packets and also deleteing all old frames when end of acquisition
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
2025-05-07 16:44:03 +02:00
674865120b typo 2025-05-07 16:03:43 +02:00
c0ae090be0 better error messageS 2025-05-07 16:02:37 +02:00
a85ad6cd84 minor 2025-05-07 16:01:31 +02:00
5f6dea2d6d fix for gotthard to work 2025-05-07 14:06:30 +02:00
f5bf509525 typo 2025-05-07 13:58:21 +02:00
03eded30f9 refactored test_simulator and test_frame_synchronizer tests 2025-05-07 13:57:12 +02:00
684f511bf8 copy in make
Some checks failed
CMake / Configure and build using cmake (push) Failing after 3s
2025-05-06 17:38:07 +02:00
2c93d40e81 moved log out to utils 2025-05-06 17:37:40 +02:00
9889a31f81 works for all detectors
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
2025-05-05 17:22:47 +02:00
b00a37bc16 minor 2025-05-05 14:05:08 +02:00
15030ab732 minor 2025-05-05 14:04:06 +02:00
0ecc6030c6 fixed fram sync issue. mainly due to zmq msg being cleaned up before sending it 2025-05-05 14:03:00 +02:00
6c604e2340 small fixes, but bug introduced here '40895b0148'
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
2025-05-03 00:11:55 +02:00
0f4d10912b test frame synchonizer now runs for all modules (only jungfrua enableD) with num modules and num frames as arguments (also servers) and checks the output log of pull socket to ensure there are expected number of headers, moduels and series end htypes 2025-05-02 22:48:48 +02:00
af386a736e first draft of frame synchonizer test. also updated tests updated test_simiulator.py 2025-05-02 16:19:34 +02:00
a43f2c946f Merge pull request #1184 from slsdetectorgroup/911/fix_m3_trimbits_badchannels
Some checks failed
CMake / Configure and build using cmake (push) Failing after 11s
911: m3: fix trimbits and badchannels
2025-04-11 10:41:11 +02:00
8d21fd364b Merge pull request #1188 from slsdetectorgroup/911/slsmultireceiver_verbose_size
911: multi receiver: verbose option
2025-04-11 10:37:34 +02:00
9aceb07d80 update the comment about how to modify data on a data call back from the receiver 2025-04-11 10:30:28 +02:00