If map(s) do not exist, put global averages.

This commit is contained in:
redford_s
2017-11-29 15:38:07 +01:00
parent 52bcba417e
commit 83e47577b8
+11 -2
View File
@@ -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) {