I suggest adding tests that other ways of specifying the mask produce the same answers:
- input weight map with float values == 0 for masked pixels
- input badpix with non-zero values for masked pixels
- combination of the two
- input ImageI weight map with values > 1