Reintroduced changes having confirmed segmentation fault unrelated to changes made for CM correction - still confirming CM correction for Jungfrau correct.

This commit is contained in:
paton_k 2024-02-01 15:29:21 +01:00
parent 5caf1966fb
commit 88e6b9685e
2 changed files with 8 additions and 8 deletions

View File

@ -19,7 +19,7 @@ class commonModeSubtractionSuperColumnJF : public commonModeSubtraction {
mean2[iroi] += val * val; mean2[iroi] += val * val;
nCm[iroi]++; nCm[iroi]++;
if (nCm[iroi] > 64*256) if (nCm[iroi] > 64*256)
std::cout << "Too many pixels added " << nCm[iroi] << std::endl std::cout << "Too many pixels added " << nCm[iroi] << std::endl;
} }
}; };
@ -27,8 +27,6 @@ class commonModeSubtractionSuperColumnJF : public commonModeSubtraction {
virtual commonModeSubtractionSuperColumnJF *Clone() { virtual commonModeSubtractionSuperColumnJF *Clone() {
return new commonModeSubtractionSuperColumnJF(); return new commonModeSubtractionSuperColumnJF();
}; };
}; };

View File

@ -2,11 +2,11 @@
// Copyright (C) 2021 Contributors to the SLS Detector Package // Copyright (C) 2021 Contributors to the SLS Detector Package
//#include "sls/ansi.h" //#include "sls/ansi.h"
#include <iostream> #include <iostream>
//enable common mode subtraction //enable common mode subtraction
//#define CMS //#define CMS
//disable common mode subtraction //disable common mode subtraction
//#undef CMS #undef CMS
#undef CORR #undef CORR
#define C_GHOST 0.0004 #define C_GHOST 0.0004
@ -184,11 +184,13 @@ int main(int argc, char *argv[]) {
cout << "Nframes is " << nframes << endl; cout << "Nframes is " << nframes << endl;
uint32_t nnx, nny; uint32_t nnx, nny;
// commonModeSubtraction *cm = NULL; //commonModeSubtraction *cm = NULL;
//#ifdef CMS //#ifdef CMS
// cm = new commonModeSubtractionSuperColumnJF(); //cm = new commonModeSubtractionSuperColumnJF();
// std::cout << "Enabled common mode subtraction" << std::endl; //std::cout << "Enabled common mode subtraction" << std::endl;
//#endif //#endif
//singlePhotonDetector *filter = new singlePhotonDetector(
// decoder, 3, nsigma, 1, cm, nped, 200, -1, -1, gainmap, NULL);
singlePhotonDetector *filter = new singlePhotonDetector( singlePhotonDetector *filter = new singlePhotonDetector(
decoder, 3, nsigma, 1, NULL, nped, 200, -1, -1, gainmap, NULL); decoder, 3, nsigma, 1, NULL, nped, 200, -1, -1, gainmap, NULL);