calculate_clipping

sunpy.image.coalignment.calculate_clipping(y, x)[source] [edit on github]

Return the upper and lower clipping values for the y and x directions.

Parameters:
Returns:

clipping (tuple) – The tuple is of the form ([y0, y1], [x0, x1]). The number of (integer) pixels that need to be clipped off at each edge in an image. The first element in the tuple is a list that gives the number of pixels to clip in the y-direction. The first element in that list is the number of rows to clip at the lower edge of the image in y. The clipped image has “clipping[0][0]” rows removed from its lower edge when compared to the original image. The second element in that list is the number of rows to clip at the upper edge of the image in y. The clipped image has “clipping[0][1]” rows removed from its upper edge when compared to the original image. The second element in the “clipping” tuple applies similarly to the x-direction (image columns). The parameters y0, y1, x0, x1 have the type Quantity.