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:
- current4-tuple of float
Current extent of the image.
- roi4-tuple of 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.