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)
|
- 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)
|
- 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
|
- file write disabled by default
|
||||||
|
- start non blocking acquisition at modular level
|
||||||
|
|
||||||
|
|
||||||
2. Resolved Issues
|
2. Resolved Issues
|
||||||
|
@ -470,7 +470,9 @@ void init_det(py::module &m) {
|
|||||||
(void (Detector::*)()) & Detector::clearAcquiringFlag)
|
(void (Detector::*)()) & Detector::clearAcquiringFlag)
|
||||||
.def("startReceiver", (void (Detector::*)()) & Detector::startReceiver)
|
.def("startReceiver", (void (Detector::*)()) & Detector::startReceiver)
|
||||||
.def("stopReceiver", (void (Detector::*)()) & Detector::stopReceiver)
|
.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",
|
.def("startDetectorReadout",
|
||||||
(void (Detector::*)()) & Detector::startDetectorReadout)
|
(void (Detector::*)()) & Detector::startDetectorReadout)
|
||||||
.def("stopDetector",
|
.def("stopDetector",
|
||||||
|
@ -567,7 +567,7 @@ class Detector {
|
|||||||
/** Non blocking: start detector acquisition. Status changes to RUNNING or
|
/** Non blocking: start detector acquisition. Status changes to RUNNING or
|
||||||
* WAITING and automatically returns to idle at the end of acquisition.
|
* WAITING and automatically returns to idle at the end of acquisition.
|
||||||
[Mythen3] Master starts acquisition first */
|
[Mythen3] Master starts acquisition first */
|
||||||
void startDetector();
|
void startDetector(Positions pos = {});
|
||||||
|
|
||||||
/** [Mythen3] Non blocking: start detector readout of counters in chip.
|
/** [Mythen3] Non blocking: start detector readout of counters in chip.
|
||||||
* Status changes to TRANSMITTING and automatically returns to idle at the
|
* 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 "
|
"\n\tStops receiver listener for detector data packets and closes "
|
||||||
"current data file (if file write enabled).");
|
"current data file (if file write enabled).");
|
||||||
|
|
||||||
EXECUTE_SET_COMMAND_NOID(
|
EXECUTE_SET_COMMAND(
|
||||||
start, startDetector,
|
start, startDetector,
|
||||||
"\n\tStarts detector acquisition. Status changes to RUNNING or WAITING "
|
"\n\tStarts detector acquisition. Status changes to RUNNING or WAITING "
|
||||||
"and automatically returns to idle at the end of acquisition. If the "
|
"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::stopReceiver() { pimpl->Parallel(&Module::stopReceiver, {}); }
|
||||||
|
|
||||||
void Detector::startDetector() {
|
void Detector::startDetector(Positions pos) {
|
||||||
auto detector_type = getDetectorType().squash();
|
auto detector_type = getDetectorType(pos).squash();
|
||||||
if (detector_type == defs::MYTHEN3 && size() > 1) {
|
if (detector_type == defs::MYTHEN3 && size() > 1) {
|
||||||
auto is_master = getMaster();
|
std::vector<int> slaves(pos);
|
||||||
int masterPosition = 0;
|
auto is_master = getMaster(pos);
|
||||||
std::vector<int> slaves;
|
int masterPosition = -1;
|
||||||
for (int i = 0; i < size(); ++i) {
|
for (unsigned int i = 0; i < is_master.size(); ++i) {
|
||||||
if (is_master[i])
|
if (is_master[i]) {
|
||||||
masterPosition = i;
|
masterPosition = i;
|
||||||
else
|
slaves.erase(pos.begin() + i);
|
||||||
slaves.push_back(i);
|
}
|
||||||
|
}
|
||||||
|
pimpl->Parallel(&Module::startAcquisition, pos);
|
||||||
|
if (masterPosition != -1) {
|
||||||
|
pimpl->Parallel(&Module::startAcquisition, {masterPosition});
|
||||||
}
|
}
|
||||||
pimpl->Parallel(&Module::startAcquisition, slaves);
|
|
||||||
pimpl->Parallel(&Module::startAcquisition, {masterPosition});
|
|
||||||
} else {
|
} else {
|
||||||
pimpl->Parallel(&Module::startAcquisition, {});
|
pimpl->Parallel(&Module::startAcquisition, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user