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

Describes a single Lorentzian spectral profile. More...

#include <LorentzianSpectralElement.h>

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

Public Member Functions

 LorentzianSpectralElement (const casacore::Double ampl, const casacore::Double center, const casacore::Double fwhm)
 Construct with given type and values. More...
 
 LorentzianSpectralElement (const casacore::Vector< casacore::Double > &param)
 
 LorentzianSpectralElement (const LorentzianSpectralElement &other)
 Copy constructor (deep copy) More...
 
 ~LorentzianSpectralElement ()
 
SpectralElementclone () const
 
LorentzianSpectralElementoperator= (const LorentzianSpectralElement &other)
 Assignment (copy semantics) More...
 
void setFWHM (casacore::Double fwhm)
 
casacore::Double getFWHM () const
 
casacore::Double getFWHMErr () const
 
casacore::Double getIntegral () const
 get the integral of the function 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 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 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...
 

Private Member Functions

 LorentzianSpectralElement ()
 has amp = 1, center = 0, and fwhm = 1 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...
 
- 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

Describes a single Lorentzian spectral profile.

Intended use:

Public interface

Review Status

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

Prerequisite

Etymology

From Lorentzian and spectral profile and element

Synopsis

The LorentzianSpectralElement class describes a Lorentzian spectral profile.

Example

Motivation

To have a container for data descrbing a Lorentzian spectral profile for fitting to an observed spectrum

Definition at line 63 of file LorentzianSpectralElement.h.

Constructor & Destructor Documentation

casa::LorentzianSpectralElement::LorentzianSpectralElement ( const casacore::Double  ampl,
const casacore::Double  center,
const casacore::Double  fwhm 
)

Construct with given type and values.

Thrown Exceptions

casa::LorentzianSpectralElement::LorentzianSpectralElement ( const casacore::Vector< casacore::Double > &  param)
casa::LorentzianSpectralElement::LorentzianSpectralElement ( const LorentzianSpectralElement other)

Copy constructor (deep copy)

casa::LorentzianSpectralElement::~LorentzianSpectralElement ( )
casa::LorentzianSpectralElement::LorentzianSpectralElement ( )
private

has amp = 1, center = 0, and fwhm = 1

Member Function Documentation

SpectralElement* casa::LorentzianSpectralElement::clone ( ) const
virtual

Implements casa::SpectralElement.

casacore::Double casa::LorentzianSpectralElement::getFWHM ( ) const
inlinevirtual
casacore::Double casa::LorentzianSpectralElement::getFWHMErr ( ) const
inlinevirtual
casacore::Double casa::LorentzianSpectralElement::getIntegral ( ) const
virtual

get the integral of the function

Implements casa::PCFSpectralElement.

LorentzianSpectralElement& casa::LorentzianSpectralElement::operator= ( const LorentzianSpectralElement other)

Assignment (copy semantics)

void casa::LorentzianSpectralElement::setFWHM ( casacore::Double  fwhm)
inline

Definition at line 89 of file LorentzianSpectralElement.h.

References casa::PCFSpectralElement::setWidth().


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