mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-18 15:57:13 +02:00
jungfrau: gainmode
This commit is contained in:
@ -717,8 +717,6 @@ class CmdProxy {
|
||||
{"resmat", "partialreset"},
|
||||
|
||||
/* Jungfrau Specific */
|
||||
{"mode", "mode"},
|
||||
|
||||
/* Gotthard Specific */
|
||||
/* Gotthard2 Specific */
|
||||
/* Mythen3 Specific */
|
||||
@ -931,6 +929,7 @@ class CmdProxy {
|
||||
{"storagecells", &CmdProxy::storagecells},
|
||||
{"storagecell_start", &CmdProxy::storagecell_start},
|
||||
{"storagecell_delay", &CmdProxy::storagecell_delay},
|
||||
{"gainmode", &CmdProxy::gainmode},
|
||||
|
||||
/* Gotthard Specific */
|
||||
{"roi", &CmdProxy::ROI},
|
||||
@ -1866,6 +1865,11 @@ class CmdProxy {
|
||||
"Additional time delay between 2 consecutive exposures in burst mode "
|
||||
"(resolution of 25ns). Only applicable for chipv1.0. For advanced users only.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
gainmode, getGainMode, setGainMode,
|
||||
sls::StringTo<slsDetectorDefs::gainMode>,
|
||||
"[forceswitchg1, forceswitchg2]\n\t[Jungfrau] Gain mode.");
|
||||
|
||||
/* Gotthard Specific */
|
||||
TIME_GET_COMMAND(exptimel, getExptimeLeft,
|
||||
"[(optional unit) ns|us|ms|s]\n\t[Gotthard] Exposure time "
|
||||
|
@ -1483,6 +1483,26 @@ void Detector::setStorageCellDelay(ns value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setStorageCellDelay, pos, value.count());
|
||||
}
|
||||
|
||||
std::vector<defs::gainMode> Detector::getGainModeList() const {
|
||||
switch (getDetectorType().squash()) {
|
||||
case defs::JUNGFRAU:
|
||||
return std::vector<defs::gainMode>{defs::NORMAL_GAIN_MODE,
|
||||
defs::FORCE_SWITCH_G1,
|
||||
defs::FORCE_SWITCH_G2};
|
||||
break;
|
||||
default:
|
||||
throw RuntimeError("Gain mode is not implemented for this detector.");
|
||||
}
|
||||
}
|
||||
|
||||
Result<defs::gainMode> Detector::getGainMode(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getGainMode, pos);
|
||||
}
|
||||
|
||||
void Detector::setGainMode(const defs::gainMode mode, Positions pos) {
|
||||
pimpl->Parallel(&Module::setGainMode, pos, mode);
|
||||
}
|
||||
|
||||
// Gotthard Specific
|
||||
|
||||
Result<defs::ROI> Detector::getROI(Positions pos) const {
|
||||
|
@ -1601,6 +1601,14 @@ void Module::setStorageCellDelay(int64_t value) {
|
||||
sendToDetector(F_SET_STORAGE_CELL_DELAY, value, nullptr);
|
||||
}
|
||||
|
||||
slsDetectorDefs::gainMode Module::getGainMode() const {
|
||||
return sendToDetector<gainMode>(F_GET_GAIN_MODE);
|
||||
}
|
||||
|
||||
void Module::setGainMode(const slsDetectorDefs::gainMode mode) {
|
||||
sendToDetector(F_SET_GAIN_MODE, mode, nullptr);
|
||||
}
|
||||
|
||||
// Gotthard Specific
|
||||
|
||||
slsDetectorDefs::ROI Module::getROI() const {
|
||||
|
@ -369,6 +369,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setStorageCellStart(int pos);
|
||||
int64_t getStorageCellDelay() const;
|
||||
void setStorageCellDelay(int64_t value);
|
||||
gainMode getGainMode() const;
|
||||
void setGainMode(const gainMode mode);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
|
Reference in New Issue
Block a user