mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@49 113b152e-814d-439b-b186-022a431db7b5
This commit is contained in:
@ -18,7 +18,7 @@ class moench02ModuleData : public slsReceiverData<uint16_t> {
|
||||
*/
|
||||
|
||||
|
||||
moench02ModuleData(double c=0): slsReceiverData<uint16_t>(160, 160, 40, 1286),
|
||||
moench02ModuleData(double c=0): slsReceiverData<uint16_t>(160, 160, 40, 1286),
|
||||
xtalk(c) {
|
||||
|
||||
|
||||
@ -66,6 +66,9 @@ class moench02ModuleData : public slsReceiverData<uint16_t> {
|
||||
setDataMap(dMap);
|
||||
setDataMask(dMask);
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -129,45 +132,6 @@ class moench02ModuleData : public slsReceiverData<uint16_t> {
|
||||
|
||||
};
|
||||
|
||||
class moench02OversampledData : public moench02ModuleData {
|
||||
public:
|
||||
moench02OversampledData(int nos, int off=0): moench02ModuleData(), nSamples(nos), offset(off){};
|
||||
|
||||
/**
|
||||
returns the pixel value as double correcting for the output buffer crosstalk
|
||||
\param data pointer to the memory
|
||||
\param ix coordinate in the x direction
|
||||
\param iy coordinate in the y direction
|
||||
\returns channel value as double
|
||||
|
||||
*/
|
||||
double getValue(char *data, int ix, int iy=0) {
|
||||
double v=0, is=0;
|
||||
int ix1, iy1, isc=ix/40, ip=ix%40, ip1=iy*nSamples*40+ix;
|
||||
|
||||
if (iy*nSamples<160) {
|
||||
for (int i=offset; i<nSamples; i++) {
|
||||
ip1=iy*nSamples*40+ip*nSamples+i-1;
|
||||
iy1=ip1/40;
|
||||
ix1=ip1%40+isc*40;
|
||||
if (ix1>=0 && iy1>=0 && ix1<160 && iy1<160) {
|
||||
v+=moench02ModuleData::getValue(data,ix1,iy1);
|
||||
is++;
|
||||
}
|
||||
}
|
||||
if (is>0)
|
||||
v/=is;
|
||||
}
|
||||
|
||||
return v;
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
int nSamples;
|
||||
int offset;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user