LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Files | |
file | Coord.h |
Functions to handle coordinates. | |
file | Observatory.h |
Class to hold observatory information. | |
file | PsfFormatter.h |
Interface for PsfFormatter class. | |
file | DecoratedImageFormatter.h |
Interface for DecoratedImageFormatter class. | |
file | ExposureFormatter.h |
Interface for ExposureFormatter class. | |
file | ImageFormatter.h |
Interface for ImageFormatter class. | |
file | MaskedImageFormatter.h |
Interface for MaskedImageFormatter class. | |
file | MaskFormatter.h |
Interface for MaskFormatter class. | |
file | TanWcsFormatter.h |
Interface for TanWcsFormatter class. | |
file | WcsFormatter.h |
Interface for WcsFormatter class. | |
file | CudaMemory.h |
Functions and a class to help allocating GPU global memory and transferring data to and from a GPU. | |
file | CudaQueryDevice.h |
Functions to query the properties of currently selected GPU device. | |
file | CudaSelectGpu.h |
Functions to help managing setup for GPU kernels. | |
file | GpuBuffer2D.h |
contains GpuBuffer2D class (for simple handling of images or 2D arrays) | |
file | DevicePreference.h |
Interface for CPU/GPU device selection. | |
file | GpuExceptions.h |
additional GPU exceptions | |
file | IsGpuBuild.h |
A function to determine whether compiling for GPU is enabled. | |
file | ImageSlice.h |
Define a single column or row of an Image. | |
file | ConvolveImage.h |
Convolve and convolveAtAPoint functions for Image and Kernel. | |
file | ConvCpuGpuShared.h |
CPU and GPU convolution shared code. | |
file | convCUDA.h |
GPU convolution code. | |
file | Convolve.h |
Convolution support. | |
file | ConvolveGPU.h |
Convolution support. | |
file | cudaConvWrapper.h |
Set up for convolution, calls GPU convolution kernels. | |
file | CudaLanczos.h |
Declaration of a GPU kernel for image warping and declarations of requred datatypes. | |
file | CudaLanczosWrapper.h |
GPU accelerared image warping. | |
file | PositionFunctor.h |
GPU accelerared image warping. | |
file | detail.h |
An include file to include the header files for lsst::afw::math::detail. | |
file | Function.h |
Define the basic Function classes. | |
file | FunctionLibrary.h |
Define a collection of useful Functions. | |
file | Integrate.h |
Compute 1d and 2d integral. | |
file | Kernel.h |
Declare the Kernel class and subclasses. | |
file | KernelFunctions.h |
Utility functions for kernels. | |
file | minimize.h |
Adaptor for minuit. | |
file | Random.h |
Random number generator class. | |
file | SpatialCell.h |
Class to ensure constraints for spatial modeling. | |
file | Statistics.h |
Compute Image Statistics. | |
file | warpExposure.h |
Support for warping an image to a new WCS. | |
file | Coord.cc |
Provide functions to handle coordinates. | |
file | Observatory.cc |
Provide functions to handle dates. | |
file | PsfFormatter.cc |
Implementation of PsfFormatter class. | |
file | DecoratedImageFormatter.cc |
Implementation of DecoratedImageFormatter class. | |
file | ExposureFormatter.cc |
Implementation of ExposureFormatter class. | |
file | ImageFormatter.cc |
Implementation of ImageFormatter class. | |
file | MaskedImageFormatter.cc |
Implementation of MaskedImageFormatter class. | |
file | MaskFormatter.cc |
Implementation of MaskFormatter class. | |
file | TanWcsFormatter.cc |
Implementation of TanWcsFormatter class. | |
file | WcsFormatter.cc |
Implementation of WcsFormatter class. | |
file | CudaMemory.cc |
Functions to help managing setup for GPU kernels. | |
file | CudaQueryDevice.cc |
Functions to query the properties of currently selected GPU device. | |
file | CudartClose.cc |
Calls cudaThreadExit from a destructor of a global object. | |
file | CudaSelectGpu.cc |
Functions for simplifying selecting GPU device, implementation file. | |
file | DevicePreference.cc |
Implementation file for CPU/GPU device selection. | |
file | Background.cc |
Background estimation class code. | |
file | Background.cc |
Background estimation class code. | |
file | ConvolveImage.cc |
Definition of functions declared in ConvolveImage.h. | |
file | BasicConvolve.cc |
Definition of basicConvolve and convolveWithBruteForce functions declared in detail/ConvolveImage.h. | |
file | BasicConvolveGPU.cc |
Definition of basicConvolveGPU, convolveLinearCombinationGPU and convolveSpatiallyInvariantGPU functions declared in ConvolveGPU.h. | |
file | convCpuGpuShared.cc |
Contains AssertDimensionsOK function. | |
file | ConvolveWithInterpolation.cc |
Definition of convolveWithInterpolation and helper functions declared in detail/ConvolveImage.h. | |
file | cudaConvWrapper.cc |
Set up for convolution, calls GPU convolution kernels. | |
file | cudaLanczosWrapper.cc |
GPU image warping implementation. | |
file | KernelImagesForRegion.cc |
Definition of KernelImagesForRegion class declared in detail/ConvolveImage.h. | |
file | KernelFunctions.cc |
Definitions of members of lsst::afw::math. | |
file | minimize.cc |
Definition of member functions for minuit adaptors. | |
file | Random.cc |
Random number generator implementaion. | |
file | RandomImage.cc |
Fill Images with Random numbers. | |
file | SpatialCell.cc |
Implementation of SpatialCell class. | |
file | Statistics.cc |
Support statistical operations on images. | |
file | warpExposure.cc |
Support for warping an image to a new Wcs. | |
Namespaces | |
lsst | |
< multiple inclusion guard macro | |
Classes | |
class | lsst.afw.gpu::detail::GpuBuffer2D< PixelT > |
Class for representing an image or 2D array in general) More... | |
class | lsst.afw.math::ApproximateControl |
Control how to make an approximation. More... | |
class | lsst.afw.math::Approximate< T > |
Approximate values for a MaskedImage. More... | |
class | lsst.afw.math::ConvolutionControl |
Parameters to control convolution. More... | |
class | lsst.afw.math::Function< ReturnT > |
Basic Function class. More... | |
class | lsst.afw.math::Function1< ReturnT > |
A Function taking one argument. More... | |
class | lsst.afw.math::Function2< ReturnT > |
A Function taking two arguments. More... | |
class | lsst.afw.math::BasePolynomialFunction2< ReturnT > |
Base class for 2-dimensional polynomials of the form: More... | |
class | lsst.afw.math::IntegerDeltaFunction1< ReturnT > |
1-dimensional integer delta function. More... | |
class | lsst.afw.math::IntegerDeltaFunction2< ReturnT > |
2-dimensional integer delta function. More... | |
class | lsst.afw.math::GaussianFunction1< ReturnT > |
1-dimensional Gaussian More... | |
class | lsst.afw.math::GaussianFunction2< ReturnT > |
2-dimensional Gaussian More... | |
class | lsst.afw.math::DoubleGaussianFunction2< ReturnT > |
double Guassian (sum of two Gaussians) More... | |
class | lsst.afw.math::PolynomialFunction1< ReturnT > |
1-dimensional polynomial function. More... | |
class | lsst.afw.math::PolynomialFunction2< ReturnT > |
2-dimensional polynomial function with cross terms More... | |
class | lsst.afw.math::Chebyshev1Function1< ReturnT > |
1-dimensional weighted sum of Chebyshev polynomials of the first kind. More... | |
class | lsst.afw.math::Chebyshev1Function2< ReturnT > |
2-dimensional weighted sum of Chebyshev polynomials of the first kind. More... | |
class | lsst.afw.math::LanczosFunction1< ReturnT > |
1-dimensional Lanczos function More... | |
class | lsst.afw.math::LanczosFunction2< ReturnT > |
2-dimensional separable Lanczos function More... | |
class | lsst.afw.math::Interpolate |
Interpolate values for a set of x,y vector<>s. More... | |
class | lsst.afw.math::Kernel |
Kernels are used for convolution with MaskedImages and (eventually) Images. More... | |
class | lsst.afw.math::FixedKernel |
A kernel created from an Image. More... | |
class | lsst.afw.math::AnalyticKernel |
A kernel described by a function. More... | |
class | lsst.afw.math::DeltaFunctionKernel |
A kernel that has only one non-zero pixel (of value 1) More... | |
class | lsst.afw.math::LinearCombinationKernel |
A kernel that is a linear combination of fixed basis kernels. More... | |
class | lsst.afw.math::SeparableKernel |
A kernel described by a pair of functions: func(x, y) = colFunc(x) * rowFunc(y) More... | |
class | lsst.afw.math::StatisticsControl |
Pass parameters to a Statistics objectA class to pass parameters which control how the stats are calculated. More... | |
class | lsst.afw.math::Statistics |
class | lsst.afw.math::WarpingControl |
Parameters to control convolution. More... | |
class | lsst.afw.detection::PsfFormatter |
Formatter for persistence of Psf instances. More... | |
class | lsst.afw::formatters::DecoratedImageFormatter< ImagePixelT > |
Class implementing persistence and retrieval for DecoratedImages. More... | |
class | lsst.afw::formatters::ExposureFormatter< ImagePixelT, MaskPixelT, VariancePixelT > |
Class implementing persistence and retrieval for Exposures. More... | |
class | lsst.afw::formatters::ImageFormatter< ImagePixelT > |
Class implementing persistence and retrieval for Images. More... | |
class | lsst.afw::formatters::MaskedImageFormatter< ImagePixelT, MaskPixelT, VariancePixelT > |
Class implementing persistence and retrieval for MaskedImages. More... | |
class | lsst.afw::formatters::MaskFormatter< MaskPixelT > |
Class implementing persistence and retrieval for Masks. More... | |
class | lsst.afw::formatters::TanWcsFormatter |
Class implementing persistence and retrieval for TanWcs objects. More... | |
class | lsst.afw::formatters::WcsFormatter |
Class implementing persistence and retrieval for Wcs objects. More... | |
class | lsst.afw.image::ImageSlice< PixelT > |
A class to specify a slice of an image. More... | |
Functions | |
template<typename OutImageT , typename InImageT > | |
OutImageT::SinglePixel | lsst.afw.math::convolveAtAPoint (typename InImageT::const_xy_locator inImageLocator, typename lsst::afw::image::Image< lsst::afw::math::Kernel::Pixel >::const_xy_locator kernelLocator, int kWidth, int kHeight) |
Apply convolution kernel to an image at one point. More... | |
template<typename OutImageT , typename InImageT > | |
OutImageT::SinglePixel | lsst.afw.math::convolveAtAPoint (typename InImageT::const_xy_locator inImageLocator, std::vector< lsst::afw::math::Kernel::Pixel > const &kernelColList, std::vector< lsst::afw::math::Kernel::Pixel > const &kernelRowList) |
Apply separable convolution kernel to an image at one point. More... | |
template<typename OutImageT , typename InImageT , typename KernelT > | |
void | lsst.afw.math::convolve (OutImageT &convolvedImage, InImageT const &inImage, KernelT const &kernel, ConvolutionControl const &convolutionControl=ConvolutionControl()) |
Convolve an Image or MaskedImage with a Kernel, setting pixels of an existing output image. More... | |
template<typename OutImageT , typename InImageT > | |
void | lsst.afw.math.detail::basicConvolve (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::Kernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
Low-level convolution function that does not set edge pixels. More... | |
template<typename OutImageT , typename InImageT > | |
void | lsst.afw.math.detail::basicConvolve (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::DeltaFunctionKernel const &kernel, lsst::afw::math::ConvolutionControl const &) |
A version of basicConvolve that should be used when convolving delta function kernels. More... | |
template<typename OutImageT , typename InImageT > | |
void | lsst.afw.math.detail::basicConvolve (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::LinearCombinationKernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
A version of basicConvolve that should be used when convolving a LinearCombinationKernel. More... | |
template<typename OutImageT , typename InImageT > | |
void | lsst.afw.math.detail::basicConvolve (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::SeparableKernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
A version of basicConvolve that should be used when convolving separable kernels. More... | |
template<typename OutImageT , typename InImageT > | |
void | lsst.afw.math.detail::convolveWithBruteForce (OutImageT &convolvedImage, InImageT const &inImage, lsst::afw::math::Kernel const &kernel, lsst::afw::math::ConvolutionControl const &convolutionControl) |
Convolve an Image or MaskedImage with a Kernel by computing the kernel image at every point. (If the kernel is not spatially varying then only compute it once). More... | |
void | lsst.afw.math::printKernel (lsst::afw::math::Kernel const &kernel, bool doNormalize, double x=0, double y=0, std::string pixelFmt="%7.3f") |
Print the pixel values of a Kernel to std::cout. More... | |
void lsst::afw::math::detail::basicConvolve | ( | OutImageT & | convolvedImage, |
InImageT const & | inImage, | ||
lsst::afw::math::Kernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
Low-level convolution function that does not set edge pixels.
convolvedImage must be the same size as inImage. convolvedImage has a border in which the output pixels are not set. This border has size:
lsst::pex::exceptions::InvalidParameterError | if convolvedImage dimensions != inImage dimensions |
lsst::pex::exceptions::InvalidParameterError | if inImage smaller than kernel in width or height |
lsst::pex::exceptions::InvalidParameterError | if kernel width or height < 1 |
lsst::pex::exceptions::MemoryError | when allocation of CPU memory fails |
lsst::afw::gpu::GpuMemoryError | when allocation or transfer to/from GPU memory fails |
lsst::afw::gpu::GpuRuntimeError | when GPU code run fails |
convolvedImage | convolved image |
inImage | image to convolve |
kernel | convolution kernel |
convolutionControl | convolution control parameters |
Definition at line 159 of file BasicConvolve.cc.
void lsst::afw::math::detail::basicConvolve | ( | OutImageT & | convolvedImage, |
InImageT const & | inImage, | ||
lsst::afw::math::DeltaFunctionKernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
A version of basicConvolve that should be used when convolving delta function kernels.
lsst::pex::exceptions::InvalidParameterError | when GPU acceleration forced |
convolvedImage | convolved image |
inImage | image to convolve |
kernel | convolution kernel |
convolutionControl | convolution control parameters |
Definition at line 211 of file BasicConvolve.cc.
void lsst::afw::math::detail::basicConvolve | ( | OutImageT & | convolvedImage, |
InImageT const & | inImage, | ||
lsst::afw::math::LinearCombinationKernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
A version of basicConvolve that should be used when convolving a LinearCombinationKernel.
The Algorithm:
lsst::pex::exceptions::InvalidParameterError | if convolvedImage dimensions != inImage dimensions |
lsst::pex::exceptions::InvalidParameterError | if inImage smaller than kernel in width or height |
lsst::pex::exceptions::InvalidParameterError | if kernel width or height < 1 |
lsst::pex::exceptions::MemoryError | when allocation of CPU memory fails |
lsst::afw::gpu::GpuMemoryError | when allocation or transfer to/from GPU memory fails |
lsst::afw::gpu::GpuRuntimeError | when GPU code run fails |
convolvedImage | convolved image |
inImage | image to convolve |
kernel | convolution kernel |
convolutionControl | convolution control parameters |
Definition at line 261 of file BasicConvolve.cc.
void lsst::afw::math::detail::basicConvolve | ( | OutImageT & | convolvedImage, |
InImageT const & | inImage, | ||
lsst::afw::math::SeparableKernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
A version of basicConvolve that should be used when convolving separable kernels.
lsst::pex::exceptions::InvalidParameterError | when GPU acceleration forced |
convolvedImage | convolved image |
inImage | image to convolve |
kernel | convolution kernel |
convolutionControl | convolution control parameters |
Definition at line 330 of file BasicConvolve.cc.
void lsst::afw::math::convolve | ( | OutImageT & | convolvedImage, |
InImageT const & | inImage, | ||
KernelT const & | kernel, | ||
ConvolutionControl const & | convolutionControl = ConvolutionControl() |
||
) |
Convolve an Image or MaskedImage with a Kernel, setting pixels of an existing output image.
Various convolution kernels are available, including:
If a kernel is spatially varying, its spatial model is computed at each pixel position on the image (pixel position, not pixel index). At present (2009-09-24) this position is computed relative to the lower left corner of the sub-image, but it will almost certainly change to be the lower left corner of the parent image.
All convolution is performed in real space. This allows convolution to handle masked pixels and spatially varying kernels. Although convolution of an Image with a spatially invariant kernel could, in fact, be performed in Fourier space, the code does not do this.
Note that mask bits are smeared by convolution; all nonzero pixels in the kernel smear the mask, even pixels that have very small values. Larger kernels smear the mask more and are also slower to convolve. Use the smallest kernel that will do the job.
convolvedImage has a border of edge pixels which cannot be computed normally. Normally these pixels are set to the standard edge pixel, as returned by edgePixel(). However, if your code cannot handle nans in the image or infs in the variance, you may set doCopyEdge true, in which case the edge pixels are set to the corresponding pixels of the input image and (if there is a mask) the mask EDGE bit is set.
The border of edge pixels has size:
Convolution has been optimized for the various kinds of kernels, as follows (listed approximately in order of decreasing speed):
Additional convolution functions include:
afw/examples offers programs that time convolution including timeConvolve and timeSpatiallyVaryingConvolve.
lsst::pex::exceptions::InvalidParameterError | if convolvedImage is not the same size as inImage |
lsst::pex::exceptions::InvalidParameterError | if inImage is smaller than kernel in columns and/or rows. |
lsst::pex::exceptions::MemoryError | when allocation of CPU memory fails |
lsst::afw::gpu::GpuMemoryError | when allocation or transfer to/from GPU memory fails |
lsst::afw::gpu::GpuRuntimeError | when GPU code run fails |
convolvedImage | convolved image; must be the same size as inImage |
inImage | image to convolve |
kernel | convolution kernel |
convolutionControl | convolution control parameters |
Definition at line 328 of file ConvolveImage.cc.
|
inline |
Apply convolution kernel to an image at one point.
inImageLocator | locator for image pixel that overlaps pixel (0,0) of kernel (the origin of the kernel, not its center) |
kernelLocator | locator for (0,0) pixel of kernel (the origin of the kernel, not its center) |
kWidth | number of columns in kernel |
kHeight | number of rows in kernel |
Definition at line 186 of file ConvolveImage.h.
|
inline |
Apply separable convolution kernel to an image at one point.
inImageLocator | locator for image pixel that overlaps pixel (0,0) of kernel (the origin of the kernel, not its center) |
kernelXList | kernel column vector |
kernelYList | kernel row vector |
Definition at line 222 of file ConvolveImage.h.
void lsst::afw::math::detail::convolveWithBruteForce | ( | OutImageT & | convolvedImage, |
InImageT const & | inImage, | ||
lsst::afw::math::Kernel const & | kernel, | ||
lsst::afw::math::ConvolutionControl const & | convolutionControl | ||
) |
Convolve an Image or MaskedImage with a Kernel by computing the kernel image at every point. (If the kernel is not spatially varying then only compute it once).
convolvedImage must be the same size as inImage. convolvedImage has a border in which the output pixels are not set. This border has size:
lsst::pex::exceptions::InvalidParameterError | if convolvedImage dimensions != inImage dimensions |
lsst::pex::exceptions::InvalidParameterError | if inImage smaller than kernel in width or height |
lsst::pex::exceptions::InvalidParameterError | if kernel width or height < 1 |
lsst::pex::exceptions::InvalidParameterError | when GPU acceleration forced on spatially varying kernel |
lsst::pex::exceptions::MemoryError | when allocation of CPU memory fails |
lsst::afw::gpu::GpuMemoryError | when allocation or transfer to/from GPU memory fails |
lsst::afw::gpu::GpuRuntimeError | when GPU code run fails |
convolvedImage | convolved image |
inImage | image to convolve |
kernel | convolution kernel |
convolutionControl | convolution control parameters |
Definition at line 468 of file BasicConvolve.cc.
void lsst::afw::math::printKernel | ( | lsst::afw::math::Kernel const & | kernel, |
bool | doNormalize, | ||
double | xPos = 0 , |
||
double | yPos = 0 , |
||
std::string | pixelFmt = "%7.3f" |
||
) |
Print the pixel values of a Kernel to std::cout.
Rows increase upward and columns to the right; thus the lower left pixel is (0,0).
kernel | the kernel |
doNormalize | if true, normalize kernel |
xPos | x at which to evaluate kernel |
yPos | y at which to evaluate kernel |
pixelFmt | format for pixel values |
Definition at line 46 of file KernelFunctions.cc.