ComponentType.h

Classes

ComponentType -- Enumerators common to the ComponentsModels module (full description)

class ComponentType

Types

enum Shape

POINT = 0
A simple point component
GAUSSIAN
A elliptical Gaussian component
DISK
A elliptical disk component
UNKNOWN_SHAPE
An unknown Component
NUMBER_SHAPES
The number of types in this enumerator

enum Polarisation

STOKES = 0
The four Stokes parameters, ie I,Q,U,V
LINEAR
Linear polarisation feeds ie., XX,XY,YX,YY with zero parrallactic angle
CIRCULAR
Circular polarisation feeds ie., RR, RL, LR, LL
UNKNOWN_POLARISATION
An unknown Component
NUMBER_POLARISATIONS
The number of types in this enumerator

enum SpectralShape

CONSTANT_SPECTRUM = 0
The flux is constant at different frequencies
SPECTRAL_INDEX
The flux varies as I = I_0 * (\nu / \nu_0)^\alpha
UNKNOWN_SPECTRAL_SHAPE
an unknown spectral type
NUMBER_SPECTRAL_SHAPES
The number of spectral types in this enumerator

Interface

Public Members
static String name(ComponentType::Shape shapeEnum)
static ComponentType::Shape shape(const String& shapeName)
static String name(ComponentType::Polarisation fluxEnum)
static ComponentType::Polarisation polarisation(const String& polarisationName)
static String name(ComponentType::SpectralShape spectralEnum)
static ComponentType::SpectralShape spectralShape(const String& spectralName)
Private Members
static ComponentShape* construct(ComponentType::Shape shapeEnum)
static SpectralModel* construct(ComponentType::SpectralShape spectralEnum)

Description

Review Status

Date Reviewed:
yyyy/mm/dd
Programs:
Tests:

Etymology

This class contains the type definitions in the ComponentModels module

Synopsis

This class does nothing. It is merely a container for the enumerations used by the ComponentModels module. These enumerations define the standard component types. It also contains: The first element in the enumerator must be represented by zero and every enumerator must contain as the second last and last elements an UNKNOWN_* and NUMBER_* element.

Example

See the documentation for the ComponentModels classes for examples on the use of these enumerator and functions. For example the ComponentShape class.

To Do

Member Description

enum Shape

The shapes of all the components

enum Polarisation

The ways the Flux polarisation can be represented

enum SpectralShape

The different functional forms for the spectral variation.

static String name(ComponentType::Shape shapeEnum)

Convert the Shape enumerator to a string

static ComponentType::Shape shape(const String& shapeName)

Convert a given String to a Shape enumerator (min match active)

static String name(ComponentType::Polarisation fluxEnum)

Convert the Polarisation enumerator to a string

static ComponentType::Polarisation polarisation(const String& polarisationName)

Convert a given String to a Polarisation enumerator

static String name(ComponentType::SpectralShape spectralEnum)

Convert the SpectralShape enumerator to a string

static ComponentType::SpectralShape spectralShape(const String& spectralName)

Convert a given String to a SpectralShape enumerator

static ComponentShape* construct(ComponentType::Shape shapeEnum)

Convert the Shape enumerator to a shape object (upcast to the base object). Returns a null pointer if the object could not be constructed. This will occur is the enumerator is UNKNOWN_SHAPE or NUMBER_SHAPES or there is insufficient memory. The caller of this function is responsible for deleting the pointer.

static SpectralModel* construct(ComponentType::SpectralShape spectralEnum)

Convert the SpectralShape enumerator to a spectral model object (upcast to the base object). Returns a null pointer if the object could not be constructed. This will occur is the enumerator is UNKNOWN_SPECTRAL_SHAPE or NUMBER_SPECTRAL_SHAPES or there is insufficient memory. The caller of this function is responsible for deleting the pointer.