DM-55282: Add nCrSpanMax configuration to cosmic ray finder for early failure. - #480
DM-55282: Add nCrSpanMax configuration to cosmic ray finder for early failure.#480erykoff wants to merge 2 commits into
Conversation
| nCrSpanMax = pexConfig.Field( | ||
| dtype=int, | ||
| doc="Maximum number of contaminated spans", | ||
| default=100_000, |
There was a problem hiding this comment.
I like the _, but consistency with above... 🫠
| if (spans.size() > nCrSpanMax) { | ||
| throw LSST_EXCEPT(pex::exceptions::LengthError, | ||
| (boost::format("Too many CR spans (max %d)") % nCrSpanMax).str()); | ||
| } |
There was a problem hiding this comment.
I take it the
throw LSST_EXCEPT(pex::exceptions::LengthError,
(boost::format("Too many CR pixels (max %d)") % nCrPixelMax).str());
at line ~410 doesn't trigger often enough. I don't fully follow the code logic here, but if that initial pass is certain to detect a smaller number than the final one, is it worth considering giving it a smaller threshold for "failing fast"?
There was a problem hiding this comment.
Oh wow, I didn't notice that ... this ticket might not be necessary ... in this case that is coming up with 472,977 pixels (first pass) and then later that is much larger.
Maybe we just need to override the max pixels to something less insane than 1,000,000. I mean ... if we ever have 100,000 CR pixels that says something has gone terribly wrong.
No description provided.