mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
adding 12 bit mode for eiger, WIP
This commit is contained in:
parent
6d794cdf4b
commit
4107938921
@ -287,7 +287,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
Note
|
||||
-----
|
||||
[Eiger] Options: 4, 8, 16, 32. If set to 32, also sets clkdivider to 2 (quarter speed), else to 0 (full speed)\n
|
||||
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2 (quarter speed), else to 0 (full speed)\n
|
||||
[Mythen3] Options: 8, 16, 32 \n
|
||||
[Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16
|
||||
"""
|
||||
|
@ -862,11 +862,17 @@ void Beb_ResetFrameNumber() {
|
||||
}
|
||||
|
||||
int Beb_SetUpTransferParameters(short the_bit_mode) {
|
||||
if (the_bit_mode != 4 && the_bit_mode != 8 && the_bit_mode != 16 &&
|
||||
the_bit_mode != 32)
|
||||
switch (the_bit_mode) {
|
||||
case 4:
|
||||
case 8:
|
||||
case 12:
|
||||
case 16:
|
||||
case 32:
|
||||
Beb_bit_mode = the_bit_mode;
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
Beb_bit_mode = the_bit_mode;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int Beb_StopAcquisition() {
|
||||
|
@ -1169,37 +1169,36 @@ int Feb_Control_SoftwareTrigger(int block) {
|
||||
}
|
||||
|
||||
// parameters
|
||||
int Feb_Control_SetDynamicRange(unsigned int four_eight_sixteen_or_thirtytwo) {
|
||||
int Feb_Control_SetDynamicRange(unsigned int dr) {
|
||||
static unsigned int everything_but_bit_mode = DAQ_STATIC_BIT_PROGRAM |
|
||||
DAQ_STATIC_BIT_CHIP_TEST |
|
||||
DAQ_STATIC_BIT_ROTEST;
|
||||
if (four_eight_sixteen_or_thirtytwo == 4) {
|
||||
if (dr == 4) {
|
||||
Feb_Control_staticBits =
|
||||
DAQ_STATIC_BIT_M4 |
|
||||
(Feb_Control_staticBits &
|
||||
everything_but_bit_mode); // leave test bits in currernt state
|
||||
Feb_Control_subFrameMode &= ~DAQ_NEXPOSURERS_ACTIVATE_AUTO_SUBIMAGING;
|
||||
} else if (four_eight_sixteen_or_thirtytwo == 8) {
|
||||
} else if (dr == 8) {
|
||||
Feb_Control_staticBits = DAQ_STATIC_BIT_M8 | (Feb_Control_staticBits &
|
||||
everything_but_bit_mode);
|
||||
Feb_Control_subFrameMode &= ~DAQ_NEXPOSURERS_ACTIVATE_AUTO_SUBIMAGING;
|
||||
} else if (four_eight_sixteen_or_thirtytwo == 16) {
|
||||
} else if (dr == 16 || dr == 12) {
|
||||
Feb_Control_staticBits = DAQ_STATIC_BIT_M12 | (Feb_Control_staticBits &
|
||||
everything_but_bit_mode);
|
||||
Feb_Control_subFrameMode &= ~DAQ_NEXPOSURERS_ACTIVATE_AUTO_SUBIMAGING;
|
||||
} else if (four_eight_sixteen_or_thirtytwo == 32) {
|
||||
} else if (dr == 32) {
|
||||
Feb_Control_staticBits = DAQ_STATIC_BIT_M12 | (Feb_Control_staticBits &
|
||||
everything_but_bit_mode);
|
||||
Feb_Control_subFrameMode |= DAQ_NEXPOSURERS_ACTIVATE_AUTO_SUBIMAGING;
|
||||
} else {
|
||||
LOG(logERROR, ("dynamic range (%d) not valid, not setting bit mode.\n",
|
||||
four_eight_sixteen_or_thirtytwo));
|
||||
LOG(logERROR,
|
||||
("dynamic range (%d) not valid, not setting bit mode.\n", dr));
|
||||
LOG(logINFO, ("Set dynamic range int must equal 4,8 16, or 32.\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
LOG(logINFO,
|
||||
("Dynamic range set to %d\n", four_eight_sixteen_or_thirtytwo));
|
||||
LOG(logINFO, ("Dynamic range set to %d\n", dr));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ int Feb_Control_SendSoftwareTrigger();
|
||||
int Feb_Control_SoftwareTrigger(int block);
|
||||
|
||||
// parameters
|
||||
int Feb_Control_SetDynamicRange(unsigned int four_eight_sixteen_or_thirtytwo);
|
||||
int Feb_Control_SetDynamicRange(unsigned int dr);
|
||||
unsigned int Feb_Control_GetDynamicRange();
|
||||
int Feb_Control_SetReadoutSpeed(unsigned int readout_speed);
|
||||
int Feb_Control_SetReadoutMode(unsigned int readout_mode);
|
||||
|
@ -2811,6 +2811,9 @@ int set_dynamic_range(int file_des) {
|
||||
#endif
|
||||
#if defined(EIGERD) || defined(MYTHEN3D)
|
||||
case 8:
|
||||
#ifdef EIGERD
|
||||
case 12:
|
||||
#endif
|
||||
case 16:
|
||||
case 32:
|
||||
#endif
|
||||
|
@ -284,7 +284,7 @@ class Detector {
|
||||
Result<int> getDynamicRange(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Eiger] Options: 4, 8, 16, 32. If i is 32, also sets clkdivider to 2,
|
||||
* [Eiger] Options: 4, 8, 12, 16, 32. If i is 32, also sets clkdivider to 2,
|
||||
* else sets clkdivider to 1 \n [Mythen3] Options: 8, 16, 32 \n
|
||||
* [Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16
|
||||
*/
|
||||
|
@ -1109,7 +1109,6 @@ class CmdProxy {
|
||||
/* acquisition parameters */
|
||||
std::string Acquire(int action);
|
||||
std::string Exptime(int action);
|
||||
std::string DynamicRange(int action);
|
||||
std::string ReadoutSpeed(int action);
|
||||
std::string Adcphase(int action);
|
||||
std::string Dbitphase(int action);
|
||||
@ -1328,7 +1327,7 @@ class CmdProxy {
|
||||
dr, getDynamicRange, setDynamicRange, StringTo<int>,
|
||||
"[value]\n\tDynamic Range or number of bits per "
|
||||
"pixel in detector.\n\t"
|
||||
"[Eiger] Options: 4, 8, 16, 32. If set to 32, also sets "
|
||||
"[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets "
|
||||
"clkdivider to 2, else to 0.\n\t"
|
||||
"[Mythen3] Options: 8, 16, 32\n\t"
|
||||
"[Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16");
|
||||
|
@ -387,7 +387,7 @@ void Detector::setDynamicRange(int value) {
|
||||
std::vector<int> Detector::getDynamicRangeList() const {
|
||||
switch (getDetectorType().squash()) {
|
||||
case defs::EIGER:
|
||||
return std::vector<int>{4, 8, 16, 32};
|
||||
return std::vector<int>{4, 8, 12, 16, 32};
|
||||
case defs::MYTHEN3:
|
||||
return std::vector<int>{8, 16, 32};
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user