mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
wip, doc
This commit is contained in:
@ -131,7 +131,15 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def hostname(self):
|
||||
"""Frees shared memory and sets hostname (or IP address) of all modules concatenated by + """
|
||||
"""Frees shared memory and sets hostname (or IP address) of all modules concatenated by +
|
||||
Virtual servers can already use the port in hostname separated by ':' and ports incremented by 2 to accomodate the stop server as well.
|
||||
Example
|
||||
-------
|
||||
>>> d.hostname = 'beb031+beb032+'
|
||||
>>> d.hostname = 'localhost:1912+localhost:1914+'
|
||||
>>> d.hostname
|
||||
['localhost']
|
||||
"""
|
||||
return self.getHostname()
|
||||
|
||||
@hostname.setter
|
||||
@ -165,16 +173,35 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def firmwareversion(self):
|
||||
"""
|
||||
Fimware version of detector in format [0xYYMMDD] or an increasing 2 digit number for Eiger.
|
||||
Example
|
||||
-------
|
||||
>>> hex(d.firmwareversion)
|
||||
'0x200910'
|
||||
"""
|
||||
return element_if_equal(self.getFirmwareVersion())
|
||||
|
||||
@property
|
||||
def detectorserverversion(self):
|
||||
"""
|
||||
On-board detector server software version in format [0xYYMMDD]
|
||||
Example
|
||||
-------
|
||||
>>> hex(d.detectorserverversion)
|
||||
'0x200910'
|
||||
"""
|
||||
# TODO! handle hex print
|
||||
return element_if_equal(self.getDetectorServerVersion())
|
||||
|
||||
@property
|
||||
def clientversion(self):
|
||||
"""Client software version in format [YYMMDD]"""
|
||||
"""Client software version in format [YYMMDD]
|
||||
Example
|
||||
-------
|
||||
>>> hex(d.clientversion)
|
||||
'0x200810'
|
||||
"""
|
||||
return self.getClientVersion()
|
||||
|
||||
@property
|
||||
@ -206,6 +233,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def drlist(self):
|
||||
"""List of possible dynamic ranges for this detector"""
|
||||
return self.getDynamicRangeList()
|
||||
|
||||
@property
|
||||
@ -219,6 +247,18 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def detsize(self):
|
||||
"""
|
||||
Sets the detector size in both dimensions (number of channels).
|
||||
Note
|
||||
-----
|
||||
This value is used to calculate row and column positions for each module and included into udp data packet header. \n
|
||||
By default, it adds modules in y dimension for 2d detectors and in x dimension for 1d detectors.
|
||||
:setter: Not implemented
|
||||
Example
|
||||
-------
|
||||
>>> d.detsize
|
||||
Geometry(x=3840, y=1)
|
||||
"""
|
||||
return to_geo(self.getDetectorSize())
|
||||
|
||||
@property
|
||||
@ -247,8 +287,8 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
Cannot be set in modular level. ????
|
||||
In scan mode, number of frames is set to number of steps.
|
||||
Cannot be set in modular level. \n
|
||||
In scan mode, number of frames is set to number of steps. \n
|
||||
[Gotthard2] Burst mode has a maximum of 2720 frames.
|
||||
"""
|
||||
return element_if_equal(self.getNumberOfFrames())
|
||||
@ -260,6 +300,10 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def framesl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of frames left in acquisition.\n
|
||||
[Gotthard2] only in continuous mode.
|
||||
"""
|
||||
return self.getNumberOfFramesLeft()
|
||||
|
||||
@property
|
||||
@ -393,9 +437,9 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Example
|
||||
-----------
|
||||
>>> d.delay
|
||||
>>> d.delayl
|
||||
181.23
|
||||
>>> d.getDelayAfterTrigger()
|
||||
>>> d.getDelayAfterTriggerLeft()
|
||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
||||
"""
|
||||
return ut.reduce_time(self.getDelayAfterTriggerLeft())
|
||||
@ -623,7 +667,11 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def findex(self):
|
||||
"""File or Acquisition index in receiver."""
|
||||
"""File or Acquisition index in receiver.
|
||||
Note
|
||||
----
|
||||
File name: [file name prefix]_d[detector index]_f[sub file index]_[acquisition/file index].[raw/h5].
|
||||
"""
|
||||
return self.getAcquisitionIndex()
|
||||
|
||||
@findex.setter
|
||||
@ -651,8 +699,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def fpath(self):
|
||||
"""Directory where output data files are written in receiver.
|
||||
|
||||
"""Directory where output data files are written in receiver. Default is "/".
|
||||
Note
|
||||
----
|
||||
If path does not exist, it will try to create it.
|
||||
@ -1846,6 +1893,11 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def filter(self):
|
||||
"""[Gotthard2] Set filter resistor.
|
||||
Note
|
||||
----
|
||||
Default is 0. Options: 0-3.
|
||||
"""
|
||||
return self.getFilter()
|
||||
|
||||
@filter.setter
|
||||
@ -2636,6 +2688,19 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def clkdiv(self):
|
||||
"""
|
||||
[Gotthard2][Mythen3] Clock Divider of 5 clocks. Must be greater than 1.
|
||||
Example
|
||||
-------
|
||||
>>> d.clkdiv[0] = 20
|
||||
>>> d.clkdiv
|
||||
0: 20
|
||||
1: 10
|
||||
2: 20
|
||||
3: 10
|
||||
4: 10
|
||||
5: 5
|
||||
"""
|
||||
return ClkDivProxy(self)
|
||||
|
||||
|
||||
@ -2645,6 +2710,18 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def exptimel(self):
|
||||
"""[Gotthard] Exposure time left for current frame.
|
||||
Note
|
||||
-----
|
||||
:getter: always returns in seconds. To get in datetime.delta, use getExptimeLeft
|
||||
|
||||
Example
|
||||
-----------
|
||||
>>> d.exptimel
|
||||
181.23
|
||||
>>> d.getExptimeLeft()
|
||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
||||
"""
|
||||
t = self.getExptimeLeft()
|
||||
return reduce_time(t)
|
||||
|
||||
@ -2656,6 +2733,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def gates(self):
|
||||
"""[Mythen3] Number of external gates in gating or trigger_gating mode (external gating)."""
|
||||
return self.getNumberOfGates()
|
||||
|
||||
@gates.setter
|
||||
@ -2665,6 +2743,16 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def clkfreq(self):
|
||||
"""
|
||||
[Gotthard2][Mythen3] Frequency of clock in Hz.
|
||||
Note
|
||||
-----
|
||||
:setter: Not implemented. Use clkdiv to set frequency
|
||||
Example
|
||||
-------
|
||||
>>> d.clkfreq[0]
|
||||
50000000
|
||||
"""
|
||||
return ClkFreqProxy(self)
|
||||
|
||||
"""
|
||||
|
Reference in New Issue
Block a user