repair_image_nonfinite

sunpy.image.coalignment.repair_image_nonfinite(image)[source]

Deprecated since version 1.1: The repair_image_nonfinite function is deprecated and may be removed in version 2.1.

Return a new image in which all the nonfinite entries of the original image have been replaced by the local mean.

Parameters

image (numpy.ndarray) – A two-dimensional numpy.ndarray.

Returns

numpy.ndarray – A two-dimensional numpy.ndarray of the same shape as the input that has all the non-finite entries replaced by a local mean. The algorithm repairs one non-finite entry at every pass. At each pass, the next non-finite value is replaced by the mean of its finite valued nearest neighbors.