casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
casacore::VectorKernel Class Reference

Make a Vector smoothing kernel from a kernel specification. More...

#include <VectorKernel.h>

Public Types

enum  KernelTypes {
  BOXCAR,
  GAUSSIAN,
  HANNING,
  NKERNELS
}
 

Static Public Member Functions

static Vector< Doublemake (KernelTypes kernelType, Double width, uInt shape, Bool useShapeExactly, Bool peakIsUnity=False)
 Create kernel vector for width in pixels. More...
 
static Vector< Floatmake (KernelTypes kernelType, Float width, uInt shape, Bool useShapeExactly, Bool peakIsUnity=False)
 
static Vector< InttoKernelTypes (const String &kernels, const std::regex &delimiter)
 
  Helper function to convert a string containing a list of desired smoothed kernel types

to the correct Vector<Int> required for the setSmooth function. More...

 
static Vector< InttoKernelTypes (const Vector< String > &kernels)
 
static VectorKernel::KernelTypes toKernelType (const String &kernel)
 
static String fromKernelType (KernelTypes kernelType)
 

Detailed Description

Make a Vector smoothing kernel from a kernel specification.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Returns a vector from a smoothing kernel specification.

Synopsis

This class takes a smoothing kernel type and a width, and generates a Vector holding that kernel. It can be used in conjunction with the separable image convolver, SepImageConvolver

The kernels can be normalized so that the peak of the kernel is 1, or 1/area under the kernel. The latter ensures conservation of integrated pixel value (the usual jargon is conservation of flux for images) and is the default.

Example

Motivation

To Do

Definition at line 84 of file VectorKernel.h.

Member Enumeration Documentation

Enumerator
BOXCAR 

Box-car smoothing kernel.

GAUSSIAN 

Gaussian smoothing kernel.

HANNING 

Hanning smoothing kernel.

NKERNELS 

Definition at line 88 of file VectorKernel.h.

Member Function Documentation

static String casacore::VectorKernel::fromKernelType ( KernelTypes  kernelType)
static
static Vector<Double> casacore::VectorKernel::make ( KernelTypes  kernelType,
Double  width,
uInt  shape,
Bool  useShapeExactly,
Bool  peakIsUnity = False 
)
static

Create kernel vector for width in pixels.

For Gaussian, width is FWHM, for Boxcar, width is full width. For Hanning width is ignored. If useShapeExactly is True, the provided shape is used exactly. If useShapeExactly is False, the kernel length will be the max of the provided shape and an autoestimate (e.g. from +/- 5sigma limits for a Gaussian).

static Vector<Float> casacore::VectorKernel::make ( KernelTypes  kernelType,
Float  width,
uInt  shape,
Bool  useShapeExactly,
Bool  peakIsUnity = False 
)
static
static VectorKernel::KernelTypes casacore::VectorKernel::toKernelType ( const String kernel)
static
static Vector<Int> casacore::VectorKernel::toKernelTypes ( const String kernels,
const std::regex &  delimiter 
)
static

  Helper function to convert a string containing a list of desired smoothed kernel types

to the correct Vector<Int> required for the setSmooth function.

This may be usful if your user interface involves strings rather than integers. A new value is added to the output vector (which is resized appropriately) if any of the substrings "boxcar", "gaussian" or "hanning" (actually "box", "gauss", and "hann" will do) is present.

static Vector<Int> casacore::VectorKernel::toKernelTypes ( const Vector< String > &  kernels)
static

The documentation for this class was generated from the following file: