wcs_to_dq

jwst.msaflagopen.msaflag_open.wcs_to_dq(wcs_array, flag)[source]

Create a DQ subarray corresponding to a failed open slitlet.

The created array has the value flag wherever the WCS coordinates are valid (non-NaN) and 0 otherwise.

Parameters:
wcs_arraytuple of ndarray

Image coordinates for the failed open region.

flagint

DQ flag to set.

Returns:
dqndarray of int

Output DQ array.