As was noted on
DM-29280, and quoting from this comment,
Ok, as for the vignetting mask setting, I think we're currently living in a strange and inconsistent state. As noted above, obs_subaru assigns a NO_DATA plane to the vignetted region of the calibration FLAT (and thus gets propagated via mask OR-ing when the FLAT is applied). On the other hand, the only other place I can find in the codebase where a similar masking is attached to the FLAT is in the CpFlatMeasureTask in cp_pipe, but this function uses the BAD mask plane for the vignette masking (also in the default function parameter setting here and, as a side note, no polygon is passed in, so unless the FLAT has a getValidPolygon() set, this will raise with a RuntimeError). I would think these mask names & definitions should be kept consistent.
And, indeed, they should. obs_subaru has the set the long-standing convention of marking the vignetted region with the NO_DATA mask plane, so the same should be done in cp_pipe.