ENH: better error message
ENH: integrate background mask heuristic