* fixing nextframenumber properly with firmware
* updated firmware to have getnextframenumber and fixed setnextframenumber to reset also the header fifo when stopping
* fix tests for gotthard2
* get/set next frame number in G2 (firmware only has set, no get)
* firmware has issues: each stop keeps 2 frame header in fifo and the resetting frame number happens after that
* removed the option to set burstmode to burst external or continuwous internal
* needs to be revisited before 9.0.0
* added readoutspeed command to m3 (fullspeed - 10, half speed - 20, quarter speed - 40), removed reaodut pll, moved up system pll clock indices, leaving pll index in common altera code, default speed is half speed, allow only system_c0 to be set, the others can be obtained, same for clkphase, maxclkphaseshift, clkfreq. added to readoutspeedlist commands, updated help and updated tests
* updated readoutspeedlist command
- do not validate write reg, setbit and clearbit by default anymore
- --validate will force validation on the bitmask or entire reg
- remove return value for write reg (across server to client, but thankfully not in the Detector class)
- extend validation into writereg, setbit and clearbit for Eiger (always special)
- need to check python (TODO)
- missed the rx_zmqip implementations in detector.h and python bindings
* changed rxr callback signatures to all include structs
* removed datamodify call back as size can be changed in the original data call back now
* bringing some parameters (set functions) to dataProcessor class for its callback (namely udpport, quad, fliprows, totalframes, jsonheader), resulting in also removing totalframes from 2 other function signatures
* updated MultiReceiverApp to reflect the new callback signatures
* put back code to obtain adc and dac device indexafter loading device tree and then create folder iio_device_links and create symbolic links there according to device indices found. ln -sf operation not permitted, so folder has to be deleted and created everytime. Also refactored definitions to have all the xilinx name or detector specific stuff out of programbyArm.c
* uncommented waittransceiverreset at startup (should work now) and return of powering off chip at startup (error for transceiver alignment reset)
* updated registerdefs from firmware
* minor prints and updating names from registerdefs
* waittransceiverreset has been fixed in firmware and removing warnign for that, transceiver alignment check for powering off chip is not done in fw (giving a warning and returning ok for now)
* fixing ipchecksum (not done), removed startperiphery, allowing readout command to be allowed for xilinx when acquiring
* added empty c extension
* added rotation to the decoding
* added color map, options and findex
* minor
* move checks to before acquisition
* added pixel map based decoder
* cleanup
* no thread creation for single thread processing
* added rotation and test to compare
* allow high and low water mark for zmq (also buffer size) for fast readouts
* removed roatation during decoding
* added Transpose to image and invert Y False to invert it
* retains the zoomed state after the first image of gui, catch and display exception if no detector connected
* moved start frame to dockable widget, removed extra frame number label, moved current measurement also to dockable widget, hide frame plot entirely when showing patternviewer
* first image dependin on which plot
* remember settings of main window size and position, dockewidget if docked, its size and posisiotn as well, then update it next time the gui is opened
* change in comment
* using c decoder for moench 04 and matterhorn
* catch exception from invalid image from decoder
* clean up
* update row and col when choosing image type, neeeded to show values
* fix for previous PR
* disable resetting colormap values
keep the range selected for every new acquisition
* fix typos + tested on virtual matterhorn
* minor print
* refactored Slow ADCs Tab
* refactored DAC tab
* refactored power supplies
* refactored signals tab
* refactored transceiver tab
* fix typo
* fix typo2
* remove commented code
* delete commented code
* delete commented code
* delete commented signals code
* remove commented code for transceiver tab
* refactor adc tab
* refactor Pattern Tab
* Refactor transceivers tab (PR#5) (#118)
* refactored transceiver tab
* remove commented code for transceiver tab
---------
Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
* refactor adc tab (PR#6) (#119)
* refactor adc tab
* refactored Plot and Acquisition Tabs
* fix the regression issue
* restructure project files
* applying singleton and renaming tabs to services
* working install using pip
* applies singleton to tab classes and remove CI erros
* added pyzmq and pillow
* remove the singleton implementation and keep changes
* fix merge errors in mainWindow
* moved misplaced init file
* rename service to tab
* reorganize imports
* iterate over tabs
* reorder tabs
* add slowadc to the list
* saving changes (buggy)
power supply ui not showing in the gui
* split power supply tab
* fixed tests
* add hardcoded values to defines file
* fix error
* separate power supply
* fix errors for powerSuppliesTab
* split dacs
* split slow adcs
* split signals tab
* added tests for bit_utils
* add slowAdc class to defines
* split transceiver ui file
* split adc.ui
* split pattern ui file
* split plot and acquisition ui file
* added basic test for parsing bit names
* removed redundant code in read_alias_file
* fix dacs ui position
* testing for correct exception
* cmd and args at split
* group radio buttons
* fix comments from PR#1
* show legend
* added python version and dev requirements to setup.py
* fix dac issue
* moved _decoder into pkg
* added inplace build
* removed clear
* fixed dependencies
* make tests run without slsdet
* updated name of action
* define colcount
* fixed loading of alias file
* add yapf and ruff
* apply formatting
* fix E and F rules
* add more ruff rules
* change variable name
* squashing gh debugging commits and add pre-commit
* update label values to mv units
* add hook for yapf
* reconfigure yapf precommit hook
* add format and check_format to makefile
* change gh actions
* update readme
* added check_format
* WIP
* added linting in github action
* updated readme]
* add more control for color choice
* remove useless file
* fix un-updated line after refactoring Defines
BIT0_31_MASK is not found in Defines.signals
* visually improve the interface
* fix last commit
* add only selected plots for legend
* add hide legend button
* change hide legend to show legend
checkbox show legend is checked by default
* add support for saving in numpy
* solve conversations
* fix acq index offset
* fix browse button in pattern error
* fix other browse button errors
* finish tests and add usage.md
* remove buffer
* add file,numpy-like interface and tests
* remove useless .npy files
* subscriptible npz files
* remove useless files
* remove repetetive tests
* save changes
* add mode r+, add with support,remove logging
* remove offset of acqIndex between raw and numpy saving
* fix only saving last frame
* save signals of multiple devices
* add comments and move condition for clearer code
* fix bug when vieweing pattern file
* iterate over enabled and plotted plots
* add padestal substraction to transceiver and analog data
* init pedestal frames to detector.frames
* restore old exception
* add pedestal substraction for digital signals
* remove frames spinbox from plotTab
* remove comments and use str instead of Path
* avoid saving all frames
* correct exception and log error's trace
* add gui tests
* add waveform test
* add pedestal test
* refactor by using fixtures
* add tests for moench analog and pattern
* add pytest-qt to dependencies
* add save and load gui parameters
* remove nohup file
* fix old bug IndexError
* save plot type
* a
* handle canceling load, loading matterhorn pedestal for moench
* remove comparing .png files for pattern test
* save plot type
* red error on status bar when shape mismatch for loaded pedestal
* fix makefile and docstrings
* fix PRs conversation
* move code into different function
* fix wrong function names for power supply
* removed old ctbgui
* removed unnecessary files
---------
Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
Co-authored-by: Braham Bechir <braham_b@pc11979.psi.ch>
Co-authored-by: Bechir <bechir.braham@psi.ch>
Co-authored-by: Bechir <bechir.brahem420@gmail.com>
* m3: fixed stop server not starting up with setup variables
* all servers except eiger fixed for virtual stop server to start up with setupDetector function called
* virtual tests work
* eiger: versions print neednt be in stop server
* jungfrau: stop server (not virtual) also needs to read config file
* ensuring master is setup for virtual and real servers
* enable ipv6 in zmq socket
* removed rx_zmqip API and field in gui, changed client updaterxrzip to updateclientzmqip to have the rx_hostname ip if 0.
* updated command line for rx_zmqip to give a warning.
* Replaced 'depreciated' to 'deprecated' everywhere
* switching from * to 0.0.0.0 works for rebinding zmq sockets
* fixed help in command line for rx_zmqip * to 0.0.0.0 and removed cmd in python
* remove publisher zmq socket ip also for moench post processing
* fixed tests
* publisher zmq ip macros to be reused
* voltage regulators only looks at dac and not at ctrl_reg
* xilinx: change dac max to 2048, setting dac ist not inverse conversion from dac to voltage anymore, but setting power is inverse, also there is max and min to power, a different min for vio and this is checked at funcs interface, not printign or converting to mv in dac for power regulators (as its conversion max and min are different)
* Use links for dacs/adc and adapt power rglt thresholds
* Remove wait for transceiver reset
* adc and dac device not used anymore and hence removed
* udp restucturing: arm has to be multiple of 16 and no byteswap in udp_gen, option to compile locally in arm architecture, memsize of the second udp memory has to be limited
---------
Co-authored-by: Martin Brückner <martin.brueckner@psi.ch>
* fix the file path resetting issue of GUI in the case where different modules have different fpath setting.
* fix stack-buffer-overflow issue when using HDF5 HDF5DataFile::parameterDataTypes have 64bit type (i.e. STD_U64LE), the size of fill_value should be at least 8 bytes.
* change the type of fill_value to uint64_t
Co-authored-by: Z.H. Li <zhenghenge@gmail.com>
* moench (feature to wait for post processing to be done in new sls_detector_acquire_zmq executable)
READOUT_ACTION_ZMQ added to action enums
sls_detector_acquire_zmq added to executables
empty data call back so that client listens to last dummy zmq packet from moench post processor
processor: remove NEWZMQ ifdefs and remove connect for zmq publisher socket
* fix to compile
* cmds generated and parsed
* changed common.c readADCFromFile to make it more general and move temperature calculation for Eiger out of this function and inside whereever it is called.
* g2 and m2: gethighvoltage was just a variable set in server, it is now moved to a get inside DAC5671 implementation (but not reading a measured value, instead what is set from a file), high voltage variable used inside DAC5671 for virtual servers
* g2: switching off hv (ifrom non zero to zero value) will wait for 10s; powering on chip reconfigures chip; powering off chip unconfigures chip; powering off chip also includes check if hv = 0, if not throw exception; chip configuration checked before acquring; at start up: hv switched off and chip powered on, so does not wait 10s to switch off hv;
* included test to check powering off chip when hv is on should throw an exception
* g2: check if chip configured before acquiring
* nios: read hv value set from file and virtual still goes into DAC5671 for conversions to and fro dac to V, change common readadc to readparameter to generalize, make sethighvoltage into a get and set to catch errors in get as well, g2: if not at startup, remmeber hv value before setting it and after check if value was being switched off (from a non zero value) and wait 10s if it was (10s wait only for switching off from non zero and not at startup)
* m3: clk 0 changed from 10 to 20 (100MHz to 50MHz)
* g2: startup clk div back to 10 as in firmware but setting in software startup to 20
* m3: minor print error if clk divider > max