clip_edges¶
-
sunpy.image.coalignment.
clip_edges
(data, yclips: Unit("pix"), xclips: Unit("pix"))[source] [edit on github]¶ Clips off the “y” and “x” edges of a 2D array according to a list of pixel values. This function is useful for removing data at the edge of 2d images that may be affected by shifts from solar de- rotation and layer co- registration, leaving an image unaffected by edge effects.
- Parameters
data (
numpy.ndarray
) – A numpy array of shape(ny, nx)
.yclips (
astropy.units.Quantity
) – The amount to clip in the y-direction of the data. Has units of pixels, and values should be whole non-negative numbers.xclips (
astropy.units.Quantity
) – The amount to clip in the x-direction of the data. Has units of pixels, and values should be whole non-negative numbers.
- Returns
numpy.ndarray
– A 2D image with edges clipped off according toyclips
andxclips
arrays.