clip_output

sofia_redux.toolkit.image.utilities.clip_output(original, warped, mode, cval, clip)[source]

Clip the array to the range of original values.

This operation is performed in-place, and only if clip is True.

Parameters:
originalnumpy.ndarray

The original data array values.

warpednumpy.ndarray

The warped data array values.

modestr

Can take values of {‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’} for which points outside the boundaries of the input are filled according to the given mode. Modes match the behaviour of np.pad().

cvalfloat

Used in conjunction with mode ‘constant’, the value outside the image boundaries.

clipbool

Whether to clip the output to the range of values of the input image. This is enabled by default, since higher order interpolation may produce values outside the given input range.

Returns:
None