From dfcb43b33002d9bdb4a096e97bdd78c1a12f8275 Mon Sep 17 00:00:00 2001 From: bergamaschi Date: Fri, 4 Nov 2011 13:26:01 +0000 Subject: [PATCH] Bad channel correction fixed git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@44 951219d9-93cf-4727-9268-0efd64621fa3 --- slsDetectorSoftware/slsDetector/slsDetector.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 66be2725f..b56306697 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -3660,7 +3660,7 @@ int slsDetector::setBadChannelCorrection(string fname){ #endif if (fname=="") { - thisDetector->correctionMask&=~(1<< DISCARD_BAD_CHANNELS); + thisDetector->correctionMask&=~(1<nBadChans=0; } else { if (fname=="default") @@ -6102,9 +6102,10 @@ int slsDetector::addToMerging(float *p1, float *v1, float *e1, float *mp, float if (thisDetector->angDirection>0) { for (int ip=0; ipnChans*thisDetector->nChips*thisDetector->nMods; ip++) { - if (thisDetector->correctionMask&DISCARD_BAD_CHANNELS) { - if (badChannelMask[ip]) + if ((thisDetector->correctionMask)&(1<< DISCARD_BAD_CHANNELS)) { + if (badChannelMask[ip]) { continue; + } } imod=ip/(thisDetector->nChans*thisDetector->nChips); if (p1) @@ -6133,10 +6134,11 @@ int slsDetector::addToMerging(float *p1, float *v1, float *e1, float *mp, float } else { for (int ip=thisDetector->nChans*thisDetector->nChips*thisDetector->nMods-1; ip>=0; ip--) { - if (thisDetector->correctionMask&(1<< DISCARD_BAD_CHANNELS)) { - if (badChannelMask[ip]) - continue; - } + if ((thisDetector->correctionMask)&(1<< DISCARD_BAD_CHANNELS)) { + if (badChannelMask[ip]) + continue; + + } while (binmacorrectionMask==0 && delflag==1) { - //cout << "line 6570----" << endl; writeDataFile (fname+string(".raw"), fdata, NULL, NULL, 'i'); delete [] fdata;