From eee5f7f74301334f5b2e6ee5054456bf476ad4a6 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Thu, 20 Feb 2014 13:24:52 +0000 Subject: [PATCH] gotthard works for short frame git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@44 113b152e-814d-439b-b186-022a431db7b5 --- slsDetectorCalibration/gotthardModuleData.h | 48 ++----- .../gotthardShortModuleData.h | 128 ++++++++++++++++++ slsDetectorCalibration/slsDetectorData.h | 1 - 3 files changed, 138 insertions(+), 39 deletions(-) create mode 100644 slsDetectorCalibration/gotthardShortModuleData.h diff --git a/slsDetectorCalibration/gotthardModuleData.h b/slsDetectorCalibration/gotthardModuleData.h index d7aa9ba6a..bd1d8280a 100644 --- a/slsDetectorCalibration/gotthardModuleData.h +++ b/slsDetectorCalibration/gotthardModuleData.h @@ -8,8 +8,7 @@ #define Y_PIXELS 1 #define NPACKETS 2 #define BUFFERSIZE 1286 -#define NUMPACKETS 2 -#define NUMSHORTPACKETS 1 + #define FRAMEMASK 0xFFFFFFFE #define PACKETMASK 1 #define FRAMEOFFSET 0x1 @@ -29,12 +28,7 @@ public: */ - gotthardModuleData(double c=0, int s=-1): slsReceiverData(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c),shortFrame(s) { - - if(shortFrame == -1) - shortFrame = 0; - else - shortFrame = 1; + gotthardModuleData(double c=0): slsReceiverData(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c) { uint16_t **dMask; int **dMap; @@ -42,7 +36,6 @@ public: int initial_offset = 2; int offset = initial_offset; - dMask=new uint16_t*[Y_PIXELS]; dMap=new int*[Y_PIXELS]; for (int i = 0; i < Y_PIXELS; i++) { @@ -50,34 +43,21 @@ public: dMask[i] = new uint16_t[X_PIXELS]; } - for(ix=0; ix { +public: + + + + + /** + Implements the slsReceiverData structure for the gotthard short read out by a module i.e. using the slsReceiver + (1x256 pixels, 1 packet 256 large etc.) + \param c crosstalk parameter for the output buffer + + */ + + + gotthardShortModuleData(double c=0): slsReceiverData(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c){ + + uint16_t **dMask; + int **dMap; + int ix, iy; + int offset = 2; + + dMask=new uint16_t*[Y_PIXELS]; + dMap=new int*[Y_PIXELS]; + for (int i = 0; i < Y_PIXELS; i++) { + dMap[i] = new int[X_PIXELS]; + dMask[i] = new uint16_t[X_PIXELS]; + } + + for(ix=0; ix::getValue(data, ix, iy); + else + return slsDetectorData::getValue(data, ix, iy)-xtalk*slsDetectorData::getValue(data, ix-1, iy); + }; + + + + /** sets the output buffer crosstalk correction parameter + \param c output buffer crosstalk correction parameter to be set + \returns current value for the output buffer crosstalk correction parameter + + */ + double setXTalk(double c) {xtalk=c; return xtalk;} + + + /** gets the output buffer crosstalk parameter + \returns current value for the output buffer crosstalk correction parameter + */ + double getXTalk() {return xtalk;} + + + + + + + +private: + + double xtalk; /**