uk.ac.starlink.ast
Class Mapping.Spreader

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

public static class Mapping.Spreader
extends Object

Controls the spreading scheme used by Mapping's rebinning methods. This class has no public constructors, but provides static factory methods which generate Spreader objects that can be passed to the rebin* methods.


Method Summary
static Mapping.Spreader gauss(int npix, double fwhm)
          Returns a resampling spreader which uses a exp(-k*x*x) 1-dimensional kernel.
static Mapping.Spreader linear()
          Returns a resampling spreader which samples using linear interpolation.
static Mapping.Spreader nearest()
          Returns a resampling spreader which samples from the nearest neighbour.
static Mapping.Spreader sinc(int npix)
          Returns a resampling spreader which uses a sinc(pi*x) 1-dimensional kernel.
static Mapping.Spreader sincCos(int npix, double width)
          Returns a resampling spreader which uses a sinc(pi*x).cos(k*pi*x) 1-dimensional kernel.
static Mapping.Spreader sincGauss(int npix, double fwhm)
          Returns a resampling spreader which uses a sinc(pi*x).exp(-k*x*x) 1-dimensional kernel.
static Mapping.Spreader sincSinc(int npix, double width)
          Returns a resampling spreader which uses a sinc(pi*x).sinc(k*pi*x) 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.Spreader nearest()
Returns a resampling spreader which samples from the nearest neighbour.

Returns:
a nearest-neighbour resampling Spreader

linear

public static Mapping.Spreader linear()
Returns a resampling spreader which samples using linear interpolation.

Returns:
a linear interpolation resampling Spreader

sinc

public static Mapping.Spreader sinc(int npix)
Returns a resampling spreader 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 Spreader

sincSinc

public static Mapping.Spreader sincSinc(int npix,
                                        double width)
Returns a resampling spreader 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 Spreader

sincCos

public static Mapping.Spreader sincCos(int npix,
                                       double width)
Returns a resampling spreader 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 Spreader

sincGauss

public static Mapping.Spreader sincGauss(int npix,
                                         double fwhm)
Returns a resampling spreader 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 Spreader

gauss

public static Mapping.Spreader gauss(int npix,
                                     double fwhm)
Returns a resampling spreader which uses a 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.
fwhm - the full width at half maximum of the Gaussian envelope. Should be at least 0.1.
Returns:
a Gauss-type resampling Spreader


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