mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
docs
This commit is contained in:
parent
ce6c8cddf1
commit
aa3542c1cb
@ -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
|
* 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
|
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
|
as a static library.This allows us to remove qwt as an external dependency
|
||||||
and reduces the risk of picking up the wrong version.
|
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
|
debug->detSpec3
|
||||||
roundRnumber->detSpec4
|
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:
|
Further details about each detector specific field can be found at:
|
||||||
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
|
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
|
||||||
|
|
||||||
|
@ -21,10 +21,8 @@ the shared libraries these are needed:
|
|||||||
GUI
|
GUI
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
The GUI is currently using Qt4 but watch out for an upgrade to 5.
|
* Qt 5.9
|
||||||
|
* Qwt 6.1.5 (packaged in libs/)
|
||||||
* Qt 4.8
|
|
||||||
* Qwt 6.1
|
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
Python bindings
|
Python bindings
|
||||||
|
@ -92,19 +92,30 @@ Download
|
|||||||
Upgrade
|
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 <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin 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
|
Program from console
|
||||||
.. code-block:: bash
|
.. 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,
|
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
|
||||||
# removes old server from respawn, sets up new lnked server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
@ -155,10 +166,6 @@ Upgrade
|
|||||||
Mythen III
|
Mythen III
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
.. note ::
|
|
||||||
|
|
||||||
As it is still in development, the rbf files must be picked up from us.
|
|
||||||
|
|
||||||
Download
|
Download
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
@ -170,11 +177,11 @@ Download
|
|||||||
Upgrade
|
Upgrade
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
|
||||||
|
|
||||||
Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. 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,
|
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
# reboots
|
# reboots
|
||||||
@ -199,11 +206,11 @@ Download
|
|||||||
Upgrade
|
Upgrade
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
|
||||||
|
|
||||||
Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. 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,
|
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
# reboots
|
# reboots
|
||||||
@ -230,13 +237,26 @@ Download
|
|||||||
Upgrade
|
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 <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin 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
|
Program from console
|
||||||
.. code-block:: bash
|
.. 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,
|
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
|
||||||
# removes old server from respawn, sets up new lnked server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
@ -262,11 +282,12 @@ Upgrade
|
|||||||
|
|
||||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin 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
|
Program from console
|
||||||
.. code-block:: bash
|
.. 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,
|
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
|
||||||
# removes old server from respawn, sets up new lnked server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
|
@ -10,27 +10,46 @@ open an issue in our our `github repo
|
|||||||
Setting exposure time
|
Setting exposure time
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
Setting and reading back exposure time can be done either using a Python datetime.timedelta
|
Setting and reading back exposure time can be done either using a Python
|
||||||
or by setting the time in seconds.
|
datetime.timedelta, DurationWrapper or by setting the time in seconds.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
# Set exposure time to 1.2 seconds
|
# Set exposure time to 1.2 seconds
|
||||||
>>> d.exptime = 1.2
|
>>> 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
|
import datetime as dt
|
||||||
>>> d.exptime = dt.timedelta(seconds = 1.2)
|
>>> 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
|
# With timedelta any arbitrary combination of units can be used
|
||||||
>>> t = dt.timedelta(microseconds = 100, seconds = 5.3, minutes = .3)
|
>>> 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 set exposure time for individual detector one have to resort
|
||||||
# to the C++ style API.
|
# to the C++ style API.
|
||||||
# Sets exposure time to 1.2 seconds for module 0, 6 and 12
|
# Sets exposure time to 1.2 seconds for module 0, 6 and 12
|
||||||
>>> d.setExptime(1.2, [0, 6, 12])
|
>>> d.setExptime(1.2, [0, 6, 12])
|
||||||
>>> d.setExptime(dt.timedelta(seconds = 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
|
# This sets the exposure time for all modules
|
||||||
d.exptime = 0.5
|
d.exptime = 0.5
|
||||||
|
|
||||||
# exptime also accepts a python datetime.timedelta
|
# exptime also accepts a python datetime.timedelta (upto microseconds resolution)
|
||||||
# which can be used to set the time in almost any unit
|
|
||||||
t = dt.timedelta(milliseconds = 2.3)
|
t = dt.timedelta(milliseconds = 2.3)
|
||||||
d.exptime = t
|
d.exptime = t
|
||||||
|
|
||||||
@ -229,16 +247,25 @@ Setting and getting times
|
|||||||
t = dt.timedelta(minutes = 3, seconds = 1.23)
|
t = dt.timedelta(minutes = 3, seconds = 1.23)
|
||||||
d.exptime = t
|
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
|
# exptime however always returns the time in seconds
|
||||||
>>> d.exptime
|
>>> d.exptime
|
||||||
181.23
|
181.23
|
||||||
|
|
||||||
# To get back the exposure time for each module
|
# To get back the exposure time for each module
|
||||||
# it's possible to use getExptime, this also returns
|
# it's possible to use getExptime, this also returns
|
||||||
# the values as datetime.timedelta
|
# the values as DurationWrapper
|
||||||
|
|
||||||
>>> d.getExptime()
|
>>> 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
|
# In case the values are the same it's possible to use the
|
||||||
# element_if_equal function to reduce the values to a single
|
# element_if_equal function to reduce the values to a single
|
||||||
@ -246,7 +273,8 @@ Setting and getting times
|
|||||||
|
|
||||||
>>> t = d.getExptime()
|
>>> t = d.getExptime()
|
||||||
>>> element_if_equal(t)
|
>>> element_if_equal(t)
|
||||||
datetime.timedelta(seconds=1)
|
sls::DurationWrapper(total_seconds: 1.2 count: 1200000000)
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
Reading dacs
|
Reading dacs
|
||||||
|
@ -6,7 +6,7 @@ Getting Started
|
|||||||
Which Python?
|
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
|
Python installation. The examples in this documentation uses `conda
|
||||||
<https://docs.conda.io/en/latest/miniconda.html>`_ since it provides good support
|
<https://docs.conda.io/en/latest/miniconda.html>`_ since it provides good support
|
||||||
also for non Python packages but there are also other alternatives like, pyenv.
|
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
|
Using something like conda also allows you to quickly switch beteen different Python
|
||||||
environments.
|
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<Installation>` 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 ::
|
.. 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
|
For example, build/bin/_slsdet.cpython-39-x86_64-linux-gnu.so for Python v3.9.x
|
||||||
|
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
PYTHONPATH
|
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
|
directly start using the Python bindings. However, if you build
|
||||||
from source you need to tell Python where to find slsdet. This
|
from source you need to tell Python where to find slsdet to use it. This
|
||||||
is be done by adding your build/bin directory to PYTHONPATH.
|
can be done by adding your build/bin directory to PYTHONPATH.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
export PYTHONPATH = /path/to/your/build/bin:$PYTHONPATH
|
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?
|
Which detector class should I use?
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -147,9 +153,11 @@ their name.
|
|||||||
::
|
::
|
||||||
|
|
||||||
>>> [item for item in dir(d) if 'time' in item]
|
>>> [item for item in dir(d) if 'time' in item]
|
||||||
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
['compdisabletime', 'exptime', 'exptimel', 'frametime', 'getExptime',
|
||||||
'getSubExptime', 'patwaittime0', 'patwaittime1', 'patwaittime2',
|
'getExptimeForAllGates', 'getExptimeLeft', 'getSubExptime', 'patwaittime',
|
||||||
'setExptime', 'setSubExptime', 'subdeadtime', 'subexptime']
|
'patwaittime0', 'patwaittime1', 'patwaittime2', 'runtime', 'setExptime',
|
||||||
|
'setSubExptime', 'subdeadtime', 'subexptime']
|
||||||
|
|
||||||
|
|
||||||
The above method works on any Python object but for convenience we also
|
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
|
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')
|
>>> view('exptime')
|
||||||
exptime
|
exptime
|
||||||
|
exptimel
|
||||||
getExptime
|
getExptime
|
||||||
getExptimeForAllGates
|
getExptimeForAllGates
|
||||||
getExptimeLeft
|
getExptimeLeft
|
||||||
@ -169,6 +178,7 @@ while find returns a list of names.
|
|||||||
setSubExptime
|
setSubExptime
|
||||||
subexptime
|
subexptime
|
||||||
|
|
||||||
|
|
||||||
>>> find('exptime')
|
>>> find('exptime')
|
||||||
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
||||||
'getSubExptime', 'setExptime', 'setSubExptime', 'subexptime']
|
'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:
|
Help on property:
|
||||||
|
|
||||||
Period between frames, accepts either a value in seconds or datetime.timedelta
|
Period between frames, accepts either a value in seconds or datetime.timedelta
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getPeriod
|
:getter: always returns in seconds. To get in DurationWrapper, use getPeriod
|
||||||
|
|
||||||
Examples
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.period = 1.05
|
>>> 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
|
>>> d.period
|
||||||
181.23
|
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
|
import slsdet
|
||||||
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
|
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
|
||||||
['burstMode', 'clockIndex', 'dacIndex',
|
['M3_GainCaps', 'burstMode', 'clockIndex', 'cls', 'dacIndex', 'detectorSettings',
|
||||||
'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag',
|
'detectorType', 'dimension', 'externalSignalFlag', 'fileFormat',
|
||||||
'fileFormat', 'frameDiscardPolicy',
|
'frameDiscardPolicy', 'gainMode', 'name', 'polarity', 'portPosition',
|
||||||
'readoutMode', 'runStatus', 'speedLevel', 'timingMode',
|
'readoutMode', 'runStatus', 'speedLevel', 'streamingInterface', 'timingMode',
|
||||||
'timingSourceType']
|
'timingSourceType', 'vetoAlgorithm']
|
||||||
|
|
||||||
|
|
||||||
# Even though importing using * is not recommended one could
|
# Even though importing using * is not recommended one could
|
||||||
# get all the enums like this:
|
# get all the enums like this:
|
||||||
|
@ -23,15 +23,19 @@ Arguments
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
Possible arguments are:
|
Possible arguments are:
|
||||||
-v, --version : Software version
|
-v, --version : Software version
|
||||||
-p, --port <port> : TCP communication port with client.
|
-p, --port <port> : TCP communication port with client.
|
||||||
-g, --nomodule : [Mythen3][Gotthard2] Generic or No Module mode.
|
-g, --nomodule : [Mythen3][Gotthard2]
|
||||||
Skips detector type checks.
|
Generic or No Module mode. Skips detector type checks.
|
||||||
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
||||||
-d, --devel : Developer mode. Skips firmware checks.
|
-d, --devel : Developer mode. Skips firmware checks.
|
||||||
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
-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
|
-i, --ignore-config : [Eiger][Jungfrau][Gotthard][Gotthard2][Moench]
|
||||||
|
Ignore config file.
|
||||||
|
-m, --master <master> : [Eiger][Mythen3][Gotthard][Gotthard2]
|
||||||
|
Set Master to 0 or 1. Precedence over config file. Only for virtual servers except Eiger.
|
||||||
|
-t, --top <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:
|
.. _Automatic start servers:
|
||||||
@ -88,6 +92,8 @@ One can start the on-board detector server automatically upon powering on the bo
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sync
|
sync
|
||||||
|
|
||||||
|
# physically reboot for Gotthard II or Mythen III
|
||||||
reboot
|
reboot
|
||||||
|
|
||||||
# verify
|
# verify
|
||||||
|
@ -6,6 +6,10 @@ Config file
|
|||||||
|
|
||||||
Commands to configure the UDP in the 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
|
Source Port
|
||||||
-----------
|
-----------
|
||||||
Hardcoded in detector server, starting at 32410.
|
Hardcoded in detector server, starting at 32410.
|
||||||
|
@ -110,7 +110,7 @@ Jungfrau
|
|||||||
| | | | last exposure. |
|
| | | | last exposure. |
|
||||||
| | +-----+----------------------------------------+
|
| | +-----+----------------------------------------+
|
||||||
| | | 0 | External input flag not detected in the|
|
| | | 0 | External input flag not detected in the|
|
||||||
| | | | last exposure. |
|
| | | | last exposure. |
|
||||||
+----------+--------------------+-----+----------------------------------------+
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ The UDP data format for the packets consist of a common header for all detectors
|
|||||||
Current Version
|
Current Version
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
**v3.0 (slsDetectorPackage v7.0.0+)**
|
**v2.0 (slsDetectorPackage v7.0.0+)**
|
||||||
|
|
||||||
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
||||||
:align: center
|
: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<detector specific fields>`.
|
* **Detector specific field** descriptions are found :ref:`here<detector specific fields>`.
|
||||||
|
|
||||||
* **frameNumber**: framenumber to which the current packet belongs to.
|
* **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.
|
* **detType**: detector type from enum of detectorType in the package.
|
||||||
|
|
||||||
|
* **version**: current version of the detector header (0x2).
|
||||||
|
|
||||||
|
|
||||||
|
Detector Enum
|
||||||
|
--------------
|
||||||
|
|
||||||
================ ========
|
================ ========
|
||||||
Detector Type Value
|
Detector Type Value
|
||||||
================ ========
|
================ ========
|
||||||
@ -61,7 +79,6 @@ Current Version
|
|||||||
GOTTHARD2 7
|
GOTTHARD2 7
|
||||||
================ ========
|
================ ========
|
||||||
|
|
||||||
* **version**: current version of the detector header. It is at 0x3.
|
|
||||||
|
|
||||||
|
|
||||||
Previous Versions
|
Previous Versions
|
||||||
|
@ -13,16 +13,14 @@ Compilation
|
|||||||
* Using cmk.sh script,
|
* Using cmk.sh script,
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
./cmk.sh -bsj9 #option s is for simulator
|
./cmk.sh -bsj9 # option -s is for simulator
|
||||||
|
|
||||||
|
|
||||||
Binaries
|
Binaries
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
eigerDetectorServerMaster_virtual
|
eigerDetectorServer_virtual
|
||||||
eigerDetectorServerSlaveTop_virtual
|
|
||||||
eigerDetectorServerSlaveBottom_virtual
|
|
||||||
jungfrauDetectorServer_virtual
|
jungfrauDetectorServer_virtual
|
||||||
gotthardDetectorServer_virtual
|
gotthardDetectorServer_virtual
|
||||||
gotthard2DetectorServer_virtual
|
gotthard2DetectorServer_virtual
|
||||||
@ -67,7 +65,15 @@ Sample Config file
|
|||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
There are sample config files for each detector in slsDetectorPackage/examples folder.
|
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
|
.. code-block:: bash
|
||||||
|
|
||||||
# connects to control port 1912
|
# connects to control port 1912
|
||||||
@ -140,7 +146,7 @@ Gui
|
|||||||
Limitations
|
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.
|
#. A stop will stop the virtual acquisition only at the start of every new frame.
|
||||||
|
|
||||||
|
@ -472,6 +472,9 @@ class Detector(CppDetectorApi):
|
|||||||
-----------
|
-----------
|
||||||
>>> # setting directly in seconds
|
>>> # setting directly in seconds
|
||||||
>>> d.exptime = 1.05
|
>>> d.exptime = 1.05
|
||||||
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.exptime = 5e-07
|
||||||
>>>
|
>>>
|
||||||
>>> # using timedelta (up to microseconds precision)
|
>>> # using timedelta (up to microseconds precision)
|
||||||
>>> from datatime import timedelta
|
>>> from datatime import timedelta
|
||||||
@ -519,16 +522,35 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
Note
|
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
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.period = 1.05
|
>>> 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
|
>>> d.period
|
||||||
181.23
|
181.23
|
||||||
>>> d.getPeriod()
|
>>>
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
>>> d.getExptime()
|
||||||
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
res = self.getPeriod()
|
res = self.getPeriod()
|
||||||
return reduce_time(res)
|
return reduce_time(res)
|
||||||
@ -548,7 +570,7 @@ class Detector(CppDetectorApi):
|
|||||||
-----
|
-----
|
||||||
[Gotthard2] only in continuous mode.
|
[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
|
:setter: Not Implemented
|
||||||
|
|
||||||
Example
|
Example
|
||||||
@ -556,7 +578,7 @@ class Detector(CppDetectorApi):
|
|||||||
>>> d.periodl
|
>>> d.periodl
|
||||||
181.23
|
181.23
|
||||||
>>> d.getPeriodLeft()
|
>>> d.getPeriodLeft()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
"""
|
"""
|
||||||
return self.getPeriodLeft()
|
return self.getPeriodLeft()
|
||||||
|
|
||||||
@ -564,21 +586,40 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def delay(self):
|
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
|
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
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.delay = 1.05
|
>>> 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
|
>>> d.delay
|
||||||
181.23
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getDelayAfterTrigger()
|
>>> d.getDelayAfterTrigger()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getDelayAfterTrigger())
|
return ut.reduce_time(self.getDelayAfterTrigger())
|
||||||
|
|
||||||
@ -590,13 +631,13 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def delayl(self):
|
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
|
Note
|
||||||
-----
|
-----
|
||||||
[Gotthard2] only in continuous mdoe.
|
[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
|
:setter: Not Implemented
|
||||||
|
|
||||||
Example
|
Example
|
||||||
@ -604,7 +645,7 @@ class Detector(CppDetectorApi):
|
|||||||
>>> d.delayl
|
>>> d.delayl
|
||||||
181.23
|
181.23
|
||||||
>>> d.getDelayAfterTriggerLeft()
|
>>> d.getDelayAfterTriggerLeft()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getDelayAfterTriggerLeft())
|
return ut.reduce_time(self.getDelayAfterTriggerLeft())
|
||||||
|
|
||||||
@ -2041,16 +2082,35 @@ class Detector(CppDetectorApi):
|
|||||||
----
|
----
|
||||||
Subperiod = subexptime + subdeadtime.
|
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
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.subexptime = 1.230203
|
>>> 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
|
>>> d.subexptime
|
||||||
1.230203
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getSubExptime()
|
>>> d.getSubExptime()
|
||||||
[datetime.timedelta(seconds = 1, microseconds = 203)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
res = self.getSubExptime()
|
res = self.getSubExptime()
|
||||||
return reduce_time(res)
|
return reduce_time(res)
|
||||||
@ -2082,22 +2142,41 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def subdeadtime(self):
|
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
|
Note
|
||||||
----
|
----
|
||||||
Subperiod = subexptime + subdeadtime.
|
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
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.subdeadtime = 1.230203
|
>>> 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
|
>>> d.subdeadtime
|
||||||
1.230203
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getSubDeadTime()
|
>>> d.getSubDeadTime()
|
||||||
[datetime.timedelta(seconds = 1, microseconds = 203)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
res = self.getSubDeadTime()
|
res = self.getSubDeadTime()
|
||||||
return reduce_time(res)
|
return reduce_time(res)
|
||||||
@ -2273,16 +2352,35 @@ class Detector(CppDetectorApi):
|
|||||||
-----
|
-----
|
||||||
It is only possible for chipv1.1.
|
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
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.compdisabletime = 1.05
|
>>> 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
|
>>> d.compdisabletime
|
||||||
181.23
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getComparatorDisableTime()
|
>>> d.getComparatorDisableTime()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getComparatorDisableTime())
|
return ut.reduce_time(self.getComparatorDisableTime())
|
||||||
|
|
||||||
@ -2340,23 +2438,42 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def storagecell_delay(self):
|
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
|
Note
|
||||||
-----
|
-----
|
||||||
Only applicable for chipv1.0. For advanced users only \n
|
Only applicable for chipv1.0. For advanced users only \n
|
||||||
Value: 0-1638375 ns (resolution of 25ns)
|
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
|
Example
|
||||||
-----------
|
-----------
|
||||||
>>> d.storagecell_delay = 0.00056
|
>>> # setting directly in seconds
|
||||||
>>> d.storagecell_delay = datetime.timedelta(microseconds = 45)
|
>>> 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
|
>>> d.storagecell_delay
|
||||||
4.5e-05
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getStorageCellDelay()
|
>>> d.getStorageCellDelay()
|
||||||
[datetime.timedelta(microseconds=45)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getStorageCellDelay())
|
return ut.reduce_time(self.getStorageCellDelay())
|
||||||
|
|
||||||
@ -2630,18 +2747,36 @@ class Detector(CppDetectorApi):
|
|||||||
Note
|
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
|
:setter: Not Implemented
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.burstperiod = 1.05
|
>>> 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
|
>>> d.burstperiod
|
||||||
181.23
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getBurstPeriod()
|
>>> d.getBurstPeriod()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getBurstPeriod())
|
return ut.reduce_time(self.getBurstPeriod())
|
||||||
|
|
||||||
@ -2766,25 +2901,41 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def gatedelay(self):
|
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
|
Note
|
||||||
-----
|
-----
|
||||||
To specify gateIndex, use getGateDelay or setGateDelay.
|
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
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.gatedelay = 1.05
|
>>> 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
|
>>> d.gatedelay
|
||||||
181.23
|
181.23
|
||||||
>>> d.setGateDelay(1, datetime.timedelta(seconds = 2))
|
>>>
|
||||||
>>> d.gatedelay
|
|
||||||
>>> [1.0, 2.0, 1.0]
|
|
||||||
>>> d.getExptimeForAllGates()
|
>>> 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())
|
return reduce_time(self.getGateDelayForAllGates())
|
||||||
|
|
||||||
@ -3588,7 +3739,7 @@ class Detector(CppDetectorApi):
|
|||||||
Note
|
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
|
:setter: Not Implemented
|
||||||
|
|
||||||
Example
|
Example
|
||||||
@ -3596,7 +3747,7 @@ class Detector(CppDetectorApi):
|
|||||||
>>> d.exptimel
|
>>> d.exptimel
|
||||||
181.23
|
181.23
|
||||||
>>> d.getExptimeLeft()
|
>>> d.getExptimeLeft()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
"""
|
"""
|
||||||
t = self.getExptimeLeft()
|
t = self.getExptimeLeft()
|
||||||
return reduce_time(t)
|
return reduce_time(t)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user