Compare commits

...

6 Commits

Author SHA1 Message Date
88649a00b6 M3vtrim min (#454)
* Remove the vtrim min 600 check when setting threshold energy. vth1-3:200 - 2400, others 0-2800

* compile fix
2022-05-12 11:41:05 +02:00
b122c2fbdf Revert "Remove the vtrim min 600 check when setting threshold energy. vth1-3:200 - 2400, others 0-2800 (#452)" (#453)
This reverts commit 7d574375b4.
2022-05-12 11:38:34 +02:00
7d574375b4 Remove the vtrim min 600 check when setting threshold energy. vth1-3:200 - 2400, others 0-2800 (#452) 2022-05-12 11:06:14 +02:00
466d431081 update release notes 2022-05-10 15:35:44 +02:00
cd4520b051 not validating settings for dacs temporarily (#447) 2022-05-10 15:30:34 +02:00
0129c2c686 M3: master starts twice (non blocking) part 2 (#445)
* slaves and master vectors empty means all positions included: fixing double acquisition in masters

* debug print out
2022-05-10 15:23:39 +02:00
7 changed files with 38 additions and 20 deletions

View File

@ -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
- updatedetectorserver - removes old server current binary pointing to for blackfin
- removing copydetectorserver using tftp
>>>>>>> developer
- 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 parameter is a const string reference
- 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 )
- eiger gui row indices not flipped anymore (fix in config)
- m3 (settings dac check disabled temporarily?)
2. Resolved Issues
==================

View File

@ -1411,6 +1411,9 @@ enum detectorSettings setSettings(enum detectorSettings sett) {
}
void validateSettings() {
LOG(logWARNING, ("Not validating dac settings temporarily"));
return;
// if any special dac value is changed individually => undefined
const int specialDacs[NSPECIALDACS] = SPECIALDACINDEX;
int *specialDacValues[] = {defaultDacValue_standard, defaultDacValue_fast,

View File

@ -1173,31 +1173,40 @@ int DetectorImpl::acquire() {
return OK;
}
void DetectorImpl::startAcquisition(bool blocking, Positions pos) {
void DetectorImpl::startAcquisition(bool blocking, std::vector<int> positions) {
if (shm()->detType == defs::MYTHEN3 && size() > 1) {
std::vector<int> master;
std::vector<int> slaves;
auto is_master = Parallel(&Module::isMaster, pos);
// could be all slaves in pos
slaves.reserve(pos.size());
for (size_t i = 0; i != pos.size(); ++i) {
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);
}
Parallel(&Module::startAcquisition, slaves);
if (blocking) {
Parallel(&Module::startAndReadAll, master);
} else {
Parallel(&Module::startAcquisition, master);
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, pos);
Parallel(&Module::startAndReadAll, positions);
} else {
Parallel(&Module::startAcquisition, pos);
Parallel(&Module::startAcquisition, positions);
}
}
}

View File

@ -279,7 +279,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
int acquire();
/** also takes care of master and slave for multi module mythen */
void startAcquisition(bool blocking, Positions pos);
void startAcquisition(bool blocking, std::vector<int> positions);
/**
* Combines data from all readouts and gives it to the gui

View File

@ -407,12 +407,18 @@ void Module::setAllThresholdEnergy(std::array<int, 3> e_eV,
// check dacs
out_of_range = false;
for (auto dac : {M_VTRIM, M_VTH1, M_VTH2, M_VTH3}) {
if (myMod.dacs[dac] < 600) {
myMod.dacs[dac] = 600;
for (int i = 0; i != myMod.ndac; ++i) {
int dacMin = 0;
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;
} else if (myMod.dacs[dac] > 2400) {
myMod.dacs[dac] = 2400;
} else if (myMod.dacs[i] > dacMax) {
myMod.dacs[i] = dacMax;
out_of_range = true;
}
}

View File

@ -10,6 +10,6 @@
#define APIGOTTHARD 0x220428
#define APIGOTTHARD2 0x220428
#define APIJUNGFRAU 0x220428
#define APIMYTHEN3 0x220428
#define APIMOENCH 0x220427
#define APIEIGER 0x220428
#define APIMYTHEN3 0x220510