diff --git a/RELEASE.txt b/RELEASE.txt index a52156245..e5ea07064 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -61,7 +61,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 * Qt5 and in-built compressed Qwt 6.1.5 - Ported from Qt4 to Qt5. + Ported from Qt4 to Qt5. Minimum requirement: Qt 5.9 Compressed Qwt 6.1.5 added into the package in libs. It is unpacked and built as a static library.This allows us to remove qwt as an external dependency and reduces the risk of picking up the wrong version. @@ -167,6 +167,10 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 debug->detSpec3 roundRnumber->detSpec4 + Header version number stays the same in the UDP header as there is no + difference in the format from the detector. Only the structure memeber names + have changed in sls_detector_defs.h + Further details about each detector specific field can be found at: https://slsdetectorgroup.github.io/devdoc/udpdetspec.html @@ -851,19 +855,19 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 Eiger 17.02.2022 (v30) - Jungfrau 21.04.2022?? (v1.4, HW v1.0) - 22.04.2022?? (v2.4, HW v2.0) + Jungfrau 04.11.2022 (v1.4, HW v1.0) + 03.11.2022 (v2.4, HW v2.0) - Mythen3 24.08.2022 (v1.1+??) + Mythen3 05.12.2022 (v1.4) - Gotthard2 01.09.2022 (v0.1+??) + Gotthard2 23.11.2022 (v0.3) Gotthard 08.02.2018 (50um and 25um Master) 09.02.2018 (25 um Slave) Moench 05.12.2022 (v0.3) - Ctb 05.12.2022 (v1.0) + Ctb 05.12.2022 (v1.1) Detector Upgrade @@ -980,6 +984,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2 TroubleShooting: https://slsdetectorgroup.github.io/devdoc/troubleshooting.html + https://slsdetectorgroup.github.io/devdoc/troubleshooting.html#receiver-pc-tuning-options Further Documentation: https://www.psi.ch/en/detectors/documentation diff --git a/docs/src/dependencies.rst b/docs/src/dependencies.rst index 03a192f3f..7940809fc 100644 --- a/docs/src/dependencies.rst +++ b/docs/src/dependencies.rst @@ -21,10 +21,8 @@ the shared libraries these are needed: GUI ----------------------- -The GUI is currently using Qt4 but watch out for an upgrade to 5. - - * Qt 4.8 - * Qwt 6.1 + * Qt 5.9 + * Qwt 6.1.5 (packaged in libs/) ----------------------- Python bindings diff --git a/docs/src/firmware.rst b/docs/src/firmware.rst index 1570fbe31..c417478aa 100644 --- a/docs/src/firmware.rst +++ b/docs/src/firmware.rst @@ -92,19 +92,30 @@ Download Upgrade ^^^^^^^^ -.. note :: +.. warning :: + + In case you have had issues in the past with programming via software: + + * 6.1.2 server has a fix for seamless fpga programming + + * We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'. + + * Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release. - These instructions are for upgrades from v5.0.0. For earlier versions, contact us. Check :ref:`firmware troubleshooting ` if you run into issues while programming firmware. -Always ensure that the client and server software are of the same release. + Program from console .. code-block:: bash + # These instructions are for upgrades from v5.0.0. For earlier versions, please contact us. + + # Always ensure that the client and server software are of the same release. + # copies server from tftp folder of pc, links new server to jungfrauDetectorServer, # removes old server from respawn, sets up new lnked server to respawn # programs fpga, @@ -155,10 +166,6 @@ Upgrade Mythen III ----------- -.. note :: - - As it is still in development, the rbf files must be picked up from us. - Download ^^^^^^^^^^^^^ @@ -170,11 +177,11 @@ Download Upgrade ^^^^^^^^ -Always ensure that the client and server software are of the same release. - Program from console .. code-block:: bash + # Always ensure that the client and server software are of the same release. + # copies server from tftp folder of pc, links new server to mythen3DetectorServer, # programs fpga, # reboots @@ -199,11 +206,11 @@ Download Upgrade ^^^^^^^^ -Always ensure that the client and server software are of the same release. - Program from console .. code-block:: bash + # Always ensure that the client and server software are of the same release. + # copies server from tftp folder of pc, links new server to gotthard2DetectorServer, # programs fpga, # reboots @@ -230,13 +237,26 @@ Download Upgrade ^^^^^^^^ +.. warning :: + + In case you have had issues in the past with programming via software: + + * 6.1.2 server has a fix for seamless fpga programming + + * We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'. + + * Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release. + + + Check :ref:`firmware troubleshooting ` if you run into issues while programming firmware. -Always ensure that the client and server software are of the same release. Program from console .. code-block:: bash + # Always ensure that the client and server software are of the same release. + # copies server from tftp folder of pc, links new server to moenchDetectorServer, # removes old server from respawn, sets up new lnked server to respawn # programs fpga, @@ -262,11 +282,12 @@ Upgrade Check :ref:`firmware troubleshooting ` if you run into issues while programming firmware. -Always ensure that the client and server software are of the same release. Program from console .. code-block:: bash + # Always ensure that the client and server software are of the same release. + # copies server from tftp folder of pc, links new server to ctbDetectorServer, # removes old server from respawn, sets up new lnked server to respawn # programs fpga, diff --git a/docs/src/installation.rst b/docs/src/installation.rst index 3d3e521f7..837f12e9f 100644 --- a/docs/src/installation.rst +++ b/docs/src/installation.rst @@ -71,12 +71,12 @@ Build from source git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 6.1.1 -| **Pybind** +| **Pybind for Python** | v7.0.0+: | pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update". | | Older versions: -| pybind11 is a submodule> Must be cloned using "recursive" and updated when switching between versions using the following commands. +| pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands. .. code-block:: bash @@ -139,8 +139,8 @@ Example cmake options Comment -Build using in-build cmk.sh script -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Build using in-built cmk.sh script +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash @@ -185,6 +185,7 @@ Build using in-build cmk.sh script ./cmk.sh -bj5 -q /usr/lib64 + Build on old distributions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -204,8 +205,9 @@ using this compiler make -j12 + Build this documentation -------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^ The documentation for the slsDetectorPackage is build using a combination of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies @@ -213,11 +215,15 @@ is to use conda .. code-block:: bash - conda create -n myenv python sphinx sphinx_rtd_theme + conda create -n myenv python sphinx_rtd_theme breathe -Then enable the option SLS_BUILD_DOCS to create the targets .. code-block:: bash + # using cmake or ccmake to enable DSLS_BUILD_DOCS + # outside slsDetecorPackage folder + mkdir build && cd build + cmake ../slsDetectorPackage -DSLS_BUILD_DOCS=ON + make docs # generate API docs and build Sphinx RST make rst # rst only, saves time in case the API did not change diff --git a/docs/src/pyexamples.rst b/docs/src/pyexamples.rst index f432541da..9521b32c0 100755 --- a/docs/src/pyexamples.rst +++ b/docs/src/pyexamples.rst @@ -10,27 +10,46 @@ open an issue in our our `github repo Setting exposure time ------------------------------------ -Setting and reading back exposure time can be done either using a Python datetime.timedelta -or by setting the time in seconds. +Setting and reading back exposure time can be done either using a Python +datetime.timedelta, DurationWrapper or by setting the time in seconds. :: # Set exposure time to 1.2 seconds >>> d.exptime = 1.2 + >>> d.exptime = 5e-07 - # Setting exposure time using timedelta + # Setting exposure time using timedelta (upto microseconds precision) import datetime as dt >>> d.exptime = dt.timedelta(seconds = 1.2) + >>> d.exptime = dt.timedelta(seconds = 1, microseconds = 3) # With timedelta any arbitrary combination of units can be used >>> t = dt.timedelta(microseconds = 100, seconds = 5.3, minutes = .3) + # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.exptime = DurationWrapper(1.2) + + # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.exptime = t + # To set exposure time for individual detector one have to resort # to the C++ style API. # Sets exposure time to 1.2 seconds for module 0, 6 and 12 >>> d.setExptime(1.2, [0, 6, 12]) >>> d.setExptime(dt.timedelta(seconds = 1.2), [0, 6, 12]) + # to get in seconds + >>> d.period + 181.23 + + # to get in DurationWrapper + >>> d.getExptime() + [sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)] + ------------------------------------ @@ -220,8 +239,7 @@ Setting and getting times # This sets the exposure time for all modules d.exptime = 0.5 - # exptime also accepts a python datetime.timedelta - # which can be used to set the time in almost any unit + # exptime also accepts a python datetime.timedelta (upto microseconds resolution) t = dt.timedelta(milliseconds = 2.3) d.exptime = t @@ -229,16 +247,25 @@ Setting and getting times t = dt.timedelta(minutes = 3, seconds = 1.23) d.exptime = t + # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.exptime = DurationWrapper(1.2) + + # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.exptime = t + # exptime however always returns the time in seconds >>> d.exptime 181.23 # To get back the exposure time for each module # it's possible to use getExptime, this also returns - # the values as datetime.timedelta + # the values as DurationWrapper >>> d.getExptime() - [datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)] + [sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)] # In case the values are the same it's possible to use the # element_if_equal function to reduce the values to a single @@ -246,7 +273,8 @@ Setting and getting times >>> t = d.getExptime() >>> element_if_equal(t) - datetime.timedelta(seconds=1) + sls::DurationWrapper(total_seconds: 1.2 count: 1200000000) + -------------- Reading dacs diff --git a/docs/src/pygettingstarted.rst b/docs/src/pygettingstarted.rst index 20ae20276..5caf8723e 100644 --- a/docs/src/pygettingstarted.rst +++ b/docs/src/pygettingstarted.rst @@ -6,7 +6,7 @@ Getting Started Which Python? -------------------- -We require at lest Python 3.6 and strongly recommended that you don't use the system +We require at least Python 3.6 and strongly recommended that you don't use the system Python installation. The examples in this documentation uses `conda `_ since it provides good support also for non Python packages but there are also other alternatives like, pyenv. @@ -14,29 +14,35 @@ also for non Python packages but there are also other alternatives like, pyenv. Using something like conda also allows you to quickly switch beteen different Python environments. +--------------------- +Building from Source +--------------------- + +If you are not installing slsdet binaries from conda, but instead building from +source, please refer to :ref:`the installation section` for details. + +Don't forget to compile with the option SLS_USE_PYTHON=ON to enable the Python +bindings or if you use the cmk.sh script -p. + .. note :: - Ensure that the python lib compiled is for the expected python version. + Ensure that the sls det python lib compiled is for the expected python version. For example, build/bin/_slsdet.cpython-39-x86_64-linux-gnu.so for Python v3.9.x + --------------------- PYTHONPATH --------------------- -If you install slsdet using conda everything is set up and you can +If you install slsdet binaries using conda everything is set up and you can directly start using the Python bindings. However, if you build -from source you need to tell Python where to find slsdet. This -is be done by adding your build/bin directory to PYTHONPATH. +from source you need to tell Python where to find slsdet to use it. This +can be done by adding your build/bin directory to PYTHONPATH. .. code-block:: bash export PYTHONPATH = /path/to/your/build/bin:$PYTHONPATH -.. note :: - - Don't forget to compile with the option SLS_USE_PYTHON=ON to enable - the Python bindings or if you use the cmk.sh script -p. - -------------------------------------- Which detector class should I use? -------------------------------------- @@ -147,9 +153,11 @@ their name. :: >>> [item for item in dir(d) if 'time' in item] - ['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft', - 'getSubExptime', 'patwaittime0', 'patwaittime1', 'patwaittime2', - 'setExptime', 'setSubExptime', 'subdeadtime', 'subexptime'] + ['compdisabletime', 'exptime', 'exptimel', 'frametime', 'getExptime', + 'getExptimeForAllGates', 'getExptimeLeft', 'getSubExptime', 'patwaittime', + 'patwaittime0', 'patwaittime1', 'patwaittime2', 'runtime', 'setExptime', + 'setSubExptime', 'subdeadtime', 'subexptime'] + The above method works on any Python object but for convenience we also included two functions to find names. View prints the names one per line @@ -161,6 +169,7 @@ while find returns a list of names. >>> view('exptime') exptime + exptimel getExptime getExptimeForAllGates getExptimeLeft @@ -169,6 +178,7 @@ while find returns a list of names. setSubExptime subexptime + >>> find('exptime') ['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft', 'getSubExptime', 'setExptime', 'setSubExptime', 'subexptime'] @@ -186,19 +196,39 @@ To access the documentation of a function directly from the Python prompt use he Help on property: Period between frames, accepts either a value in seconds or datetime.timedelta - + Note ----- - :getter: always returns in seconds. To get in datetime.delta, use getPeriod - - Examples + :getter: always returns in seconds. To get in DurationWrapper, use getPeriod + + Example ----------- + >>> # setting directly in seconds >>> d.period = 1.05 - >>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23) + >>> + >>> # setting directly in seconds + >>> d.period = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.period = timedelta(seconds = 1, microseconds = 3) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.period = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.period = t + >>> + >>> # to get in seconds >>> d.period 181.23 - >>> d.getPeriod() - [datetime.timedelta(seconds=181, microseconds=230000)] + >>> + >>> d.getExptime() + [sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)] + ---------------------- @@ -218,11 +248,12 @@ The enums can be found in slsdet.enums import slsdet >>> [e for e in dir(slsdet.enums) if not e.startswith('_')] - ['burstMode', 'clockIndex', 'dacIndex', - 'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag', - 'fileFormat', 'frameDiscardPolicy', - 'readoutMode', 'runStatus', 'speedLevel', 'timingMode', - 'timingSourceType'] + ['M3_GainCaps', 'burstMode', 'clockIndex', 'cls', 'dacIndex', 'detectorSettings', + 'detectorType', 'dimension', 'externalSignalFlag', 'fileFormat', + 'frameDiscardPolicy', 'gainMode', 'name', 'polarity', 'portPosition', + 'readoutMode', 'runStatus', 'speedLevel', 'streamingInterface', 'timingMode', + 'timingSourceType', 'vetoAlgorithm'] + # Even though importing using * is not recommended one could # get all the enums like this: diff --git a/docs/src/servers.rst b/docs/src/servers.rst index bcf94c156..4a0faebb9 100644 --- a/docs/src/servers.rst +++ b/docs/src/servers.rst @@ -23,15 +23,19 @@ Arguments .. code-block:: bash Possible arguments are: - -v, --version : Software version - -p, --port : TCP communication port with client. - -g, --nomodule : [Mythen3][Gotthard2] Generic or No Module mode. - Skips detector type checks. - -f, --phaseshift : [Gotthard] only. Sets phase shift. - -d, --devel : Developer mode. Skips firmware checks. - -u, --update : Update mode. Skips firmware checks and initial detector setup. - -s, --stopserver : Stop server. Do not use as it is created by control server - + -v, --version : Software version + -p, --port : TCP communication port with client. + -g, --nomodule : [Mythen3][Gotthard2] + Generic or No Module mode. Skips detector type checks. + -f, --phaseshift : [Gotthard] only. Sets phase shift. + -d, --devel : Developer mode. Skips firmware checks. + -u, --update : Update mode. Skips firmware checks and initial detector setup. + -i, --ignore-config : [Eiger][Jungfrau][Gotthard][Gotthard2][Moench] + Ignore config file. + -m, --master : [Eiger][Mythen3][Gotthard][Gotthard2] + Set Master to 0 or 1. Precedence over config file. Only for virtual servers except Eiger. + -t, --top : [Eiger] Set Top to 0 or 1. Precedence over config file. + -s, --stopserver : Stop server. Do not use as it is created by control server .. _Automatic start servers: @@ -88,6 +92,8 @@ One can start the on-board detector server automatically upon powering on the bo .. code-block:: bash sync + + # physically reboot for Gotthard II or Mythen III reboot # verify diff --git a/docs/src/slsreceiver.rst b/docs/src/slsreceiver.rst index db2c77e06..0b87e8b22 100644 --- a/docs/src/slsreceiver.rst +++ b/docs/src/slsreceiver.rst @@ -89,13 +89,18 @@ Client Commands File format -------------- -* The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default. +Master file is in json format. -* Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command. +The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default. -* Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type. -* Some file name examples: +Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command. + + +Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type. + + +Some file name examples: .. code-block:: bash @@ -108,17 +113,21 @@ File format # second acquisition, first file path-to-file/run_d0_f0_1.raw -* Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition. -* SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received. +Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition. + + +SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received. **Binary file format** -* This is the default file format. +This is the default file format. -* Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame. -* Master file is of ASCII format and will also include the format of the slsReceiver Header. +Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame. + + +Master file is of ASCII format and will also include the format of the slsReceiver Header. **HDF5 file formats** diff --git a/docs/src/udpconfig.rst b/docs/src/udpconfig.rst index 457d1f381..f3e56d82a 100644 --- a/docs/src/udpconfig.rst +++ b/docs/src/udpconfig.rst @@ -6,6 +6,10 @@ Config file Commands to configure the UDP in the config file: +.. note :: + + These command are recommended to be placed before "rx_hostname" if it is used. + Source Port ----------- Hardcoded in detector server, starting at 32410. diff --git a/docs/src/udpdetspec.rst b/docs/src/udpdetspec.rst index cf9dd398e..afeeeb564 100644 --- a/docs/src/udpdetspec.rst +++ b/docs/src/udpdetspec.rst @@ -110,7 +110,7 @@ Jungfrau | | | | last exposure. | | | +-----+----------------------------------------+ | | | 0 | External input flag not detected in the| - | | | | last exposure. | + | | | | last exposure. | +----------+--------------------+-----+----------------------------------------+ diff --git a/docs/src/udpheader.rst b/docs/src/udpheader.rst index 6bedffc91..8b3999e70 100644 --- a/docs/src/udpheader.rst +++ b/docs/src/udpheader.rst @@ -9,7 +9,7 @@ The UDP data format for the packets consist of a common header for all detectors Current Version --------------------------- -**v3.0 (slsDetectorPackage v7.0.0+)** +**v2.0 (slsDetectorPackage v7.0.0+)** .. table:: <---------------------------------------------------- 8 bytes ----------------------------------------------------> :align: center @@ -30,6 +30,18 @@ Current Version +-------------------------------+---------------+-------+-------+ +.. note :: + + Since there is no difference in the format of the UDP header from the detector + from the previous version (v2.0), the version number stays the same. + + Only the struture member names have changed in sls_detector_defs.h + + + +Description +------------ + * **Detector specific field** descriptions are found :ref:`here`. * **frameNumber**: framenumber to which the current packet belongs to. @@ -48,6 +60,12 @@ Current Version * **detType**: detector type from enum of detectorType in the package. +* **version**: current version of the detector header (0x2). + + +Detector Enum +-------------- + ================ ======== Detector Type Value ================ ======== @@ -61,7 +79,6 @@ Current Version GOTTHARD2 7 ================ ======== -* **version**: current version of the detector header. It is at 0x3. Previous Versions diff --git a/docs/src/virtualserver.rst b/docs/src/virtualserver.rst index 66d66ab74..7a030347a 100644 --- a/docs/src/virtualserver.rst +++ b/docs/src/virtualserver.rst @@ -13,16 +13,14 @@ Compilation * Using cmk.sh script, .. code-block:: bash - ./cmk.sh -bsj9 #option s is for simulator + ./cmk.sh -bsj9 # option -s is for simulator Binaries ^^^^^^^^ .. code-block:: bash - eigerDetectorServerMaster_virtual - eigerDetectorServerSlaveTop_virtual - eigerDetectorServerSlaveBottom_virtual + eigerDetectorServer_virtual jungfrauDetectorServer_virtual gotthardDetectorServer_virtual gotthard2DetectorServer_virtual @@ -67,7 +65,15 @@ Sample Config file ^^^^^^^^^^^^^^^^^^ There are sample config files for each detector in slsDetectorPackage/examples folder. -For a Single Module +For a Single Module (Basic) + .. code-block:: bash + + hostname localhost + rx_hostname localhost + udp_dstip auto + + +For a Single Module (With Options) .. code-block:: bash # connects to control port 1912 @@ -140,7 +146,7 @@ Gui Limitations ----------- -#. Data coming out of virtual server is fake. Value at each pixel/ channel is incremented by 1. +#. Data coming out of virtual server is fake. #. A stop will stop the virtual acquisition only at the start of every new frame. diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index 4c6da434c..42346a8bc 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -472,6 +472,9 @@ class Detector(CppDetectorApi): ----------- >>> # setting directly in seconds >>> d.exptime = 1.05 + >>> + >>> # setting directly in seconds + >>> d.exptime = 5e-07 >>> >>> # using timedelta (up to microseconds precision) >>> from datatime import timedelta @@ -519,16 +522,35 @@ class Detector(CppDetectorApi): Note ----- - :getter: always returns in seconds. To get in datetime.delta, use getPeriod + :getter: always returns in seconds. To get in DurationWrapper, use getPeriod Example ----------- + >>> # setting directly in seconds >>> d.period = 1.05 - >>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23) + >>> + >>> # setting directly in seconds + >>> d.period = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.period = timedelta(seconds = 1, microseconds = 3) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.period = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.period = t + >>> + >>> # to get in seconds >>> d.period 181.23 - >>> d.getPeriod() - [datetime.timedelta(seconds=181, microseconds=230000)] + >>> + >>> d.getExptime() + sls::DurationWrapper(total_seconds: 181.23 count: 181230000000) """ res = self.getPeriod() return reduce_time(res) @@ -548,7 +570,7 @@ class Detector(CppDetectorApi): ----- [Gotthard2] only in continuous mode. - :getter: always returns in seconds. To get in datetime.delta, use getPeriodLeft + :getter: always returns in seconds. To get in DurationWrapper, use getPeriodLeft :setter: Not Implemented Example @@ -556,7 +578,7 @@ class Detector(CppDetectorApi): >>> d.periodl 181.23 >>> d.getPeriodLeft() - [datetime.timedelta(seconds=181, microseconds=230000)] + [sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)] """ return self.getPeriodLeft() @@ -564,21 +586,40 @@ class Detector(CppDetectorApi): @element def delay(self): """ - [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds or datetime.timedelta + [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta Note ----- - :getter: always returns in seconds. To get in datetime.delta, use getDelayAfterTrigger + :getter: always returns in seconds. To get in DurationWrapper, use getDelayAfterTrigger Example ----------- + >>> # setting directly in seconds >>> d.delay = 1.05 - >>> d.delay = datetime.timedelta(minutes = 3, seconds = 1.23) + >>> + >>> # setting directly in seconds + >>> d.delay = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.delay = timedelta(seconds = 1, microseconds = 3) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.delay = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.delay = t + >>> + >>> # to get in seconds >>> d.delay 181.23 + >>> >>> d.getDelayAfterTrigger() - [datetime.timedelta(seconds=181, microseconds=230000)] + sls::DurationWrapper(total_seconds: 181.23 count: 181230000000) """ return ut.reduce_time(self.getDelayAfterTrigger()) @@ -590,13 +631,13 @@ class Detector(CppDetectorApi): @element def delayl(self): """ - [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds or datetime.timedelta + [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper Note ----- [Gotthard2] only in continuous mdoe. - :getter: always returns in seconds. To get in datetime.delta, use getDelayAfterTriggerLeft + :getter: always returns in seconds. To get in DurationWrapper, use getDelayAfterTriggerLeft :setter: Not Implemented Example @@ -604,7 +645,7 @@ class Detector(CppDetectorApi): >>> d.delayl 181.23 >>> d.getDelayAfterTriggerLeft() - [datetime.timedelta(seconds=181, microseconds=230000)] + [sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)] """ return ut.reduce_time(self.getDelayAfterTriggerLeft()) @@ -2041,16 +2082,35 @@ class Detector(CppDetectorApi): ---- Subperiod = subexptime + subdeadtime. - :getter: always returns in seconds. To get in datetime.delta, use getSubExptime + :getter: always returns in seconds. To get in DurationWrapper, use getSubExptime Example ----------- + >>> # setting directly in seconds >>> d.subexptime = 1.230203 - >>> d.subexptime = datetime.timedelta(seconds = 1.23, microseconds = 203) + >>> + >>> # setting directly in seconds + >>> d.subexptime = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.subexptime = timedelta(seconds = 1.23, microseconds = 203) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.subexptime = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.subexptime = t + >>> + >>> # to get in seconds >>> d.subexptime - 1.230203 + 181.23 + >>> >>> d.getSubExptime() - [datetime.timedelta(seconds = 1, microseconds = 203)] + sls::DurationWrapper(total_seconds: 181.23 count: 181230000000) """ res = self.getSubExptime() return reduce_time(res) @@ -2082,22 +2142,41 @@ class Detector(CppDetectorApi): @property def subdeadtime(self): """ - [Eiger] Dead time of EIGER subframes in 32 bit mode, accepts either a value in seconds or datetime.timedelta + [Eiger] Dead time of EIGER subframes in 32 bit mode, accepts either a value in seconds, datetime.timedelta or DurationWrapper Note ---- Subperiod = subexptime + subdeadtime. - :getter: always returns in seconds. To get in datetime.delta, use getSubDeadTime + :getter: always returns in seconds. To get in DurationWrapper, use getSubDeadTime Example ----------- + >>> # setting directly in seconds >>> d.subdeadtime = 1.230203 - >>> d.subdeadtime = datetime.timedelta(seconds = 1.23, microseconds = 203) + >>> + >>> # setting directly in seconds + >>> d.subdeadtime = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.subdeadtime = timedelta(seconds = 1.23, microseconds = 203) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.subdeadtime = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.subdeadtime = t + >>> + >>> # to get in seconds >>> d.subdeadtime - 1.230203 + 181.23 + >>> >>> d.getSubDeadTime() - [datetime.timedelta(seconds = 1, microseconds = 203)] + sls::DurationWrapper(total_seconds: 181.23 count: 181230000000) """ res = self.getSubDeadTime() return reduce_time(res) @@ -2273,16 +2352,35 @@ class Detector(CppDetectorApi): ----- It is only possible for chipv1.1. - :getter: always returns in seconds. To get in datetime.delta, use getComparatorDisableTime + :getter: always returns in seconds. To get in DurationWrapper, use getComparatorDisableTime Example ----------- + >>> # setting directly in seconds >>> d.compdisabletime = 1.05 - >>> d.compdisabletime = datetime.timedelta(minutes = 3, seconds = 1.23) + >>> + >>> # setting directly in seconds + >>> d.compdisabletime = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.compdisabletime = timedelta(seconds = 1, microseconds = 3) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.compdisabletime = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.compdisabletime = t + >>> + >>> # to get in seconds >>> d.compdisabletime 181.23 + >>> >>> d.getComparatorDisableTime() - [datetime.timedelta(seconds=181, microseconds=230000)] + sls::DurationWrapper(total_seconds: 181.23 count: 181230000000) """ return ut.reduce_time(self.getComparatorDisableTime()) @@ -2340,23 +2438,42 @@ class Detector(CppDetectorApi): @property def storagecell_delay(self): """ - [Jungfrau] Additional time delay between 2 consecutive exposures in burst mode, accepts either a value in seconds or datetime.timedelta + [Jungfrau] Additional time delay between 2 consecutive exposures in burst mode, accepts either a value in seconds, datetime.timedelta or DurationWrapper Note ----- Only applicable for chipv1.0. For advanced users only \n Value: 0-1638375 ns (resolution of 25ns) - :getter: always returns in seconds. To get in datetime.delta, use getStorageCellDelay + :getter: always returns in seconds. To get in DurationWrapper, use getStorageCellDelay Example ----------- - >>> d.storagecell_delay = 0.00056 - >>> d.storagecell_delay = datetime.timedelta(microseconds = 45) + >>> # setting directly in seconds + >>> d.storagecell_delay = 1.05 + >>> + >>> # setting directly in seconds + >>> d.storagecell_delay = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.storagecell_delay = timedelta(seconds = 1, microseconds = 3) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.storagecell_delay = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.storagecell_delay = t + >>> + >>> # to get in seconds >>> d.storagecell_delay - 4.5e-05 + 181.23 + >>> >>> d.getStorageCellDelay() - [datetime.timedelta(microseconds=45)] + sls::DurationWrapper(total_seconds: 181.23 count: 181230000000) """ return ut.reduce_time(self.getStorageCellDelay()) @@ -2630,18 +2747,36 @@ class Detector(CppDetectorApi): Note ----- - :getter: always returns in seconds. To get in datetime.delta, use getBurstPeriod + :getter: always returns in seconds. To get in DurationWrapper, use getBurstPeriod :setter: Not Implemented Example ----------- + >>> # setting directly in seconds >>> d.burstperiod = 1.05 - >>> d.burstperiod = datetime.timedelta(minutes = 3, seconds = 1.23) + >>> + >>> # setting directly in seconds + >>> d.burstperiod = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.burstperiod = timedelta(seconds = 1, microseconds = 3) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.burstperiod = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.burstperiod = t + >>> + >>> # to get in seconds >>> d.burstperiod 181.23 + >>> >>> d.getBurstPeriod() - [datetime.timedelta(seconds=181, microseconds=230000)] - + sls::DurationWrapper(total_seconds: 181.23 count: 181230000000) """ return ut.reduce_time(self.getBurstPeriod()) @@ -2766,25 +2901,41 @@ class Detector(CppDetectorApi): @property def gatedelay(self): """ - [Mythen3] Gate Delay of all gate signals in auto and trigger mode (internal gating), accepts either a value in seconds or datetime.timedelta + [Mythen3] Gate Delay of all gate signals in auto and trigger mode (internal gating), accepts either a value in seconds, datetime.timedelta or DurationWrapper Note ----- To specify gateIndex, use getGateDelay or setGateDelay. - :getter: always returns in seconds. To get in datetime.delta, use getGateDelayForAllGates or getGateDelay(gateIndex) + :getter: always returns in seconds. To get in DurationWrapper, use getGateDelayForAllGates or getGateDelay(gateIndex) Example ----------- + >>> # setting directly in seconds >>> d.gatedelay = 1.05 - >>> d.gatedelay = datetime.timedelta(minutes = 3, seconds = 1.23) + >>> + >>> # setting directly in seconds + >>> d.gatedelay = 5e-07 + >>> + >>> # using timedelta (up to microseconds precision) + >>> from datatime import timedelta + >>> d.gatedelay = timedelta(seconds = 1, microseconds = 3) + >>> + >>> # using DurationWrapper to set in seconds + >>> from slsdet import DurationWrapper + >>> d.gatedelay = DurationWrapper(1.2) + >>> + >>> # using DurationWrapper to set in ns + >>> t = DurationWrapper() + >>> t.set_count(500) + >>> d.gatedelay = t + >>> + >>> # to get in seconds >>> d.gatedelay 181.23 - >>> d.setGateDelay(1, datetime.timedelta(seconds = 2)) - >>> d.gatedelay - >>> [1.0, 2.0, 1.0] + >>> >>> d.getExptimeForAllGates() - >>> [[datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)]] + sls::DurationWrapper(total_seconds: 181.23 count: 181230000000) """ return reduce_time(self.getGateDelayForAllGates()) @@ -3588,7 +3739,7 @@ class Detector(CppDetectorApi): Note ----- - :getter: always returns in seconds. To get in datetime.delta, use getExptimeLeft + :getter: always returns in seconds. To get in DurationWrapper, use getExptimeLeft :setter: Not Implemented Example @@ -3596,7 +3747,7 @@ class Detector(CppDetectorApi): >>> d.exptimel 181.23 >>> d.getExptimeLeft() - [datetime.timedelta(seconds=181, microseconds=230000)] + [sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)] """ t = self.getExptimeLeft() return reduce_time(t) diff --git a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer index 2487d28ca..9732f7a7c 100755 Binary files a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer and b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer differ diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer index 95405978b..e1f31a4b0 100755 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer differ diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h index d54c39643..6c3dd1f0b 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h @@ -3,7 +3,7 @@ #pragma once #include "sls/sls_detector_defs.h" -#define REQRD_FRMWRE_VRSN (0x220901) +#define REQRD_FRMWRE_VRSN (0x221123) #define KERNEL_DATE_VRSN "Mon May 10 18:00:21 CEST 2021" #define ID_FILE "detid_gotthard2.txt" diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer index c13b4282c..f09b20ac5 100755 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer and b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer differ diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer index 6bcf2bfea..0558d2ad3 100755 Binary files a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer and b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer differ diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h index 955b49eb7..d54926855 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorServer_defs.h @@ -5,8 +5,8 @@ #include "sls/sls_detector_defs.h" #define MIN_REQRD_VRSN_T_RD_API 0x171220 -#define REQRD_FRMWRE_VRSN_BOARD2 0x220421 // 1.0 pcb (version = 010) -#define REQRD_FRMWRE_VRSN 0x220422 // 2.0 pcb (version = 011) +#define REQRD_FRMWRE_VRSN_BOARD2 0x221104 // 1.0 pcb (version = 010) +#define REQRD_FRMWRE_VRSN 0x221103 // 2.0 pcb (version = 011) #define NUM_HARDWARE_VERSIONS (2) #define HARDWARE_VERSION_NUMBERS \ diff --git a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer index d027da86e..0823f41b2 100755 Binary files a/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer and b/slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index fb99a7555..32faad332 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h index f908a9494..51ae59c2d 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h @@ -3,7 +3,7 @@ #pragma once #include "sls/sls_detector_defs.h" -#define REQRD_FRMWRE_VRSN (0x220824) +#define REQRD_FRMWRE_VRSN (0x221205) #define KERNEL_DATE_VRSN "Mon May 10 18:00:21 CEST 2021" #define ID_FILE "detid_mythen3.txt"