mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
exptime example
This commit is contained in:
parent
38e0351068
commit
05d5652532
@ -6,6 +6,33 @@ open an issue in our our `github repo
|
||||
<https://github.com/slsdetectorgroup/slsDetectorPackage>`_.
|
||||
|
||||
|
||||
------------------------------------
|
||||
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.
|
||||
|
||||
::
|
||||
|
||||
# Set exposure time to 1.2 seconds
|
||||
>>> d.exptime = 1.2
|
||||
|
||||
# Setting exposure time using timedelta
|
||||
import datetime as dt
|
||||
>>> d.exptime = dt.timedelta(seconds = 1.2)
|
||||
|
||||
# With timedelta any arbitrary combination of units can be used
|
||||
>>> t = dt.timedelta(microseconds = 100, seconds = 5.3, minutes = .3)
|
||||
|
||||
# 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])
|
||||
|
||||
|
||||
|
||||
------------------------------------
|
||||
Converting numbers to hex
|
||||
------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user