casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
casa::PCFSpectralElement Class Referenceabstract

Abstract base class that describes a spectral profile that can be parameterized by a peak value (amplitude), center, and width. More...

#include <PCFSpectralElement.h>

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

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 > &param)
 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 SpectralElementclone () 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 > &params) 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from casa::SpectralElement
static const casacore::StringallTypes (casacore::Int &nall, const SpectralElement::Types *&typ)
 Get all the types available as casacore::String and codes, and number available. More...
 
static const casacore::StringfromType (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 inherited from casa::SpectralElement
 SpectralElement ()
 
 SpectralElement (Types type, const casacore::Vector< casacore::Double > &parms=casacore::Vector< casacore::Double >(0))
 
 SpectralElement (const SpectralElement &other)
 
SpectralElementoperator= (const SpectralElement &other)
 
void _set (const casacore::Vector< casacore::Double > &params)
 
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
 

Detailed Description

Abstract base class that describes a spectral profile that can be parameterized by a peak value (amplitude), center, and width.

Intended use:

Public interface

Review Status

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

Prerequisite

Etymology

From p(eak), c(enter), f(whm), and spectral line and element

Synopsis

Abstract base class that describes a spectral profile that can be parameterized by a peak value (amplitude), center, and width.

Example

Motivation

To have a class containing common methods for things like Gaussian, Lorentzian, and Voigt profiles.

Definition at line 66 of file PCFSpectralElement.h.

Member Enumeration Documentation

to help avoid having to hard code parameter indices

Enumerator
AMP 
CENTER 
WIDTH 

Definition at line 70 of file PCFSpectralElement.h.

Constructor & Destructor Documentation

virtual casa::PCFSpectralElement::~PCFSpectralElement ( )
virtual

Destructor.

Member Function Documentation

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)
void casa::PCFSpectralElement::fixFWHM ( 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.

virtual casacore::Double casa::PCFSpectralElement::getFWHM ( ) const
pure virtual
virtual casacore::Double casa::PCFSpectralElement::getFWHMErr ( ) const
pure virtual
virtual casacore::Double casa::PCFSpectralElement::getIntegral ( ) const
pure virtual

get the integral from -inf to inf

Implemented in casa::GaussianSpectralElement, and casa::LorentzianSpectralElement.

virtual casacore::Double casa::PCFSpectralElement::getIntegralErr ( ) const
virtual
virtual casacore::Double casa::PCFSpectralElement::getWidth ( ) const
virtual

Get the width.

Referenced by casa::LorentzianSpectralElement::getFWHM().

virtual casacore::Double casa::PCFSpectralElement::getWidthErr ( ) const
virtual

Get the width error estimate.

Referenced by casa::LorentzianSpectralElement::getFWHMErr().

void casa::PCFSpectralElement::set ( const casacore::Vector< casacore::Double > &  param)
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 void casa::PCFSpectralElement::setWidth ( const casacore::Double  width)
virtual

The documentation for this class was generated from the following file: