Skip to content

Commit 0368412

Browse files
committed
add pathological check on small q_orig scaling
1 parent cd921e7 commit 0368412

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sbncode/WireMod/Utility/WireModUtility.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,9 @@ void sys::WireModUtility::ModifyROI(std::vector<float> & roi_data,
663663
if (verbose)
664664
std::cout << "WARNING: obtained q_mod = NaN... setting scale to 0" << std::endl;
665665
scale_ratio = 0.0;
666+
} else if (q_orig < 0.01) { // check that this is a sane limit
667+
std::cout << "WARNING: obtained q_orig < 0.01 ... setting scale to 1" << std::endl;
668+
scale_ratio = 1.0;
666669
} else {
667670
scale_ratio = q_mod / q_orig;
668671
}

0 commit comments

Comments
 (0)