mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
Bad channel correction fixed
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@44 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
9b89333dae
commit
dfcb43b330
@ -3660,7 +3660,7 @@ int slsDetector::setBadChannelCorrection(string fname){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fname=="") {
|
if (fname=="") {
|
||||||
thisDetector->correctionMask&=~(1<< DISCARD_BAD_CHANNELS);
|
thisDetector->correctionMask&=~(1<<DISCARD_BAD_CHANNELS);
|
||||||
thisDetector->nBadChans=0;
|
thisDetector->nBadChans=0;
|
||||||
} else {
|
} else {
|
||||||
if (fname=="default")
|
if (fname=="default")
|
||||||
@ -6102,9 +6102,10 @@ int slsDetector::addToMerging(float *p1, float *v1, float *e1, float *mp, float
|
|||||||
|
|
||||||
if (thisDetector->angDirection>0) {
|
if (thisDetector->angDirection>0) {
|
||||||
for (int ip=0; ip<thisDetector->nChans*thisDetector->nChips*thisDetector->nMods; ip++) {
|
for (int ip=0; ip<thisDetector->nChans*thisDetector->nChips*thisDetector->nMods; ip++) {
|
||||||
if (thisDetector->correctionMask&DISCARD_BAD_CHANNELS) {
|
if ((thisDetector->correctionMask)&(1<< DISCARD_BAD_CHANNELS)) {
|
||||||
if (badChannelMask[ip])
|
if (badChannelMask[ip]) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
imod=ip/(thisDetector->nChans*thisDetector->nChips);
|
imod=ip/(thisDetector->nChans*thisDetector->nChips);
|
||||||
if (p1)
|
if (p1)
|
||||||
@ -6133,10 +6134,11 @@ int slsDetector::addToMerging(float *p1, float *v1, float *e1, float *mp, float
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
for (int ip=thisDetector->nChans*thisDetector->nChips*thisDetector->nMods-1; ip>=0; ip--) {
|
for (int ip=thisDetector->nChans*thisDetector->nChips*thisDetector->nMods-1; ip>=0; ip--) {
|
||||||
if (thisDetector->correctionMask&(1<< DISCARD_BAD_CHANNELS)) {
|
if ((thisDetector->correctionMask)&(1<< DISCARD_BAD_CHANNELS)) {
|
||||||
if (badChannelMask[ip])
|
if (badChannelMask[ip])
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
while (binma<ang) {
|
while (binma<ang) {
|
||||||
ibin++;
|
ibin++;
|
||||||
@ -6566,7 +6568,6 @@ void* slsDetector::processData(int delflag) {
|
|||||||
|
|
||||||
/** write raw data file */
|
/** write raw data file */
|
||||||
if (thisDetector->correctionMask==0 && delflag==1) {
|
if (thisDetector->correctionMask==0 && delflag==1) {
|
||||||
|
|
||||||
//cout << "line 6570----" << endl;
|
//cout << "line 6570----" << endl;
|
||||||
writeDataFile (fname+string(".raw"), fdata, NULL, NULL, 'i');
|
writeDataFile (fname+string(".raw"), fdata, NULL, NULL, 'i');
|
||||||
delete [] fdata;
|
delete [] fdata;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user