magneticScattering.dft.calc_params_from_roi#
- calc_params_from_roi(current, roi, datashape)#
Given the current extent of the image and the desired roi to upsample, the appropriate offset and upsample values are provided.
- Parameters:
- currenttuple[float, float, float, float]
Current extent of the image.
- roituple[float, float, float, float]
Desired roi.
- datashapetuple of int
Desired shape of the data.
- Returns:
- offset, upsampletuple of float
Offset and upsample values that will yield the desired roi when the discrete Fourier transform is calculated.