qem.zoom
Functions
|
Use the fourier scaling theorem to interpolate (or extrapolate, without raising any exceptions) data. |
|
Zoom in on the center of a 1D or 2D array using Fourier upsampling. |
|
Zoom in on a 1D or 2D array using Fourier upsampling. |
- qem.zoom.zoom_on_pixel(input_array, coordinates, upsample_factor=1, output_shape=None, num_threads=1, use_numpy_fft=False, return_real=True, return_coordinates=False)[source]
Zoom in on a 1D or 2D array using Fourier upsampling.
- Parameters:
(np.ndarray) (input_array)
floats) (coordinates (tuple of)
(int (num_threads)
optional) (
If True
,return the zoomed coordinates along with the zoomed array. Defaults
toFalse.
)ints (output_shape (tuple of)
optional)
(int
optional)
(bool (return_coordinates)
optional)
(bool
optional)
(bool
optional)
- Returns:
zoomed_array (np.ndarray) (
The zoomed array upsampled by `upsampling_factor
with size output_shape.`)coordinates (np.ndarray, optional) (
The coordinates
ofthe zoomed region
,if `return_coordinates
is True.`)
- qem.zoom.zoom_nd(input_array, offsets=(), center_convention=<class 'float'>, **kwargs)[source]
Zoom in on the center of a 1D or 2D array using Fourier upsampling.
- Parameters:
(np.ndarray) (input_array)
floats (offsets (tuple of)
optional) (
Function
to determine the"center"
ofthe array. Defaults
tofloat.
)(function (center_convention)
optional)
**kwargs (
Additional arguments passed
to zoom_on_pixel.)
- Returns:
zoomed_array (np.ndarray) (
The zoomed array upsampled by `upsampling_factor
with size output_shape.`)coordinates (np.ndarray, optional) (
The coordinates
ofthe zoomed region
,if `return_coordinates
is True.`)
- qem.zoom.fourier_interp2d(data, outinds, nthreads=1, use_numpy_fft=False, return_real=True)[source]
Use the fourier scaling theorem to interpolate (or extrapolate, without raising any exceptions) data.
- Parameters:
data (
ndarray
) – The data values of the array to interpolateoutinds (
ndarray
) – The coordinate axis values along which the data should be interpolated CAN BE: ndim x [n,m,…] like np.indices OR (less memory intensive, more processor intensive) ([n],[m],…)