mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
added patfname command to save the file the last pttern was loaded from (#770)
* added patfname command to save the file the last pttern was loaded from
This commit is contained in:
@ -3412,6 +3412,13 @@ class Detector(CppDetectorApi):
|
||||
fname = ut.make_string_path(fname)
|
||||
ut.set_using_dict(self.setPattern, fname)
|
||||
|
||||
@property
|
||||
def patfname(self):
|
||||
"""
|
||||
[Ctb][Mythen3] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default
|
||||
file
|
||||
"""
|
||||
return self.getPatterFileName()
|
||||
|
||||
@property
|
||||
@element
|
||||
|
@ -1737,6 +1737,11 @@ void init_det(py::module &m) {
|
||||
(std::string(Detector::*)(const defs::dacIndex) const) &
|
||||
Detector::getSlowAdcName,
|
||||
py::arg());
|
||||
CppDetectorApi.def(
|
||||
"getPatterFileName",
|
||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getPatterFileName,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"setPattern",
|
||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||
|
Reference in New Issue
Block a user