casa
$Rev:20696$
|
Describes (a set of related) spectral lines. More...
#include <SpectralElement.h>
Public Types | |
enum | Types { GAUSSIAN, POLYNOMIAL, COMPILED, GMULTIPLET, LORENTZIAN, N_Types } |
Types of spectral lines known. More... | |
Public Member Functions | |
virtual | ~SpectralElement () |
virtual SpectralElement * | clone () const =0 |
virtual Double | operator() (const Double x) const =0 |
Evaluate the value of the element at x. | |
virtual Bool | operator== (const SpectralElement &other) const |
virtual Double | operator[] (const uInt n) const |
Get parameter n. | |
SpectralElement::Types | getType () const |
Get the data for this element. | |
void | get (Vector< Double > ¶ms) const |
Get all parameters. | |
Vector< Double > | get () const |
void | getError (Vector< Double > &err) const |
Get error estimates of parameters. | |
Vector< Double > | getError () const |
uInt | getOrder () const |
Get the order (i.e. | |
virtual void | setError (const Vector< Double > &err) |
Set the error fields. | |
virtual void | fix (const Vector< Bool > &fix) |
Set fixed parameters (True) or unset them (False) | |
const Vector< Bool > & | fixed () const |
Get the fix state[s]. | |
virtual Bool | toRecord (RecordInterface &out) const |
Save to a record. | |
virtual void | set (const Vector< Double > ¶ms) |
set parameters | |
Static Public Member Functions | |
static const String * | allTypes (Int &nall, const SpectralElement::Types *&typ) |
Get all the types available as String and codes, and number available. | |
static const String & | fromType (SpectralElement::Types tp) |
Get a string from the type. | |
static Bool | toType (SpectralElement::Types &tp, const String &typName) |
Get a type from a (non-case sensitive; minimum match) String. | |
Protected Member Functions | |
SpectralElement () | |
SpectralElement (const SpectralElement &other) | |
SpectralElement & | operator= (const SpectralElement &other) |
void | _construct (const Types type, const Vector< Double > ¶ms) |
void | _set (const Vector< Double > ¶ms) |
void | _setType (const Types type) |
Private Attributes | |
Types | tp_p |
type of element | |
Vector< Double > | par_p |
The parameters of the function. | |
Vector< Double > | err_p |
The errors of the parameters. | |
Vector< Bool > | fix_p |
The indication if the parameter has to be fixed (True) or solved (False). |
Describes (a set of related) spectral lines.
Public interface
From spectral line and element
The SpectralElement class is the abstract base class for classes describing spectral components (Gaussian, Polynonomial, etc).
The element can be used in the SpectralFit class and in the SpectralEstimate class.
To have a container for fitting of spectral profiles to an observed spectrum
Definition at line 76 of file SpectralElement.h.
Types of spectral lines known.
GAUSSIAN |
A gaussian profile. |
POLYNOMIAL |
A polynomial baseline. |
COMPILED |
Any compiled string functional. |
GMULTIPLET |
Gaussian multiplet. |
LORENTZIAN |
Lorentzian. |
N_Types |
Definition at line 81 of file SpectralElement.h.
virtual casa::SpectralElement::~SpectralElement | ( | ) | [virtual] |
casa::SpectralElement::SpectralElement | ( | ) | [inline, protected] |
Definition at line 161 of file SpectralElement.h.
casa::SpectralElement::SpectralElement | ( | const SpectralElement & | other | ) | [protected] |
void casa::SpectralElement::_construct | ( | const Types | type, |
const Vector< Double > & | params | ||
) | [protected] |
void casa::SpectralElement::_set | ( | const Vector< Double > & | params | ) | [protected] |
void casa::SpectralElement::_setType | ( | const Types | type | ) | [protected] |
static const String* casa::SpectralElement::allTypes | ( | Int & | nall, |
const SpectralElement::Types *& | typ | ||
) | [static] |
Get all the types available as String and codes, and number available.
virtual SpectralElement* casa::SpectralElement::clone | ( | ) | const [pure virtual] |
virtual void casa::SpectralElement::fix | ( | const Vector< Bool > & | fix | ) | [virtual] |
Set fixed parameters (True) or unset them (False)
Fix/unfix all in one go
Reimplemented in casa::GaussianMultipletSpectralElement.
const Vector<Bool>& casa::SpectralElement::fixed | ( | ) | const |
Get the fix state[s].
static const String& casa::SpectralElement::fromType | ( | SpectralElement::Types | tp | ) | [static] |
Get a string from the type.
void casa::SpectralElement::get | ( | Vector< Double > & | params | ) | const |
Get all parameters.
Vector<Double> casa::SpectralElement::get | ( | ) | const |
void casa::SpectralElement::getError | ( | Vector< Double > & | err | ) | const |
Get error estimates of parameters.
Vector<Double> casa::SpectralElement::getError | ( | ) | const |
uInt casa::SpectralElement::getOrder | ( | ) | const [inline] |
Get the order (i.e.
the number of parameters)
Definition at line 138 of file SpectralElement.h.
References casa::ArrayBase::nelements(), and par_p.
SpectralElement::Types casa::SpectralElement::getType | ( | ) | const [inline] |
Get the data for this element.
Get type of this element
Definition at line 126 of file SpectralElement.h.
References tp_p.
Evaluate the value of the element at x.
Implemented in casa::GaussianSpectralElement, casa::LorentzianSpectralElement, casa::PolynomialSpectralElement, and casa::CompiledSpectralElement.
SpectralElement& casa::SpectralElement::operator= | ( | const SpectralElement & | other | ) | [protected] |
virtual Bool casa::SpectralElement::operator== | ( | const SpectralElement & | other | ) | const [virtual] |
virtual void casa::SpectralElement::set | ( | const Vector< Double > & | params | ) | [virtual] |
set parameters
Reimplemented in casa::GaussianMultipletSpectralElement, and casa::PCFSpectralElement.
virtual void casa::SpectralElement::setError | ( | const Vector< Double > & | err | ) | [virtual] |
Set the error fields.
Reimplemented in casa::GaussianMultipletSpectralElement.
virtual Bool casa::SpectralElement::toRecord | ( | RecordInterface & | out | ) | const [virtual] |
Save to a record.
Reimplemented in casa::GaussianMultipletSpectralElement, and casa::GaussianSpectralElement.
static Bool casa::SpectralElement::toType | ( | SpectralElement::Types & | tp, |
const String & | typName | ||
) | [static] |
Get a type from a (non-case sensitive; minimum match) String.
Vector<Double> casa::SpectralElement::err_p [private] |
The errors of the parameters.
Definition at line 182 of file SpectralElement.h.
Vector<Bool> casa::SpectralElement::fix_p [private] |
The indication if the parameter has to be fixed (True) or solved (False).
Solved is the default.
Definition at line 185 of file SpectralElement.h.
Vector<Double> casa::SpectralElement::par_p [private] |
The parameters of the function.
I.e. the polynomial coefficients; amplitude, center and sigma of a Gaussian.
Definition at line 180 of file SpectralElement.h.
Referenced by getOrder().
Types casa::SpectralElement::tp_p [private] |