casa
5.7.0-16
|
Abstract base class that describes a spectral profile that can be parameterized by a peak value (amplitude), center, and width. More...
#include <PCFSpectralElement.h>
Public Types | |
enum | ParamType { AMP, CENTER, WIDTH } |
to help avoid having to hard code parameter indices More... | |
Public Types inherited from casa::SpectralElement | |
enum | Types { GAUSSIAN, POLYNOMIAL, COMPILED, GMULTIPLET, LORENTZIAN, POWERLOGPOLY, LOGTRANSPOLY, N_Types } |
Supported spectral components. More... | |
Public Member Functions | |
virtual | ~PCFSpectralElement () |
Destructor. More... | |
casacore::Double | getAmpl () const |
PCFSpectralElement& operator=(const PCFSpectralElement &other);. More... | |
casacore::Double | getCenter () const |
Get center value. More... | |
virtual casacore::Double | getWidth () const |
Get the width. More... | |
virtual casacore::Double | getFWHM () const =0 |
virtual casacore::Double | getIntegral () const =0 |
get the integral from -inf to inf More... | |
casacore::Double | getAmplErr () const |
Get amplitude error estimate. More... | |
casacore::Double | getCenterErr () const |
Get center value error estimate. More... | |
virtual casacore::Double | getWidthErr () const |
Get the width error estimate. More... | |
virtual casacore::Double | getFWHMErr () const =0 |
virtual casacore::Double | getIntegralErr () const |
void | set (const casacore::Vector< casacore::Double > ¶m) |
Get error estimates of parameters. More... | |
void | setAmpl (const casacore::Double ampl) |
void | setCenter (const casacore::Double center) |
virtual void | setWidth (const casacore::Double width) |
void | fixAmpl (const casacore::Bool fix=true) |
void | fixCenter (const casacore::Bool fix=true) |
void | fixWidth (const casacore::Bool fix=true) |
void | fixFWHM (const casacore::Bool fix=true) |
void | fixByString (const casacore::String &s) |
fix parameters via encoded string. More... | |
Public Member Functions inherited from casa::SpectralElement | |
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... | |
Abstract base class that describes a spectral profile that can be parameterized by a peak value (amplitude), center, and width.
Public interface
From p(eak), c(enter), f(whm), and spectral line and element
Abstract base class that describes a spectral profile that can be parameterized by a peak value (amplitude), center, and width.
To have a class containing common methods for things like Gaussian, Lorentzian, and Voigt profiles.
Definition at line 66 of file PCFSpectralElement.h.
to help avoid having to hard code parameter indices
Enumerator | |
---|---|
AMP | |
CENTER | |
WIDTH |
Definition at line 70 of file PCFSpectralElement.h.
|
virtual |
Destructor.
void casa::PCFSpectralElement::fixAmpl | ( | const casacore::Bool | fix = true | ) |
void casa::PCFSpectralElement::fixByString | ( | const casacore::String & | s | ) |
fix parameters via encoded string.
If s contains a, fix amplitude. If s contains f, fix width. If s contains c, fix center.
void casa::PCFSpectralElement::fixCenter | ( | const casacore::Bool | fix = true | ) |
|
inline |
Definition at line 122 of file PCFSpectralElement.h.
References casa::SpectralElement::fix(), and fixWidth().
void casa::PCFSpectralElement::fixWidth | ( | const casacore::Bool | fix = true | ) |
Referenced by fixFWHM().
casacore::Double casa::PCFSpectralElement::getAmpl | ( | ) | const |
PCFSpectralElement& operator=(const PCFSpectralElement &other);.
Get amplitude
casacore::Double casa::PCFSpectralElement::getAmplErr | ( | ) | const |
Get amplitude error estimate.
casacore::Double casa::PCFSpectralElement::getCenter | ( | ) | const |
Get center value.
casacore::Double casa::PCFSpectralElement::getCenterErr | ( | ) | const |
Get center value error estimate.
|
pure virtual |
Implemented in casa::GaussianSpectralElement, and casa::LorentzianSpectralElement.
|
pure virtual |
Implemented in casa::GaussianSpectralElement, and casa::LorentzianSpectralElement.
|
pure virtual |
get the integral from -inf to inf
Implemented in casa::GaussianSpectralElement, and casa::LorentzianSpectralElement.
|
virtual |
|
virtual |
Get the width.
Referenced by casa::LorentzianSpectralElement::getFWHM().
|
virtual |
Get the width error estimate.
Referenced by casa::LorentzianSpectralElement::getFWHMErr().
|
virtual |
Get error estimates of parameters.
Reimplemented from casa::SpectralElement.
Reimplemented in casa::GaussianSpectralElement.
void casa::PCFSpectralElement::setAmpl | ( | const casacore::Double | ampl | ) |
void casa::PCFSpectralElement::setCenter | ( | const casacore::Double | center | ) |
|
virtual |
Referenced by casa::LorentzianSpectralElement::setFWHM().