processing_library/fourier_transforms/fft_support.py
def extract_oversampled(a, xf, yf, kernel_oversampling, kernelwidth):
    """
    Extract the (xf-th,yf-th) w-kernel from the oversampled parent

    Offsets are suitable for correcting of fractional coordinates,
    e.g. an offset of (xf,yf) results in the kernel for an (-xf,-yf)
    sub-grid offset.

    We do not want to make assumptions about the source grid's symmetry
    here, which means that the grid's side length must be at least
    kernel_oversampling*(npixel+2) to contain enough information in all circumstances

    :param xf:
    :param yf:
    :param a: grid from which to extract
    :param kernel_oversampling: oversampling factor
    :param kernelwidth: size of section
    """

    assert 0 <= xf < kernel_oversampling
    assert 0 <= yf < kernel_oversampling
    # Determine start offset.
    npixela = a.shape[0]
    my = npixela // 2 - kernel_oversampling * (kernelwidth // 2) - yf
    mx = npixela // 2 - kernel_oversampling * (kernelwidth // 2) - xf
    assert mx >= 0 and my >= 0, "mx %d and my %d" % (mx, my)
    # Extract every kernel_oversampling-th pixel
    mid = a[my: my + kernel_oversampling * kernelwidth: kernel_oversampling,
          mx: mx + kernel_oversampling * kernelwidth: kernel_oversampling]
    # normalise
    return kernel_oversampling * kernel_oversampling * mid

    Extract the (xf-th,yf-th) w-kernel from the oversampled parent

    Offsets are suitable for correcting of fractional coordinates,
    e.g. an offset of (xf,yf) results in the kernel for an (-xf,-yf)
    sub-grid offset.

    We do not want to make assumptions about the source grid's symmetry
    here, which means that the grid's side length must be at least
    kernel_oversampling*(npixel+2) to contain enough information in all circumstances

    :param xf:
    :param yf:
    :param a: grid from which to extract
    :param kernel_oversampling: oversampling factor
    :param kernelwidth: size of section
    
Extract the (xf-th,yf-th) w-kernel from the oversampled parent
Offsets are suitable for correcting of fractional coordinates,
e.g. an offset of (xf,yf) results in the kernel for an (-xf,-yf)
sub-grid offset.

We do not want to make assumptions about the source grid's symmetry
here, which means that the grid's side length must be at least
kernel_oversampling*(npixel+2) to contain enough information in all circumstances
Extract the ( xf - th yf - th ) w - kernel from the oversampled parent Offsets are suitable for correcting of fractional coordinates e . g . an offset of ( xf yf ) results in the kernel for an ( - xf - yf ) sub - grid offset . We do not want to make assumptions about the source grid ' s symmetry here which means that the grid ' s side length must be at least kernel_oversampling * ( npixel + 2 ) to contain enough information in all circumstances
def extract_oversampled(a, xf, yf, kernel_oversampling, kernelwidth):
    assert 0 <= xf < kernel_oversampling
    assert 0 <= yf < kernel_oversampling
    npixela = a.shape[0]
    my = npixela // 2 - kernel_oversampling * (kernelwidth // 2) - yf
    mx = npixela // 2 - kernel_oversampling * (kernelwidth // 2) - xf
    assert mx >= 0 and my >= 0, "mx %d and my %d" % (mx, my)
    mid = a[my: my + kernel_oversampling * kernelwidth: kernel_oversampling,
          mx: mx + kernel_oversampling * kernelwidth: kernel_oversampling]
    return kernel_oversampling * kernel_oversampling * mid
def extract_oversampled ( a , xf , yf , kernel_oversampling , kernelwidth ) : assert 0 <= xf < kernel_oversampling assert 0 <= yf < kernel_oversampling npixela = a . shape [ 0 ] my = npixela // 2 - kernel_oversampling * ( kernelwidth // 2 ) - yf mx = npixela // 2 - kernel_oversampling * ( kernelwidth // 2 ) - xf assert mx >= 0 and my >= 0 , "mx %d and my %d" % ( mx , my ) mid = a [ my : my + kernel_oversampling * kernelwidth : kernel_oversampling , mx : mx + kernel_oversampling * kernelwidth : kernel_oversampling ] return kernel_oversampling * kernel_oversampling * mid
Extract the (xf-th,yf-th) w-kernel from the oversampled parent
Offsets are suitable for correcting of fractional coordinates,
e.g.
Extract the ( xf - th yf - th ) w - kernel from the oversampled parent Offsets are suitable for correcting of fractional coordinates e . g .
"""
    Extract the (xf-th,yf-th) w-kernel from the oversampled parent

    Offsets are suitable for correcting of fractional coordinates,
    e.g. an offset of (xf,yf) results in the kernel for an (-xf,-yf)
    sub-grid offset.

    We do not want to make assumptions about the source grid's symmetry
    here, which means that the grid's side length must be at least
    kernel_oversampling*(npixel+2) to contain enough information in all circumstances

    :param xf:
    :param yf:
    :param a: grid from which to extract
    :param kernel_oversampling: oversampling factor
    :param kernelwidth: size of section
    """ # Determine start offset. # Extract every kernel_oversampling-th pixel # normalise
a
grid from which to extract
grid from which to extract
xf
None
yf
None
kernel_oversampling
None
kernelwidth
size of section
size of section