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. | |
GaussianSpectralElement (const Double ampl, const Double center, const Double sigma) | |
Construct with given type and values. | |
GaussianSpectralElement (const Vector< Double > ¶m) | |
Construct the given tp with the given param. | |
GaussianSpectralElement (const GaussianSpectralElement &other) | |
Copy constructor (deep copy). | |
~GaussianSpectralElement () | |
Destructor. | |
SpectralElement * | clone () const |
Double | getSigma () const |
Assignment (copy semantics). | |
Double | getFWHM () const |
Double | getSigmaErr () const |
Double | getFWHMErr () const |
void | setSigma (Double sigma) |
void | setFWHM (Double fwhm) |
void | fixSigma (const Bool fix=True) |
Bool | fixedSigma () const |
Double | getIntegral () const |
get the integral from -inf to inf | |
Bool | toRecord (RecordInterface &out) const |
Save to a record. | |
void | set (const Vector< Double > &v) |
Get error estimates of parameters. | |
Static Public Member Functions | |
static Double | sigmaFromFWHM (const Double fwhm) |
Sigma to FWHM Convert from sigma to FWHM and vice versa. | |
static Double | sigmaToFWHM (const Double sigma) |
Static Public Attributes | |
static const Double | SigmaToFWHM |
Sigma to FWHM conversion factor. | |
Private Member Functions | |
void | _set (const Vector< Double > &v) |
need to overrride SpectralElement::_set() because _param[2] is sigma but the second param of the corresponding Gaussian1D function is the FWHM :( |
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 Double | ampl, | |
const Double | center, | |||
const Double | sigma | |||
) |
Construct with given type and values.
casa::GaussianSpectralElement::GaussianSpectralElement | ( | const Vector< Double > & | param | ) |
Construct the given tp with the given param.
casa::GaussianSpectralElement::GaussianSpectralElement | ( | const GaussianSpectralElement & | other | ) |
Copy constructor (deep copy).
casa::GaussianSpectralElement::~GaussianSpectralElement | ( | ) |
Destructor.
void casa::GaussianSpectralElement::_set | ( | const Vector< Double > & | v | ) | [private] |
need to overrride SpectralElement::_set() because _param[2] is sigma but the second param of the corresponding Gaussian1D function is the FWHM :(
Reimplemented from casa::SpectralElement.
SpectralElement* casa::GaussianSpectralElement::clone | ( | ) | const [virtual] |
Implements casa::SpectralElement.
Bool casa::GaussianSpectralElement::fixedSigma | ( | ) | const |
void casa::GaussianSpectralElement::fixSigma | ( | const Bool | fix = True |
) |
Double casa::GaussianSpectralElement::getFWHM | ( | ) | const [virtual] |
Implements casa::PCFSpectralElement.
Double casa::GaussianSpectralElement::getFWHMErr | ( | ) | const [virtual] |
Implements casa::PCFSpectralElement.
Double casa::GaussianSpectralElement::getIntegral | ( | ) | const [virtual] |
get the integral from -inf to inf
Implements casa::PCFSpectralElement.
Double casa::GaussianSpectralElement::getSigma | ( | ) | const |
Assignment (copy semantics).
GaussianSpectralElement& operator=(const GaussianSpectralElement &other); Evaluate the value of the element at x Double operator()(const Double x) const;
Double casa::GaussianSpectralElement::getSigmaErr | ( | ) | const |
void casa::GaussianSpectralElement::set | ( | const Vector< Double > & | param | ) | [virtual] |
Get error estimates of parameters.
Reimplemented from casa::PCFSpectralElement.
void casa::GaussianSpectralElement::setFWHM | ( | Double | fwhm | ) |
void casa::GaussianSpectralElement::setSigma | ( | Double | sigma | ) |
static Double casa::GaussianSpectralElement::sigmaFromFWHM | ( | const Double | fwhm | ) | [static] |
Sigma to FWHM Convert from sigma to FWHM and vice versa.
static Double casa::GaussianSpectralElement::sigmaToFWHM | ( | const Double | sigma | ) | [static] |
Bool casa::GaussianSpectralElement::toRecord | ( | RecordInterface & | out | ) | const [virtual] |
Save to a record.
For Gaussian elements, the width is defined as a FWHM in the record interface.
Reimplemented from casa::SpectralElement.
const Double casa::GaussianSpectralElement::SigmaToFWHM [static] |
Sigma to FWHM conversion factor.
Definition at line 78 of file GaussianSpectralElement.h.