mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-20 14:48:54 +01:00
Dev/include file (#1306)
* create a include command calling the same function as parameters (cmd generation and autocompletion), testing parameters and include * added include in command line and python and its supposed to do the same as parameters command. both are tested * added colorama * moved test_free and test_command python tests to tests/scripts folder from python/tests due to CI issues with dependencies * generated commands * formatting --------- Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
@@ -149,6 +149,33 @@ class Detector(CppDetectorApi):
|
||||
value = ut.make_string_path(value)
|
||||
self.loadParameters(value)
|
||||
|
||||
|
||||
@property
|
||||
def include(self):
|
||||
"""Sets detector measurement parameters to those contained in fname.
|
||||
Set up per measurement.
|
||||
|
||||
Note
|
||||
-----
|
||||
Equivalent to config, but does not free shared memory. Same as parameters command.
|
||||
|
||||
:getter: Not implemented
|
||||
:setter: loads parameters file
|
||||
|
||||
Example
|
||||
---------
|
||||
|
||||
>>> d.include = 'path/to/file.par'
|
||||
|
||||
"""
|
||||
return NotImplementedError("include is set only")
|
||||
|
||||
@include.setter
|
||||
def include(self, value):
|
||||
if isinstance(value, str):
|
||||
value = ut.make_string_path(value)
|
||||
self.loadParameters(value)
|
||||
|
||||
@property
|
||||
def hostname(self):
|
||||
"""Frees shared memory and sets hostname (or IP address) of all modules concatenated by +
|
||||
|
||||
Reference in New Issue
Block a user