mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 16:20:03 +02:00
Merge pull request #390 from slsdetectorgroup/startmodular
startdetector
This commit is contained in:
commit
bf1df92303
@ -1,7 +1,7 @@
|
||||
SLS Detector Package Minor Release 6.1.0 released on 25.11.2021
|
||||
SLS Detector Package Minor Release 7.0.0 released on 25.11.2021
|
||||
===============================================================
|
||||
|
||||
This document describes the differences between v6.1.0 and v6.0.0.
|
||||
This document describes the differences between v7.0.0 and v6.x.x
|
||||
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ This document describes the differences between v6.1.0 and v6.0.0.
|
||||
- current frame index points to listened frame index (not processed index)
|
||||
- when in discard partial frames or empty mode, the frame number doesnt increase by 1, it increases to that number (so its faster)
|
||||
- file write disabled by default
|
||||
|
||||
- start non blocking acquisition at modular level
|
||||
|
||||
|
||||
2. Resolved Issues
|
||||
|
@ -470,7 +470,9 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)()) & Detector::clearAcquiringFlag)
|
||||
.def("startReceiver", (void (Detector::*)()) & Detector::startReceiver)
|
||||
.def("stopReceiver", (void (Detector::*)()) & Detector::stopReceiver)
|
||||
.def("startDetector", (void (Detector::*)()) & Detector::startDetector)
|
||||
.def("startDetector",
|
||||
(void (Detector::*)(sls::Positions)) & Detector::startDetector,
|
||||
py::arg() = Positions{})
|
||||
.def("startDetectorReadout",
|
||||
(void (Detector::*)()) & Detector::startDetectorReadout)
|
||||
.def("stopDetector",
|
||||
|
@ -567,7 +567,7 @@ class Detector {
|
||||
/** Non blocking: start detector acquisition. Status changes to RUNNING or
|
||||
* WAITING and automatically returns to idle at the end of acquisition.
|
||||
[Mythen3] Master starts acquisition first */
|
||||
void startDetector();
|
||||
void startDetector(Positions pos = {});
|
||||
|
||||
/** [Mythen3] Non blocking: start detector readout of counters in chip.
|
||||
* Status changes to TRANSMITTING and automatically returns to idle at the
|
||||
|
@ -1516,7 +1516,7 @@ class CmdProxy {
|
||||
"\n\tStops receiver listener for detector data packets and closes "
|
||||
"current data file (if file write enabled).");
|
||||
|
||||
EXECUTE_SET_COMMAND_NOID(
|
||||
EXECUTE_SET_COMMAND(
|
||||
start, startDetector,
|
||||
"\n\tStarts detector acquisition. Status changes to RUNNING or WAITING "
|
||||
"and automatically returns to idle at the end of acquisition. If the "
|
||||
|
@ -756,22 +756,24 @@ void Detector::startReceiver() { pimpl->Parallel(&Module::startReceiver, {}); }
|
||||
|
||||
void Detector::stopReceiver() { pimpl->Parallel(&Module::stopReceiver, {}); }
|
||||
|
||||
void Detector::startDetector() {
|
||||
auto detector_type = getDetectorType().squash();
|
||||
void Detector::startDetector(Positions pos) {
|
||||
auto detector_type = getDetectorType(pos).squash();
|
||||
if (detector_type == defs::MYTHEN3 && size() > 1) {
|
||||
auto is_master = getMaster();
|
||||
int masterPosition = 0;
|
||||
std::vector<int> slaves;
|
||||
for (int i = 0; i < size(); ++i) {
|
||||
if (is_master[i])
|
||||
std::vector<int> slaves(pos);
|
||||
auto is_master = getMaster(pos);
|
||||
int masterPosition = -1;
|
||||
for (unsigned int i = 0; i < is_master.size(); ++i) {
|
||||
if (is_master[i]) {
|
||||
masterPosition = i;
|
||||
else
|
||||
slaves.push_back(i);
|
||||
slaves.erase(pos.begin() + i);
|
||||
}
|
||||
pimpl->Parallel(&Module::startAcquisition, slaves);
|
||||
}
|
||||
pimpl->Parallel(&Module::startAcquisition, pos);
|
||||
if (masterPosition != -1) {
|
||||
pimpl->Parallel(&Module::startAcquisition, {masterPosition});
|
||||
}
|
||||
} else {
|
||||
pimpl->Parallel(&Module::startAcquisition, {});
|
||||
pimpl->Parallel(&Module::startAcquisition, pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user