processing_library/fourier_transforms/convolutional_gridding.py
def frac_coord(npixel, kernel_oversampling, p):
    """ Compute whole and fractional parts of coordinates, rounded to
    kernel_oversampling-th fraction of pixel size

    The fractional values are rounded to nearest 1/kernel_oversampling pixel value. At
    fractional values greater than (kernel_oversampling-0.5)/kernel_oversampling coordinates are
    rounded to next integer index.

    :param npixel: Number of pixels in total
    :param kernel_oversampling: Fractional values to round to
    :param p: Coordinate in range [-.5,.5[
    """
    assert numpy.array(p >= -0.5).all() and numpy.array(
        p < 0.5).all(), "Cellsize is too large: uv overflows grid uv= %s" % str(p)
    x = npixel // 2 + p * npixel
    flx = numpy.floor(x + 0.5 / kernel_oversampling)
    fracx = numpy.around((x - flx) * kernel_oversampling)
    return flx.astype(int), fracx.astype(int)
 Compute whole and fractional parts of coordinates, rounded to
    kernel_oversampling-th fraction of pixel size

    The fractional values are rounded to nearest 1/kernel_oversampling pixel value. At
    fractional values greater than (kernel_oversampling-0.5)/kernel_oversampling coordinates are
    rounded to next integer index.

    :param npixel: Number of pixels in total
    :param kernel_oversampling: Fractional values to round to
    :param p: Coordinate in range [-.5,.5[
    
Compute whole and fractional parts of coordinates, rounded to
kernel_oversampling-th fraction of pixel size

The fractional values are rounded to nearest 1/kernel_oversampling pixel value. At
fractional values greater than (kernel_oversampling-0.5)/kernel_oversampling coordinates are
rounded to next integer index.
Compute whole and fractional parts of coordinates rounded to kernel_oversampling - th fraction of pixel size The fractional values are rounded to nearest 1 / kernel_oversampling pixel value . At fractional values greater than ( kernel_oversampling - 0 . 5 ) / kernel_oversampling coordinates are rounded to next integer index .
def frac_coord(npixel, kernel_oversampling, p):
    assert numpy.array(p >= -0.5).all() and numpy.array(
        p < 0.5).all(), "Cellsize is too large: uv overflows grid uv= %s" % str(p)
    x = npixel // 2 + p * npixel
    flx = numpy.floor(x + 0.5 / kernel_oversampling)
    fracx = numpy.around((x - flx) * kernel_oversampling)
    return flx.astype(int), fracx.astype(int)
def frac_coord ( npixel , kernel_oversampling , p ) : assert numpy . array ( p >= - 0.5 ) . all ( ) and numpy . array ( p < 0.5 ) . all ( ) , "Cellsize is too large: uv overflows grid uv= %s" % str ( p ) x = npixel // 2 + p * npixel flx = numpy . floor ( x + 0.5 / kernel_oversampling ) fracx = numpy . around ( ( x - flx ) * kernel_oversampling ) return flx . astype ( int ) , fracx . astype ( int )
Compute whole and fractional parts of coordinates, rounded to
kernel_oversampling-th fraction of pixel size
Compute whole and fractional parts of coordinates rounded to kernel_oversampling - th fraction of pixel size
""" Compute whole and fractional parts of coordinates, rounded to
    kernel_oversampling-th fraction of pixel size

    The fractional values are rounded to nearest 1/kernel_oversampling pixel value. At
    fractional values greater than (kernel_oversampling-0.5)/kernel_oversampling coordinates are
    rounded to next integer index.

    :param npixel: Number of pixels in total
    :param kernel_oversampling: Fractional values to round to
    :param p: Coordinate in range [-.5,.5[
    """
npixel
Number of pixels in total
Number of pixels in total
kernel_oversampling
Fractional values to round to
Fractional values to round to
p
Coordinate in range [-.5,.5[
Coordinate in range [ - . 5 . 5 [