zoomnd

image_registration.fft_tools.zoom.zoomnd(inp, offsets=(), middle_convention=<class 'float'>, **kwargs)[source]

Zoom in to the center of a 1D or 2D array using Fourier upsampling (in principle, should work on N-dimensions, but does not at present!)

Parameters:
inpnp.ndarray

Input 1D array

offsetstuple of floats

Offset from center in original pixel units

middle_conventionfunction

What convention to use for the “Middle” of the array. Should be either float (i.e., can be half-pixel), floor, or ceil. I don’t think round makes a ton of sense… should just be ceil.

usfacint

Upsampling factor (passed to zoom_on_pixel())

outshapeint

Number of pixels in output array (passed to zoom_on_pixel())

Returns:
The input array upsampled by a factor usfac with size outshape.
If return_xouts, returns a tuple (xvals, zoomed)
Other Parameters:
return_xoutsbool

Return the X indices of the output array in addition to the scaled array (passed to zoom_on_pixel())

return_realbool

Return the real part of the zoomed array (if True) or the complex (passed to zoom_on_pixel())