uk.ac.starlink.ast
Class Mapping.Interpolator

java.lang.Object
  extended by uk.ac.starlink.ast.Mapping.Interpolator
Enclosing class:
Mapping

public static class Mapping.Interpolator
extends Object

Controls the interpolation scheme used by Mapping's resampling methods. This class has no public constructors, but provides static factory methods which generate Interpolator objects that can be passed to the resample* methods. There are a number of standard schemes, and users may supply their own by implementing the Ukern1Calculator or UinterpCalculator interfaces.


Method Summary
static Mapping.Interpolator blockAve(int npix)
          Returns a block averaging resampling interpolator.
static Mapping.Interpolator linear()
          Returns a resampling interpolator which does linear interpolation.
static Mapping.Interpolator nearest()
          Returns a resampling interpolator which does nearest-neighbour 'interpolation'.
static Mapping.Interpolator sinc(int npix)
          Returns a resampling interpolator which uses a sinc(pi*x) 1-dimensional kernel.
static Mapping.Interpolator sincCos(int npix, double width)
          Returns a resampling interpolator which uses a sinc(pi*x).cos(k*pi*x) 1-dimensional kernel.
static Mapping.Interpolator sincGauss(int npix, double fwhm)
          Returns a resampling interpolator which uses a sinc(pi*x).exp(-k*x*x) 1-dimensional kernel.
static Mapping.Interpolator sincSinc(int npix, double width)
          Returns a resampling interpolator which uses a sinc(pi*x).sinc(k*pi*x) 1-dimensional kernel.
static Mapping.Interpolator somb(int npix)
          Returns a resampling interpolator which uses a somb(pi*x) 1-dimensional kernel (a "sombrero" function).
static Mapping.Interpolator sombCos(int npix, double width)
          Returns a resampling interpolator which uses a somb(pi*x).cos(k*pi*x) 1-dimensional kernel.
static Mapping.Interpolator uinterp(UinterpCalculator uinterper)
          Returns a resampling interpolator which uses a given user-defined generic resampling function.
static Mapping.Interpolator ukern1(Ukern1Calculator ukern1er, int npix)
          Returns a resampling interpolator which uses a given user-defined 1-dimensional kernel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

nearest

public static Mapping.Interpolator nearest()
Returns a resampling interpolator which does nearest-neighbour 'interpolation'.

Returns:
a nearest-neighbour resampling Interpolator

linear

public static Mapping.Interpolator linear()
Returns a resampling interpolator which does linear interpolation.

Returns:
a linear resampling Interpolator

sinc

public static Mapping.Interpolator sinc(int npix)
Returns a resampling interpolator which uses a sinc(pi*x) 1-dimensional kernel.

Parameters:
npix - the number of pixels to contribute to the interpolated result on either side of the interpolation point in each dimension. Execution time increases rapidly with this number. Typically, a value of 2 is appropriate and the minimum value used will be 1. A value of zero or less may be given to indicate that a suitable number of pixels should be calculated automatically.
Returns:
a sinc-type resampling Interpolator

sincSinc

public static Mapping.Interpolator sincSinc(int npix,
                                            double width)
Returns a resampling interpolator which uses a sinc(pi*x).sinc(k*pi*x) 1-dimensional kernel.

Parameters:
npix - the number of pixels to contribute to the interpolated result on either side of the interpolation point in each dimension. Execution time increases rapidly with this number. Typically, a value of 2 is appropriate and the minimum value used will be 1. A value of zero or less may be given to indicate that a suitable number of pixels should be calculated automatically.
width - the number of pixels at which the envelope goes to zero. Should be at least 1.0.
Returns:
a sinc-sinc-type resampling Interpolator

sincCos

public static Mapping.Interpolator sincCos(int npix,
                                           double width)
Returns a resampling interpolator which uses a sinc(pi*x).cos(k*pi*x) 1-dimensional kernel.

Parameters:
npix - the number of pixels to contribute to the interpolated result on either side of the interpolation point in each dimension. Execution time increases rapidly with this number. Typically, a value of 2 is appropriate and the minimum value used will be 1. A value of zero or less may be given to indicate that a suitable number of pixels should be calculated automatically.
width - the number of pixels at which the envelope goes to zero. Should be at least 1.0.
Returns:
a sinc-cos-type resampling Interpolator

somb

public static Mapping.Interpolator somb(int npix)
Returns a resampling interpolator which uses a somb(pi*x) 1-dimensional kernel (a "sombrero" function). x is the pixel offset from the interpolation point and somb(z)=2*1(z)/z (J1 is a Bessel function of the first kind of order 1).

Parameters:
npix - the number of pixels to contribute to the interpolated result on either side of the interpolation point in each dimension. Execution time increases rapidly with this number. Typically, a value of 2 is appropriate and the minimum value used will be 1. A value of zero or less may be given to indicate that a suitable number of pixels should be calculated automatically.
Returns:
a somb-type resampling Interpolator

sombCos

public static Mapping.Interpolator sombCos(int npix,
                                           double width)
Returns a resampling interpolator which uses a somb(pi*x).cos(k*pi*x) 1-dimensional kernel. k is a constant, out to the point where cos(k*pi*x) goes to zero, and zero beyond, and somb(z)=2*1(z)/z (J1 is a Bessel function of the first kind of order 1).

Parameters:
npix - the number of pixels to contribute to the interpolated result on either side of the interpolation point in each dimension. Execution time increases rapidly with this number. Typically, a value of 2 is appropriate and the minimum value used will be 1. A value of zero or less may be given to indicate that a suitable number of pixels should be calculated automatically.
width - the number of pixels at which the envelope goes to zero. Should be at least 1.0.
Returns:
a sinc-cos-type resampling Interpolator

sincGauss

public static Mapping.Interpolator sincGauss(int npix,
                                             double fwhm)
Returns a resampling interpolator which uses a sinc(pi*x).exp(-k*x*x) 1-dimensional kernel.

Parameters:
npix - the number of pixels to contribute to the interpolated result on either side of the interpolation point in each dimension. Execution time increases rapidly with this number. Typically, a value of 2 is appropriate and the minimum value used will be 1. A value of zero or less may be given to indicate that a suitable number of pixels should be calculated automatically.
fwhm - the full width at half maximum of the Gaussian envelope. Should be at least 0.1.
Returns:
a sinc-Gauss-type resampling Interpolator

blockAve

public static Mapping.Interpolator blockAve(int npix)
Returns a block averaging resampling interpolator.

Parameters:
npix - the number of pixels to contribute to the interpolated result on either side of the interpolation point in each dimension. Execution time increases rapidly with this number.
Returns:
a block averaging resampling Interpolator

ukern1

public static Mapping.Interpolator ukern1(Ukern1Calculator ukern1er,
                                          int npix)
Returns a resampling interpolator which uses a given user-defined 1-dimensional kernel.

Parameters:
ukern1er - a Ukern1Calculator object which defines a 1-dimensional kernel function
npix - the number of pixels to contribute to the interpolated result on either side of the interpolation point in each dimension. Execution time increases rapidly with this number. Typically, a value of 2 is appropriate and the minimum value used will be 1. A value of zero or less may be given to indicate that a suitable number of pixels should be calculated automatically.
Returns:
a user 1-d kernel resampling Interpolator

uinterp

public static Mapping.Interpolator uinterp(UinterpCalculator uinterper)
Returns a resampling interpolator which uses a given user-defined generic resampling function.

Parameters:
uinterper - a UinterpCalculator object which defines a generic resampling function
Returns:
a generic user-defined resampling Interpolator


Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.