From b7a29dff8dc7393190d800ce8c396b6a739cc2b4 Mon Sep 17 00:00:00 2001 From: Anna Bergamaschi Date: Wed, 28 Aug 2024 14:22:39 +0200 Subject: [PATCH] fixed cluster finder bugs --- examples/rawdata.config | 10 ++++----- .../moenchRawDataProcess.cpp | 22 ++++++++++++++----- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/examples/rawdata.config b/examples/rawdata.config index d8cff656b..0230075b8 100644 --- a/examples/rawdata.config +++ b/examples/rawdata.config @@ -5,18 +5,18 @@ nsigma 5 gainfile none detectorMode counting threshold 0 -pedestalfile none +pedestalfile /mnt/sls_det_storage/moench_data/testNewFW20230714/cu_half_speed_d0_f0_4.raw nframes 0 xMin 0 xMax 400 yMin 0 yMax 400 -outdir ./ -indir ./ +outdir /mnt/sls_det_storage/moench_data/testNewFW20230714/clustNew/ +indir /mnt/sls_det_storage/moench_data/testNewFW20230714/ flist none -fformat none +fformat cu_half_speed_d0_f0_4 runmin 0 -runmax -1 +runmax 0 readnrows 400 eMin 0 eMax 16000 diff --git a/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp b/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp index 6ccd39543..24c7fcec1 100644 --- a/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp +++ b/slsDetectorCalibration/moenchExecutables/moenchRawDataProcess.cpp @@ -182,8 +182,8 @@ int main(int argc, char *argv[]) { #endif #ifndef MOENCH04 - moench03v2Data *decoder = new moench03v2Data(100); - cout << "MOENCH03!" << endl; + moench03v2Data *decoder = new moench03v2Data(200); + cout << "MOENCH03 V2!" << endl; #endif #ifdef MOENCH04 @@ -334,7 +334,7 @@ int main(int argc, char *argv[]) { cout << ifr << " " << ff << " " << np << endl; // break; } else { - cout << ifr << " " << ff << " " << np << endl; + cout << "bp "<< ifr << " " << ff << " " << np << endl; break; } ff = -1; @@ -389,7 +389,7 @@ int main(int argc, char *argv[]) { runmax--; flist.close(); cout << "Found " << runmax << " files " << endl; - flist.open (fformat, std::ifstream::in); + flist.open (args["flist"].c_str(), std::ifstream::in); } for (int irun = runmin; irun <= runmax; irun++) { @@ -470,10 +470,20 @@ int main(int argc, char *argv[]) { } } else { cout << "bp " << ifr << " " << ff << " " << np << endl; - - //break; + + break; } ff = -1; + + + if (ifr % 100 == 0){ + sprintf(imgfname, "%s/%s_f%05d_ped.tiff", outdir.c_str(),froot, ifile++); + while (mt->isBusy()) { + ; + } + mt->writePedestal(imgfname); + } + } cout << "--" << endl; filebin.close();