mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 16:48:01 +02:00
Compare commits
7 Commits
newconda
...
2022.05.22
Author | SHA1 | Date | |
---|---|---|---|
88649a00b6 | |||
b122c2fbdf | |||
7d574375b4 | |||
466d431081 | |||
cd4520b051 | |||
0129c2c686 | |||
f55bdd6eae |
@ -62,13 +62,13 @@ This document describes the differences between v7.0.0 and v6.x.x
|
|||||||
- m3 polarity, interpolation (enables all counters when enabled), pump probe, analog pulsing, digital pulsing
|
- m3 polarity, interpolation (enables all counters when enabled), pump probe, analog pulsing, digital pulsing
|
||||||
- updatedetectorserver - removes old server current binary pointing to for blackfin
|
- updatedetectorserver - removes old server current binary pointing to for blackfin
|
||||||
- removing copydetectorserver using tftp
|
- removing copydetectorserver using tftp
|
||||||
>>>>>>> developer
|
|
||||||
- registerCallBackRawDataReady and registerCallBackRawDataModifyReady now gives a sls_receiver_header* instead of a char*, and uint32_t to size_t
|
- registerCallBackRawDataReady and registerCallBackRawDataModifyReady now gives a sls_receiver_header* instead of a char*, and uint32_t to size_t
|
||||||
- registerCallBackStartAcquisition gave incorrect imagesize (+120 bytes). corrected.
|
- registerCallBackStartAcquisition gave incorrect imagesize (+120 bytes). corrected.
|
||||||
- registerCallBackStartAcquisition parameter is a const string reference
|
- registerCallBackStartAcquisition parameter is a const string reference
|
||||||
- m3 (runnig config second time with tengiga 0, dr !=32, counters !=0x7) calculated incorrect image size expected
|
- m3 (runnig config second time with tengiga 0, dr !=32, counters !=0x7) calculated incorrect image size expected
|
||||||
- fixed row column indexing (mainly for multi module Jungfrau 2 interfaces )
|
- fixed row column indexing (mainly for multi module Jungfrau 2 interfaces )
|
||||||
- eiger gui row indices not flipped anymore (fix in config)
|
- eiger gui row indices not flipped anymore (fix in config)
|
||||||
|
- m3 (settings dac check disabled temporarily?)
|
||||||
|
|
||||||
2. Resolved Issues
|
2. Resolved Issues
|
||||||
==================
|
==================
|
||||||
|
Binary file not shown.
@ -1411,6 +1411,9 @@ enum detectorSettings setSettings(enum detectorSettings sett) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void validateSettings() {
|
void validateSettings() {
|
||||||
|
LOG(logWARNING, ("Not validating dac settings temporarily"));
|
||||||
|
return;
|
||||||
|
|
||||||
// if any special dac value is changed individually => undefined
|
// if any special dac value is changed individually => undefined
|
||||||
const int specialDacs[NSPECIALDACS] = SPECIALDACINDEX;
|
const int specialDacs[NSPECIALDACS] = SPECIALDACINDEX;
|
||||||
int *specialDacValues[] = {defaultDacValue_standard, defaultDacValue_fast,
|
int *specialDacValues[] = {defaultDacValue_standard, defaultDacValue_fast,
|
||||||
|
@ -781,24 +781,7 @@ void Detector::startReceiver() { pimpl->Parallel(&Module::startReceiver, {}); }
|
|||||||
void Detector::stopReceiver() { pimpl->Parallel(&Module::stopReceiver, {}); }
|
void Detector::stopReceiver() { pimpl->Parallel(&Module::stopReceiver, {}); }
|
||||||
|
|
||||||
void Detector::startDetector(Positions pos) {
|
void Detector::startDetector(Positions pos) {
|
||||||
auto detector_type = getDetectorType(pos).squash();
|
pimpl->startAcquisition(false, pos);
|
||||||
if (detector_type == defs::MYTHEN3 && size() > 1) {
|
|
||||||
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;
|
|
||||||
slaves.erase(slaves.begin() + i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pimpl->Parallel(&Module::startAcquisition, pos);
|
|
||||||
if (masterPosition != -1) {
|
|
||||||
pimpl->Parallel(&Module::startAcquisition, {masterPosition});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pimpl->Parallel(&Module::startAcquisition, pos);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Detector::startDetectorReadout() {
|
void Detector::startDetectorReadout() {
|
||||||
|
@ -1124,25 +1124,7 @@ int DetectorImpl::acquire() {
|
|||||||
|
|
||||||
// start and read all
|
// start and read all
|
||||||
try {
|
try {
|
||||||
if (detector_type == defs::MYTHEN3 && modules.size() > 1) {
|
startAcquisition(true, {});
|
||||||
// Multi module mythen
|
|
||||||
std::vector<int> master;
|
|
||||||
std::vector<int> slaves;
|
|
||||||
auto is_master = Parallel(&Module::isMaster, {});
|
|
||||||
slaves.reserve(modules.size() - 1); // check this one!!
|
|
||||||
for (size_t i = 0; i < modules.size(); ++i) {
|
|
||||||
if (is_master[i])
|
|
||||||
master.push_back(i);
|
|
||||||
else
|
|
||||||
slaves.push_back(i);
|
|
||||||
}
|
|
||||||
Parallel(&Module::startAcquisition, slaves);
|
|
||||||
Parallel(&Module::startAndReadAll, master);
|
|
||||||
} else {
|
|
||||||
// Normal acquire
|
|
||||||
Parallel(&Module::startAndReadAll, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
if (receiver)
|
if (receiver)
|
||||||
Parallel(&Module::stopReceiver, {});
|
Parallel(&Module::stopReceiver, {});
|
||||||
@ -1191,6 +1173,44 @@ int DetectorImpl::acquire() {
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DetectorImpl::startAcquisition(bool blocking, std::vector<int> positions) {
|
||||||
|
if (shm()->detType == defs::MYTHEN3 && size() > 1) {
|
||||||
|
std::vector<int> master;
|
||||||
|
std::vector<int> slaves;
|
||||||
|
if (positions.empty() ||
|
||||||
|
(positions.size() == 1 && positions[0] == -1)) {
|
||||||
|
positions.resize(modules.size());
|
||||||
|
std::iota(begin(positions), end(positions), 0);
|
||||||
|
}
|
||||||
|
// could be all slaves in positions
|
||||||
|
slaves.reserve(positions.size());
|
||||||
|
auto is_master = Parallel(&Module::isMaster, positions);
|
||||||
|
for (size_t i : positions) {
|
||||||
|
if (is_master[i])
|
||||||
|
master.push_back(i);
|
||||||
|
else
|
||||||
|
slaves.push_back(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!slaves.empty()) {
|
||||||
|
Parallel(&Module::startAcquisition, slaves);
|
||||||
|
}
|
||||||
|
if (!master.empty()) {
|
||||||
|
if (blocking) {
|
||||||
|
Parallel(&Module::startAndReadAll, master);
|
||||||
|
} else {
|
||||||
|
Parallel(&Module::startAcquisition, master);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (blocking) {
|
||||||
|
Parallel(&Module::startAndReadAll, positions);
|
||||||
|
} else {
|
||||||
|
Parallel(&Module::startAcquisition, positions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DetectorImpl::printProgress(double progress) {
|
void DetectorImpl::printProgress(double progress) {
|
||||||
// spaces for python printout
|
// spaces for python printout
|
||||||
std::cout << " " << std::fixed << std::setprecision(2) << std::setw(6)
|
std::cout << " " << std::fixed << std::setprecision(2) << std::setw(6)
|
||||||
|
@ -278,6 +278,9 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
|||||||
*/
|
*/
|
||||||
int acquire();
|
int acquire();
|
||||||
|
|
||||||
|
/** also takes care of master and slave for multi module mythen */
|
||||||
|
void startAcquisition(bool blocking, std::vector<int> positions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combines data from all readouts and gives it to the gui
|
* Combines data from all readouts and gives it to the gui
|
||||||
* or just gives progress of acquisition by polling receivers
|
* or just gives progress of acquisition by polling receivers
|
||||||
|
@ -407,12 +407,18 @@ void Module::setAllThresholdEnergy(std::array<int, 3> e_eV,
|
|||||||
|
|
||||||
// check dacs
|
// check dacs
|
||||||
out_of_range = false;
|
out_of_range = false;
|
||||||
for (auto dac : {M_VTRIM, M_VTH1, M_VTH2, M_VTH3}) {
|
for (int i = 0; i != myMod.ndac; ++i) {
|
||||||
if (myMod.dacs[dac] < 600) {
|
int dacMin = 0;
|
||||||
myMod.dacs[dac] = 600;
|
int dacMax = 2800;
|
||||||
|
if (i == M_VTH1 || i == M_VTH2 || i == M_VTH3) {
|
||||||
|
dacMin = 200;
|
||||||
|
dacMax = 2400;
|
||||||
|
}
|
||||||
|
if (myMod.dacs[i] < dacMin) {
|
||||||
|
myMod.dacs[i] = dacMin;
|
||||||
out_of_range = true;
|
out_of_range = true;
|
||||||
} else if (myMod.dacs[dac] > 2400) {
|
} else if (myMod.dacs[i] > dacMax) {
|
||||||
myMod.dacs[dac] = 2400;
|
myMod.dacs[i] = dacMax;
|
||||||
out_of_range = true;
|
out_of_range = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,6 @@
|
|||||||
#define APIGOTTHARD 0x220428
|
#define APIGOTTHARD 0x220428
|
||||||
#define APIGOTTHARD2 0x220428
|
#define APIGOTTHARD2 0x220428
|
||||||
#define APIJUNGFRAU 0x220428
|
#define APIJUNGFRAU 0x220428
|
||||||
#define APIMYTHEN3 0x220428
|
|
||||||
#define APIMOENCH 0x220427
|
#define APIMOENCH 0x220427
|
||||||
#define APIEIGER 0x220428
|
#define APIEIGER 0x220428
|
||||||
|
#define APIMYTHEN3 0x220510
|
||||||
|
Reference in New Issue
Block a user