casa
5.7.0-16
|
Describes a Gaussian spectral line. More...
#include <GaussianSpectralElement.h>
Public Member Functions | |
GaussianSpectralElement () | |
Default constructor creates a default Gaussian element with an amplitude of 1; an integral (sigma=2sqrt(ln2)/pi) of 1; a central frequency of zero. More... | |
GaussianSpectralElement (const casacore::Double ampl, const casacore::Double center, const casacore::Double sigma) | |
Construct with given type and values. More... | |
GaussianSpectralElement (const casacore::Vector< casacore::Double > ¶m) | |
Construct the given tp with the given param. More... | |
GaussianSpectralElement (const GaussianSpectralElement &other) | |
Copy constructor (deep copy) More... | |
~GaussianSpectralElement () | |
Destructor. More... | |
SpectralElement * | clone () const |
casacore::Double | getSigma () const |
Assignment (copy semantics) More... | |
casacore::Double | getFWHM () const |
casacore::Double | getSigmaErr () const |
casacore::Double | getFWHMErr () const |
void | setSigma (casacore::Double sigma) |
void | setFWHM (casacore::Double fwhm) |
void | fixSigma (const casacore::Bool fix=true) |
casacore::Bool | fixedSigma () const |
casacore::Double | getIntegral () const |
get the integral from -inf to inf More... | |
casacore::Bool | toRecord (casacore::RecordInterface &out) const |
Save to a record. More... | |
void | set (const casacore::Vector< casacore::Double > &v) |
Get error estimates of parameters. More... | |
Public Member Functions inherited from casa::PCFSpectralElement | |
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... | |
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 | getIntegralErr () const |
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 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... | |
Static Public Member Functions | |
static casacore::Double | sigmaFromFWHM (const casacore::Double fwhm) |
Sigma to FWHM Convert from sigma to FWHM and vice versa. More... | |
static casacore::Double | sigmaToFWHM (const casacore::Double sigma) |
Static Public Member Functions inherited from casa::SpectralElement | |
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... | |
Static Public Attributes | |
static const casacore::Double | SigmaToFWHM |
Sigma to FWHM conversion factor. More... | |
Private Member Functions | |
void | _set (const casacore::Vector< casacore::Double > &v) |
need to overrride SpectralElement::_set() because _param[2] is sigma but the second param of the corresponding casacore::Gaussian1D function is the FWHM :( More... | |
Additional Inherited Members | |
Public Types inherited from casa::PCFSpectralElement | |
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... | |
Protected Member Functions inherited from casa::SpectralElement | |
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 |
Describes a Gaussian spectral line.
Public interface
From Gaussian and spectral line and element
The GaussianSpectralElement class describes a Gaussian spectral line.
To have a container for data descrbing a Gaussian spectral profile for fitting to an observed spectrum
Definition at line 64 of file GaussianSpectralElement.h.
casa::GaussianSpectralElement::GaussianSpectralElement | ( | ) |
Default constructor creates a default Gaussian element with an amplitude of 1; an integral (sigma=2sqrt(ln2)/pi)
of 1; a central frequency of zero.
It's necessary for this to be public because Arrays of this class require access to the default constructor. It should never be used in code developers write though.
casa::GaussianSpectralElement::GaussianSpectralElement | ( | const casacore::Double | ampl, |
const casacore::Double | center, | ||
const casacore::Double | sigma | ||
) |
Construct with given type and values.
casa::GaussianSpectralElement::GaussianSpectralElement | ( | const casacore::Vector< casacore::Double > & | param | ) |
Construct the given tp with the given param.
casa::GaussianSpectralElement::GaussianSpectralElement | ( | const GaussianSpectralElement & | other | ) |
casa::GaussianSpectralElement::~GaussianSpectralElement | ( | ) |
Destructor.
|
private |
need to overrride SpectralElement::_set() because _param[2] is sigma but the second param of the corresponding casacore::Gaussian1D function is the FWHM :(
|
virtual |
Implements casa::SpectralElement.
casacore::Bool casa::GaussianSpectralElement::fixedSigma | ( | ) | const |
void casa::GaussianSpectralElement::fixSigma | ( | const casacore::Bool | fix = true | ) |
|
virtual |
Implements casa::PCFSpectralElement.
|
virtual |
Implements casa::PCFSpectralElement.
|
virtual |
get the integral from -inf to inf
Implements casa::PCFSpectralElement.
casacore::Double casa::GaussianSpectralElement::getSigma | ( | ) | const |
Assignment (copy semantics)
GaussianSpectralElement& operator=(const GaussianSpectralElement &other); Evaluate the value of the element at x casacore::Double operator()(const casacore::Double x) const;
casacore::Double casa::GaussianSpectralElement::getSigmaErr | ( | ) | const |
|
virtual |
Get error estimates of parameters.
Reimplemented from casa::PCFSpectralElement.
void casa::GaussianSpectralElement::setFWHM | ( | casacore::Double | fwhm | ) |
void casa::GaussianSpectralElement::setSigma | ( | casacore::Double | sigma | ) |
|
static |
Sigma to FWHM Convert from sigma to FWHM and vice versa.
|
static |
|
virtual |
Save to a record.
For Gaussian elements, the width is defined as a FWHM in the record interface.
Reimplemented from casa::SpectralElement.
|
static |
Sigma to FWHM conversion factor.
Definition at line 78 of file GaussianSpectralElement.h.