Loading...
Searching...
No Matches
casacore::VectorKernel Class Reference
scimath package (libcasa_scimath) » Mathematics_module

More...

`#include <VectorKernel.h>`

## Public Types

enum | KernelTypes { BOXCAR , GAUSSIAN , HANNING , NKERNELS }

## Static Public Member Functions

static Vector< Double > | make (KernelTypes kernelType, Double width, uInt shape, Bool useShapeExactly, Bool peakIsUnity=False)
| Create kernel vector for width in pixels.
static Vector< Float > | make (KernelTypes kernelType, Float width, uInt shape, Bool useShapeExactly, Bool peakIsUnity=False)
static Vector< Int > | toKernelTypes (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.
static Vector< Int > | toKernelTypes (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

- Vector

### 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 82 of file VectorKernel.h.

## Member Enumeration Documentation

## KernelTypes

enum casacore::VectorKernel::KernelTypes

Enumerator
BOXCAR | Box-car smoothing kernel.
GAUSSIAN | Gaussian smoothing kernel.
HANNING | Hanning smoothing kernel.
NKERNELS |

Definition at line 86 of file VectorKernel.h.

## Member Function Documentation

## fromKernelType()

String casacore::VectorKernel::fromKernelType | ( | KernelTypes | kernelType | ) |

static

## make() [1/2]

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).

References casacore::False, and casacore::shape().

## make() [2/2]

Vector< Float > casacore::VectorKernel::make | ( | KernelTypes | kernelType,
|  | Float | width,
|  | uInt | shape,
|  | Bool | useShapeExactly,
|  | Bool | peakIsUnity = False )

static

References casacore::False, and casacore::shape().

## toKernelType()

VectorKernel::KernelTypes casacore::VectorKernel::toKernelType | ( | const String & | kernel | ) |

static

## toKernelTypes() [1/2]

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.

## toKernelTypes() [2/2]

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

static

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

- scimath/Mathematics/VectorKernel.h