processing_library/fourier_transforms/fft_support.py
def fft(a):
    """ Fourier transformation from image to grid space
    
    .. note::
    
        If there are four axes then the last outer axes are not transformed

    :param a: image in `lm` coordinate space
    :return: `uv` grid
    """

    if pyfftw_exists == False:
        if (len(a.shape) == 4):
            return numpy.fft.fftshift(numpy.fft.fft2(numpy.fft.ifftshift(a, axes=[2, 3])), axes=[2, 3])
        if (len(a.shape) == 5):
            return numpy.fft.fftshift(numpy.fft.fft2(numpy.fft.ifftshift(a, axes=[3, 4])), axes=[3, 4])
        else:
            return numpy.fft.fftshift(numpy.fft.fft2(numpy.fft.ifftshift(a)))
    else:
        if (len(a.shape) == 4):
            b = pyfftw.interfaces.numpy_fft.fftshift(
                pyfftw.interfaces.numpy_fft.fft2(pyfftw.interfaces.numpy_fft.ifftshift(a, axes=[2, 3]),
                                                 auto_align_input=False, planner_effort='FFTW_MEASURE', threads=nthread), axes=[2, 3])
        if (len(a.shape) == 5):
            b = pyfftw.interfaces.numpy_fft.fftshift(
                pyfftw.interfaces.numpy_fft.fft2(pyfftw.interfaces.numpy_fft.ifftshift(a, axes=[3, 4]),
                                                 auto_align_input=False, planner_effort='FFTW_MEASURE', threads=nthread), axes=[3, 4])
        else:
            b = pyfftw.interfaces.numpy_fft.fftshift(
                pyfftw.interfaces.numpy_fft.fft2(pyfftw.interfaces.numpy_fft.ifftshift(a), auto_align_input=False, threads=nthread,
                                                 planner_effort='FFTW_MEASURE'))
        return b
 Fourier transformation from image to grid space
    
    .. note::
    
        If there are four axes then the last outer axes are not transformed

    :param a: image in `lm` coordinate space
    :return: `uv` grid
    
Fourier transformation from image to grid space
note:.

If there are four axes then the last outer axes are not transformed
Fourier transformation from image to grid space note : . If there are four axes then the last outer axes are not transformed
def fft(a):
    if pyfftw_exists == False:
        if (len(a.shape) == 4):
            return numpy.fft.fftshift(numpy.fft.fft2(numpy.fft.ifftshift(a, axes=[2, 3])), axes=[2, 3])
        if (len(a.shape) == 5):
            return numpy.fft.fftshift(numpy.fft.fft2(numpy.fft.ifftshift(a, axes=[3, 4])), axes=[3, 4])
        else:
            return numpy.fft.fftshift(numpy.fft.fft2(numpy.fft.ifftshift(a)))
    else:
        if (len(a.shape) == 4):
            b = pyfftw.interfaces.numpy_fft.fftshift(
                pyfftw.interfaces.numpy_fft.fft2(pyfftw.interfaces.numpy_fft.ifftshift(a, axes=[2, 3]),
                                                 auto_align_input=False, planner_effort='FFTW_MEASURE', threads=nthread), axes=[2, 3])
        if (len(a.shape) == 5):
            b = pyfftw.interfaces.numpy_fft.fftshift(
                pyfftw.interfaces.numpy_fft.fft2(pyfftw.interfaces.numpy_fft.ifftshift(a, axes=[3, 4]),
                                                 auto_align_input=False, planner_effort='FFTW_MEASURE', threads=nthread), axes=[3, 4])
        else:
            b = pyfftw.interfaces.numpy_fft.fftshift(
                pyfftw.interfaces.numpy_fft.fft2(pyfftw.interfaces.numpy_fft.ifftshift(a), auto_align_input=False, threads=nthread,
                                                 planner_effort='FFTW_MEASURE'))
        return b
def fft ( a ) : if pyfftw_exists == False : if ( len ( a . shape ) == 4 ) : return numpy . fft . fftshift ( numpy . fft . fft2 ( numpy . fft . ifftshift ( a , axes = [ 2 , 3 ] ) ) , axes = [ 2 , 3 ] ) if ( len ( a . shape ) == 5 ) : return numpy . fft . fftshift ( numpy . fft . fft2 ( numpy . fft . ifftshift ( a , axes = [ 3 , 4 ] ) ) , axes = [ 3 , 4 ] ) else : return numpy . fft . fftshift ( numpy . fft . fft2 ( numpy . fft . ifftshift ( a ) ) ) else : if ( len ( a . shape ) == 4 ) : b = pyfftw . interfaces . numpy_fft . fftshift ( pyfftw . interfaces . numpy_fft . fft2 ( pyfftw . interfaces . numpy_fft . ifftshift ( a , axes = [ 2 , 3 ] ) , auto_align_input = False , planner_effort = 'FFTW_MEASURE' , threads = nthread ) , axes = [ 2 , 3 ] ) if ( len ( a . shape ) == 5 ) : b = pyfftw . interfaces . numpy_fft . fftshift ( pyfftw . interfaces . numpy_fft . fft2 ( pyfftw . interfaces . numpy_fft . ifftshift ( a , axes = [ 3 , 4 ] ) , auto_align_input = False , planner_effort = 'FFTW_MEASURE' , threads = nthread ) , axes = [ 3 , 4 ] ) else : b = pyfftw . interfaces . numpy_fft . fftshift ( pyfftw . interfaces . numpy_fft . fft2 ( pyfftw . interfaces . numpy_fft . ifftshift ( a ) , auto_align_input = False , threads = nthread , planner_effort = 'FFTW_MEASURE' ) ) return b
Fourier transformation from image to grid space
.. note::
Fourier transformation from image to grid space .. note ::
""" Fourier transformation from image to grid space
    
    .. note::
    
        If there are four axes then the last outer axes are not transformed

    :param a: image in `lm` coordinate space
    :return: `uv` grid
    """
None
a
image in `lm` coordinate space
image in ` lm ` coordinate space