casa
5.7.0-16
|
Describes (a set of related) spectral lines. More...
#include <SpectralElement.h>
Public Types | |
enum | Types { GAUSSIAN, POLYNOMIAL, COMPILED, GMULTIPLET, LORENTZIAN, POWERLOGPOLY, LOGTRANSPOLY, N_Types } |
Supported spectral components. More... | |
Public Member Functions | |
virtual | ~SpectralElement () |
virtual SpectralElement * | clone () const =0 |
virtual casacore::Double | operator() (const casacore::Double x) const |
Evaluate the value of the element at x. More... | |
casacore::Bool | operator== (const SpectralElement &other) const |
virtual casacore::Double | operator[] (const casacore::uInt n) const |
Get parameter n. More... | |
SpectralElement::Types | getType () const |
Get type of this element. More... | |
void | get (casacore::Vector< casacore::Double > ¶ms) const |
Get all parameters. More... | |
casacore::Vector < casacore::Double > | get () const |
void | getError (casacore::Vector< casacore::Double > &err) const |
Get error estimates of parameters. More... | |
casacore::Vector < casacore::Double > | getError () const |
casacore::uInt | getOrder () const |
Get the order (i.e. More... | |
virtual void | setError (const casacore::Vector< casacore::Double > &err) |
Set the error fields. More... | |
virtual void | fix (const casacore::Vector< casacore::Bool > &fix) |
Set fixed parameters (true) or unset them (false) More... | |
const casacore::Vector < casacore::Bool > & | fixed () const |
Get the fix state[s]. More... | |
virtual casacore::Bool | toRecord (casacore::RecordInterface &out) const |
Save to a record. More... | |
virtual void | set (const casacore::Vector< casacore::Double > ¶ms) |
set parameters More... | |
Static Public Member Functions | |
static const casacore::String * | allTypes (casacore::Int &nall, const SpectralElement::Types *&typ) |
Get all the types available as casacore::String and codes, and number available. More... | |
static const casacore::String & | fromType (SpectralElement::Types tp) |
Get a string from the type. More... | |
static casacore::Bool | toType (SpectralElement::Types &tp, const casacore::String &typName) |
Get a type from a (non-case sensitive; minimum match) String. More... | |
Protected Member Functions | |
SpectralElement () | |
SpectralElement (Types type, const casacore::Vector< casacore::Double > &parms=casacore::Vector< casacore::Double >(0)) | |
SpectralElement (const SpectralElement &other) | |
SpectralElement & | operator= (const SpectralElement &other) |
void | _set (const casacore::Vector< casacore::Double > ¶ms) |
void | _setType (const Types type) |
void | _setFunction (const std::shared_ptr< casacore::Function< casacore::Double, casacore::Double > > &f) |
virtual std::shared_ptr < casacore::Function < casacore::Double, casacore::Double > > | _getFunction () const |
Private Attributes | |
Types | _type |
type of element More... | |
casacore::Vector < casacore::Double > | _params |
The parameters of the function. More... | |
casacore::Vector < casacore::Double > | _errors |
The errors of the parameters. More... | |
casacore::Vector< casacore::Bool > | _fixed |
The indication if the parameter has to be fixed (true) or solved (false). More... | |
std::shared_ptr < casacore::Function < casacore::Double, casacore::Double > > | _function |
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 82 of file SpectralElement.h.
Supported spectral components.
Definition at line 87 of file SpectralElement.h.
|
virtual |
|
inlineprotected |
Definition at line 166 of file SpectralElement.h.
|
protected |
|
protected |
|
inlineprotectedvirtual |
Definition at line 180 of file SpectralElement.h.
References _function.
|
protected |
|
protected |
|
protected |
|
static |
Get all the types available as casacore::String and codes, and number available.
|
pure virtual |
|
virtual |
Set fixed parameters (true) or unset them (false)
Fix/unfix all in one go
Reimplemented in casa::GaussianMultipletSpectralElement.
Referenced by casa::PCFSpectralElement::fixFWHM().
const casacore::Vector<casacore::Bool>& casa::SpectralElement::fixed | ( | ) | const |
Get the fix state[s].
|
static |
Get a string from the type.
void casa::SpectralElement::get | ( | casacore::Vector< casacore::Double > & | params | ) | const |
Get all parameters.
casacore::Vector<casacore::Double> casa::SpectralElement::get | ( | ) | const |
void casa::SpectralElement::getError | ( | casacore::Vector< casacore::Double > & | err | ) | const |
Get error estimates of parameters.
casacore::Vector<casacore::Double> casa::SpectralElement::getError | ( | ) | const |
|
inline |
Get the order (i.e.
the number of parameters)
Definition at line 142 of file SpectralElement.h.
References _params, and casacore::ArrayBase::size().
|
inline |
|
virtual |
Evaluate the value of the element at x.
Reimplemented in casa::CompiledSpectralElement.
|
protected |
casacore::Bool casa::SpectralElement::operator== | ( | const SpectralElement & | other | ) | const |
|
virtual |
|
virtual |
set parameters
Reimplemented in casa::GaussianMultipletSpectralElement, casa::GaussianSpectralElement, and casa::PCFSpectralElement.
|
virtual |
Set the error fields.
Reimplemented in casa::GaussianMultipletSpectralElement.
|
virtual |
Save to a record.
Reimplemented in casa::GaussianMultipletSpectralElement, and casa::GaussianSpectralElement.
|
static |
Get a type from a (non-case sensitive; minimum match) String.
|
private |
The errors of the parameters.
Definition at line 193 of file SpectralElement.h.
|
private |
The indication if the parameter has to be fixed (true) or solved (false).
Solved is the default.
Definition at line 196 of file SpectralElement.h.
|
private |
Definition at line 198 of file SpectralElement.h.
Referenced by _getFunction().
|
private |
The parameters of the function.
I.e. the polynomial coefficients; amplitude, center and sigma of a Gaussian.
Definition at line 191 of file SpectralElement.h.
Referenced by getOrder().
|
private |