mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
Merge branch 'developer' into jf_singlemodule
This commit is contained in:
commit
9d2d4f49d4
@ -316,7 +316,8 @@ struct GenericStringRef {
|
||||
|
||||
GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
|
||||
|
||||
GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
|
||||
// Removed to fix failing build in GCC 14
|
||||
// GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
|
||||
|
||||
//! implicit conversion to plain CharType pointer
|
||||
operator const Ch *() const { return s; }
|
||||
|
Binary file not shown.
@ -70,7 +70,7 @@
|
||||
|
||||
#define ADC_PHASE_DEG_QUARTER_SPEED (0)
|
||||
#define ADC_PHASE_DEG_HALF_SPEED (0)
|
||||
#define ADC_PHASE_DEG_FULL_SPEED (300)
|
||||
#define ADC_PHASE_DEG_FULL_SPEED (150)
|
||||
|
||||
#define ADC_OFST_QUARTER_SPEED (0x12)
|
||||
#define ADC_OFST_HALF_SPEED (0x12)
|
||||
@ -133,7 +133,7 @@ enum DACINDEX {
|
||||
680, /* MO_VB_SDA */ \
|
||||
1428, /* MO_VCASC_SFP */ \
|
||||
1200, /* MO_VOUT_CM */ \
|
||||
800, /* MO_VIPRE_CDS */ \
|
||||
1280, /* MO_VIPRE_CDS */ \
|
||||
900 /* MO_IBIAS_SFP */ \
|
||||
};
|
||||
|
||||
|
Binary file not shown.
@ -480,6 +480,11 @@ void setupDetector() {
|
||||
READOUT_PLL_VCO_FREQ_HZ, SYSTEM_PLL_VCO_FREQ_HZ);
|
||||
ALTERA_PLL_C10_ResetPLL(READOUT_PLL);
|
||||
ALTERA_PLL_C10_ResetPLL(SYSTEM_PLL);
|
||||
// change startup clock divider in software
|
||||
// because firmware only sets max clock divider
|
||||
setClockDividerWithTimeUpdateOption(READOUT_C0, DEFAULT_READOUT_C0_STARTUP,
|
||||
0);
|
||||
|
||||
// hv
|
||||
DAC6571_SetDefines(HV_HARD_MAX_VOLTAGE, HV_DRIVER_FILE_NAME);
|
||||
// dac
|
||||
@ -2333,6 +2338,7 @@ int setClockDividerWithTimeUpdateOption(enum CLKINDEX ind, int val,
|
||||
return FAIL;
|
||||
}
|
||||
if (val < 2 || val > getMaxClockDivider()) {
|
||||
LOG(logERROR, ("Invalid clock divider %d\n", val));
|
||||
return FAIL;
|
||||
}
|
||||
char *clock_names[] = {CLK_NAMES};
|
||||
|
@ -65,6 +65,8 @@
|
||||
#define DEFAULT_SYSTEM_C2 (5) //(200000000) // smp_clk, 200 MHz const
|
||||
#define DEFAULT_TRIMMING_RUN_CLKDIV (40) // (25000000) // 25 MHz
|
||||
|
||||
#define DEFAULT_READOUT_C0_STARTUP (20) //(50000000) // rdo_clk, 50 MHz
|
||||
|
||||
#define DEFAULT_ASIC_LATCHING_NUM_PULSES (10)
|
||||
#define DEFAULT_MSTR_OTPT_P1_NUM_PULSES (20)
|
||||
#define DEFAULT_ADIF_PIPELINE_VAL (8)
|
||||
|
@ -744,9 +744,8 @@ void DetectorImpl::readFrameFromReceiver() {
|
||||
}
|
||||
}
|
||||
|
||||
LOG(logDEBUG) << "Call Back Info:"
|
||||
<< "\n\t nDetPixelsX: " << nDetPixelsX
|
||||
<< "\n\t nDetPixelsY: " << nDetPixelsY
|
||||
LOG(logDEBUG) << "Call Back Info:" << "\n\t nDetPixelsX: "
|
||||
<< nDetPixelsX << "\n\t nDetPixelsY: " << nDetPixelsY
|
||||
<< "\n\t databytes: " << multisize
|
||||
<< "\n\t dynamicRange: " << dynamicRange;
|
||||
|
||||
@ -764,8 +763,8 @@ void DetectorImpl::readFrameFromReceiver() {
|
||||
callbackImage = multigappixels;
|
||||
imagesize = n;
|
||||
}
|
||||
LOG(logDEBUG) << "Image Info:"
|
||||
<< "\n\tnDetActualPixelsX: " << nDetActualPixelsX
|
||||
LOG(logDEBUG) << "Image Info:" << "\n\tnDetActualPixelsX: "
|
||||
<< nDetActualPixelsX
|
||||
<< "\n\tnDetActualPixelsY: " << nDetActualPixelsY
|
||||
<< "\n\timagesize: " << imagesize
|
||||
<< "\n\tdynamicRange: " << dynamicRange;
|
||||
@ -800,8 +799,7 @@ void DetectorImpl::readFrameFromReceiver() {
|
||||
int DetectorImpl::insertGapPixels(char *image, char *&gpImage, bool quadEnable,
|
||||
int dr, int &nPixelsx, int &nPixelsy) {
|
||||
|
||||
LOG(logDEBUG) << "Insert Gap pixels:"
|
||||
<< "\n\t nPixelsx: " << nPixelsx
|
||||
LOG(logDEBUG) << "Insert Gap pixels:" << "\n\t nPixelsx: " << nPixelsx
|
||||
<< "\n\t nPixelsy: " << nPixelsy
|
||||
<< "\n\t quadEnable: " << quadEnable << "\n\t dr: " << dr;
|
||||
|
||||
@ -886,12 +884,10 @@ int DetectorImpl::insertGapPixels(char *image, char *&gpImage, bool quadEnable,
|
||||
<< "nMod1Pixelsy: " << nMod1Pixelsy << "\n\t"
|
||||
<< "nMod1GapPixelsx: " << nMod1GapPixelsx << "\n\t"
|
||||
<< "nMod1GapPixelsy: " << nMod1GapPixelsy << "\n\t"
|
||||
<< "nChipy: " << nChipy << "\n\t"
|
||||
<< "nChipx: " << nChipx << "\n\t"
|
||||
<< "nModx: " << nModx << "\n\t"
|
||||
<< "nMody: " << nMody << "\n\t"
|
||||
<< "nTotx: " << nTotx << "\n\t"
|
||||
<< "nToty: " << nToty << "\n\t"
|
||||
<< "nChipy: " << nChipy << "\n\t" << "nChipx: " << nChipx
|
||||
<< "\n\t" << "nModx: " << nModx << "\n\t"
|
||||
<< "nMody: " << nMody << "\n\t" << "nTotx: " << nTotx
|
||||
<< "\n\t" << "nToty: " << nToty << "\n\t"
|
||||
<< "bytesPerPixel: " << bytesPerPixel << "\n\t"
|
||||
<< "imagesize: " << imagesize << "\n\t"
|
||||
<< "nChipBytesx: " << nChipBytesx << "\n\t"
|
||||
@ -1323,6 +1319,11 @@ void DetectorImpl::startAcquisition(const bool blocking, Positions pos) {
|
||||
// ensure all status normal (slaves not blocking)
|
||||
// to catch those slaves that are still 'waiting'
|
||||
auto status = Parallel(&Module::getRunStatus, pos);
|
||||
// if any slave still waiting, wait up to 1s
|
||||
for (int i = 0; i != 20 && status.any(WAITING); ++i) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
status = Parallel(&Module::getRunStatus, pos);
|
||||
}
|
||||
if (!status.contains_only(IDLE, STOPPED, RUN_FINISHED)) {
|
||||
throw RuntimeError("Acquisition not successful. "
|
||||
"Unexpected detector status");
|
||||
@ -1981,7 +1982,7 @@ void DetectorImpl::setBadChannels(const std::vector<int> list, Positions pos) {
|
||||
|
||||
// update to multi values if multi modules
|
||||
if (isAllPositions(pos)) {
|
||||
std::vector<std::vector<int>> badchannels;
|
||||
std::vector<std::vector<int>> badchannels(modules.size());
|
||||
int nchan = modules[0]->getNumberOfChannels().x;
|
||||
if (shm()->detType == MYTHEN3) {
|
||||
// assuming single counter
|
||||
@ -2000,16 +2001,9 @@ void DetectorImpl::setBadChannels(const std::vector<int> list, Positions pos) {
|
||||
std::to_string(badchannel) +
|
||||
" out of bounds.");
|
||||
}
|
||||
if (badchannels.size() != imod + 1) {
|
||||
badchannels.push_back(std::vector<int>{});
|
||||
}
|
||||
badchannels[imod].push_back(ch);
|
||||
}
|
||||
for (size_t imod = 0; imod != modules.size(); ++imod) {
|
||||
// add empty vector if no bad channels in this module
|
||||
if (badchannels.size() != imod + 1) {
|
||||
badchannels.push_back(std::vector<int>{});
|
||||
}
|
||||
Parallel(&Module::setBadChannels, {static_cast<int>(imod)},
|
||||
badchannels[imod]);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define APIGOTTHARD "developer 0x240207"
|
||||
#define APIGOTTHARD2 "developer 0x240207"
|
||||
#define APIJUNGFRAU "developer 0x240207"
|
||||
#define APIMYTHEN3 "developer 0x240207"
|
||||
#define APIMOENCH "developer 0x240207"
|
||||
#define APIXILINXCTB "developer 0x240207"
|
||||
#define APIEIGER "developer 0x240207"
|
||||
#define APIMOENCH "developer 0x240703"
|
||||
#define APIMYTHEN3 "developer 0x240715"
|
||||
|
Loading…
x
Reference in New Issue
Block a user