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

Describes the often used for determining spectral index plus higher order terms: y = log (S_x) = ln(c_0) + c_1*ln(x) + c_2*ln(x)**2 + c_3*ln(x)**3 +... where c_1 is the traditional spectral index (alpha). More...

#include <LogTransformedPolynomialSpectralElement.h>

Inheritance diagram for casa::LogTransformedPolynomialSpectralElement:
casa::PolynomialSpectralElement casa::SpectralElement

Public Member Functions

 LogTransformedPolynomialSpectralElement (casacore::uInt order)
 Constructor. More...
 LogTransformedPolynomialSpectralElement (const casacore::Vector< casacore::Double > &param)
 Construct with the given parameters. More...
 LogTransformedPolynomialSpectralElement (const LogTransformedPolynomialSpectralElement &other)
 Copy constructor (deep copy) More...
 ~LogTransformedPolynomialSpectralElement ()
LogTransformedPolynomialSpectralElementoperator= (const LogTransformedPolynomialSpectralElement &other)
SpectralElementclone () const
- Public Member Functions inherited from casa::PolynomialSpectralElement
 PolynomialSpectralElement ()
 Useless constructor for anythong but allocating memory in a casacore::Vector etc. More...
 PolynomialSpectralElement (const casacore::uInt n)
 Construct an n-degree polynomial. More...
 PolynomialSpectralElement (const casacore::Vector< casacore::Double > &param)
 Construct the given tp with the given param. More...
 PolynomialSpectralElement (const PolynomialSpectralElement &other)
 Copy constructor (deep copy) More...
 ~PolynomialSpectralElement ()
SpectralElementclone () const
casacore::uInt getDegree () const
 Get the degree of polynomial. 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::Double
get () const
void getError (casacore::Vector< casacore::Double > &err) const
 Get error estimates of parameters. More...
< 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...
virtual void set (const casacore::Vector< casacore::Double > &params)
 set parameters More...

Additional Inherited Members

- Public Types inherited from casa::SpectralElement
enum  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 the often used for determining spectral index plus higher order terms: y = log (S_x) = ln(c_0) + c_1*ln(x) + c_2*ln(x)**2 + c_3*ln(x)**3 +... where c_1 is the traditional spectral index (alpha).

Intended use:

Public interface

Review Status

Date Reviewed:
Test programs:



From power law, logarithm, and polynomial and spectral line and element


Describes a function that can be used to fit for spectral index and higher order terms. The implementation simply subclasses PolynomialSpectralElement since that's all this function really is, whicht the exception the the lhs is ln(y) not y. This means it's the fitter configurator's responsibility to pass in the ln of the actual ordinate values and the ln of the abscissa values, not the ordinate and abscissa values themselves. Essentially, this class differs from PolynomialSpectralElement in its type and its stream operator.



To have a spectral element representing a spectral index function.

Definition at line 73 of file LogTransformedPolynomialSpectralElement.h.

Constructor & Destructor Documentation

casa::LogTransformedPolynomialSpectralElement::LogTransformedPolynomialSpectralElement ( casacore::uInt  order)


The n coefficients c_i to be solved for are c_0 + c_1 * ln(x) + c_2 * ln(x)**2 + c_3 * ln(x)**3 +... c_(n-1)*ln(x)**(n-1) where x = nu/nu0. order</order> is the polynomial, so the actual function will have order+1 coefficients

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

Construct with the given parameters.

See above constructor for order in which the parameters should be supplied.

casa::LogTransformedPolynomialSpectralElement::LogTransformedPolynomialSpectralElement ( const LogTransformedPolynomialSpectralElement other)

Copy constructor (deep copy)

casa::LogTransformedPolynomialSpectralElement::~LogTransformedPolynomialSpectralElement ( )

Member Function Documentation

SpectralElement* casa::LogTransformedPolynomialSpectralElement::clone ( ) const

Implements casa::SpectralElement.

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

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