casa::GaussianSpectralElement Class Reference

Describes a Gaussian spectral line. More...

#include <GaussianSpectralElement.h>

Inheritance diagram for casa::GaussianSpectralElement:
casa::PCFSpectralElement casa::SpectralElement

List of all members.

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 > &param)
 Construct the given tp with the given param.
 GaussianSpectralElement (const GaussianSpectralElement &other)
 Copy constructor (deep copy).
 ~GaussianSpectralElement ()
 Destructor.
SpectralElementclone () 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 :(

Detailed Description

Describes a Gaussian spectral line.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd
Test programs:
tSpectralFit

Prerequisite

Etymology

From Gaussian and spectral line and element

Synopsis

The GaussianSpectralElement class describes a Gaussian spectral line.

Example

Motivation

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.


Constructor & Destructor Documentation

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.

Thrown Exceptions

  • AipsError if sigma == 0.0
  • AipsError if type not GAUSSIAN
casa::GaussianSpectralElement::GaussianSpectralElement ( const Vector< Double > &  param  ) 

Construct the given tp with the given param.

Thrown Exceptions

  • AipsError if incorrect number of parameters (e.g. not 3 for GAUSSIAN)
  • AipsError if sigma == 0.0
casa::GaussianSpectralElement::GaussianSpectralElement ( const GaussianSpectralElement other  ) 

Copy constructor (deep copy).

Thrown Exceptions

  • AipsError if sigma == 0.0
casa::GaussianSpectralElement::~GaussianSpectralElement (  ) 

Destructor.


Member Function Documentation

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]
Double casa::GaussianSpectralElement::getFWHMErr (  )  const [virtual]
Double casa::GaussianSpectralElement::getIntegral (  )  const [virtual]

get the integral from -inf to inf

Implements casa::PCFSpectralElement.

Double casa::GaussianSpectralElement::getSigma (  )  const

Assignment (copy semantics).

Thrown Exceptions

  • AipsError if sigma == 0.0

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.


Member Data Documentation

Sigma to FWHM conversion factor.

Definition at line 78 of file GaussianSpectralElement.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1