sarkit.cphd.mask_support_array

mask_support_array(array, nodata_hex=None)

Apply a NODATA hex string to a support array to mask the array.

Parameters:
arraynp.ndarray

Support array to compare to NODATA and create a masked array from

nodata_hexstr, optional

If None, all array elements are valid. Otherwise, use the hex string to compare to the values in array to make the mask

Returns:
masked_arrayMaskedArray

array with NODATA elements masked

Notes

If array is a MaskedArray, the mask will be updated and array returned. If array is an ndarray, a MaskedArray wrapping array is returned.