mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
Gainzoom (#556)
* gain plot: dont allow zoom, only zoom on main plot * fixed gain plot zooming * fixing panning for gainplots
This commit is contained in:
@ -2580,13 +2580,21 @@ void *start_timer(void *arg) {
|
||||
{
|
||||
const int npixels = (NCHAN * NCHIP);
|
||||
const int pixelsPerPacket = dataSize / NUM_BYTES_PER_PIXEL;
|
||||
int dataVal = 0;
|
||||
int gainVal = 0;
|
||||
int pixelVal = 0;
|
||||
for (int i = 0; i < npixels; ++i) {
|
||||
// avoiding gain also being divided when gappixels enabled in call
|
||||
// back
|
||||
if (i > 0 && i % pixelsPerPacket == 0) {
|
||||
++pixelVal;
|
||||
if (i % pixelsPerPacket == 0) {
|
||||
++dataVal;
|
||||
}
|
||||
if ((i % 1024) < 300) {
|
||||
gainVal = 1;
|
||||
} else if ((i % 1024) < 600) {
|
||||
gainVal = 2;
|
||||
} else {
|
||||
gainVal = 3;
|
||||
}
|
||||
pixelVal = (dataVal & ~GAIN_VAL_MSK) | (gainVal << GAIN_VAL_OFST);
|
||||
// to debug multi module geometry (row, column) in virtual servers (all pixels
|
||||
// in a module set to particular value)
|
||||
#ifdef TEST_MOD_GEOMETRY
|
||||
|
@ -138,6 +138,9 @@ enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
|
||||
#define MAX_PHASE_SHIFTS (240)
|
||||
#define BIT16_MASK (0xFFFF)
|
||||
|
||||
#define GAIN_VAL_OFST (14)
|
||||
#define GAIN_VAL_MSK (0x3 << GAIN_VAL_OFST)
|
||||
|
||||
// pipeline
|
||||
#define ADC_PORT_INVERT_VAL (0x5A5A5A5A)
|
||||
#define ADC_PORT_INVERT_BOARD2_VAL (0x453b2a9c)
|
||||
|
Reference in New Issue
Block a user