From 83e47577b8b276ebf517fc588a15d0ee12e34f9f Mon Sep 17 00:00:00 2001 From: redford_s Date: Wed, 29 Nov 2017 15:38:07 +0100 Subject: [PATCH] If map(s) do not exist, put global averages. --- JFMC_CalibWriter.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/JFMC_CalibWriter.cpp b/JFMC_CalibWriter.cpp index 4004355..c0f01ba 100644 --- a/JFMC_CalibWriter.cpp +++ b/JFMC_CalibWriter.cpp @@ -141,6 +141,7 @@ int main(int argc, char* argv[]) { // load existing values into maps // if the map exists but the calibration is missing, mask pixel + // if the map doesn't exist, put the global default value if (FL_HG0_gain_map) { if (FL_HG0_gain_map->GetBinContent((i%NC)+1,(i/NC)+1) != 0) { @@ -148,6 +149,8 @@ int main(int argc, char* argv[]) { } else { maskmap->SetBinContent(i%NC,i/NC,1); } + } else { + mapsObject->hg0VALs[i] = 100.; } if (FL_G0_gain_map) { @@ -156,6 +159,8 @@ int main(int argc, char* argv[]) { } else { maskmap->SetBinContent(i%NC,i/NC,1); } + } else { + mapsObject->g0VALs[i] = 40; } if (DB_ratio_map) { @@ -164,6 +169,8 @@ int main(int argc, char* argv[]) { } else { maskmap->SetBinContent(i%NC,i/NC,1); } + } else { + mapsObject->g1VALs[i] = -1.4; } if (CS_ratio_map) { @@ -172,6 +179,8 @@ int main(int argc, char* argv[]) { } else { maskmap->SetBinContent(i%NC,i/NC,1); } + } else { + mapsObject->g2VALs[i] = -0.1; } @@ -246,9 +255,9 @@ int main(int argc, char* argv[]) { for (int i = 0; i < NCH; i++) { - // crazy value check: replace with default + // crazy value check: replace with module default // think of a way to get the limits better - // do not give masked pixels the default vals, keep them masked + // do not give masked pixels the module default vals, keep them masked if (mapsObject->hg0VALs[i] < 80 || mapsObject->hg0VALs[i] > 120) { if (mapsObject->hg0VALs[i] != 0) {