public static class Mapping.Interpolator extends Object
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.Modifier and Type | Method and Description |
---|---|
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.
|
public static Mapping.Interpolator nearest()
public static Mapping.Interpolator linear()
public static Mapping.Interpolator sinc(int npix)
sinc(pi*x)
1-dimensional kernel.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.public static Mapping.Interpolator sincSinc(int npix, double width)
sinc(pi*x).sinc(k*pi*x)
1-dimensional kernel.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.public static Mapping.Interpolator sincCos(int npix, double width)
sinc(pi*x).cos(k*pi*x)
1-dimensional kernel.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.public static Mapping.Interpolator somb(int npix)
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).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.public static Mapping.Interpolator sombCos(int npix, double width)
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).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.public static Mapping.Interpolator sincGauss(int npix, double fwhm)
sinc(pi*x).exp(-k*x*x)
1-dimensional kernel.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.public static Mapping.Interpolator blockAve(int npix)
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.public static Mapping.Interpolator ukern1(Ukern1Calculator ukern1er, int npix)
ukern1er
- a Ukern1Calculator object which defines a
1-dimensional kernel functionnpix
- 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.public static Mapping.Interpolator uinterp(UinterpCalculator uinterper)
uinterper
- a UinterpCalculator object which defines a generic
resampling functionCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.