Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1SpectralFit.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 21:51:39 2011 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п |
Least Squares fitting of spectral elements to spectrum. More...
#include <SpectralFit.h>
Public Member Functions | |
SpectralFit () | |
Default constructor creates a default fitter without elements. | |
SpectralFit (const SpectralList &in) | |
Construct for the given elements. | |
SpectralFit (const SpectralFit &other) | |
Copy constructor (deep copy). | |
~SpectralFit () | |
Destructor. | |
SpectralFit & | operator= (const SpectralFit &other) |
Assignment (copy semantics). | |
void | setFitElement (uInt index, const SpectralElement &elem) |
Set an element to be fitted. | |
void | addFitElement (const SpectralElement &elem) |
Add elements to be fitted. | |
void | addFitElement (const SpectralList &elem) |
void | clear () |
Clear the list to be fitted (for a re-use of the SpectralFit object). | |
const SpectralList & | list () const |
Get the list being fitted. | |
template<class MT > | |
Bool | fit (const Vector< MT > &y, const Vector< MT > &x) |
Fit the elements as given by the specified spectral elements at the frequencies x with values y. | |
template<class MT > | |
Bool | fit (const Vector< MT > &y, const Vector< MT > &x, const Vector< Bool > &mask) |
template<class MT > | |
Bool | fit (const Vector< MT > &sigma, const Vector< MT > &y, const Vector< MT > &x) |
Fit the elements as given by the specified spectral elements at the frequencies x with values y and weights sigma. | |
template<class MT > | |
Bool | fit (const Vector< MT > &sigma, const Vector< MT > &y, const Vector< MT > &x, const Vector< Bool > &mask) |
uInt | nIterations () const |
Get the number of iterations last fit. | |
Double | chiSq () const |
Get ChiSq of the last fit. | |
Private Member Functions | |
template<class MT > | |
Bool | fit (const Vector< MT > &y, const Vector< MT > &x, const Vector< Bool > *mask) |
Real fitters. | |
template<class MT > | |
Bool | fit (const Vector< MT > &sigma, const Vector< MT > &y, const Vector< MT > &x, const Vector< Bool > *mask) |
Private Attributes | |
SpectralList | slist_p |
Elements to be fitted. | |
uInt | iter_p |
Number of iterations last fit. | |
Double | chiSq_p |
ChiSq of last fit. |
Least Squares fitting of spectral elements to spectrum.
Public interface
From spectral line and fitting
The SpectralFit class will do a non-linear least squares solution for a number of simultaneous spectral components. The initial guess of the elements is given in a set of SpectralElements. The final solution is returned in the same set.
To have a contained fitting of spectral profiles to an observed spectrum
Definition at line 79 of file SpectralFit.h.
casa::SpectralFit::SpectralFit | ( | ) |
Default constructor creates a default fitter without elements.
casa::SpectralFit::SpectralFit | ( | const SpectralList & | in | ) | [explicit] |
Construct for the given elements.
casa::SpectralFit::SpectralFit | ( | const SpectralFit & | other | ) |
Copy constructor (deep copy).
casa::SpectralFit::~SpectralFit | ( | ) |
Destructor.
void casa::SpectralFit::addFitElement | ( | const SpectralElement & | elem | ) |
Add elements to be fitted.
void casa::SpectralFit::addFitElement | ( | const SpectralList & | elem | ) |
Double casa::SpectralFit::chiSq | ( | ) | const [inline] |
Get ChiSq of the last fit.
Definition at line 149 of file SpectralFit.h.
References chiSq_p.
Referenced by casa::ProfileFit1D< FitterType >::getChiSquared().
void casa::SpectralFit::clear | ( | ) |
Clear the list to be fitted (for a re-use of the SpectralFit object).
Bool casa::SpectralFit::fit | ( | const Vector< MT > & | y, | |
const Vector< MT > & | x, | |||
const Vector< Bool > & | mask | |||
) | [inline] |
Definition at line 124 of file SpectralFit.h.
References fit().
Bool casa::SpectralFit::fit | ( | const Vector< MT > & | sigma, | |
const Vector< MT > & | y, | |||
const Vector< MT > & | x | |||
) | [inline] |
Fit the elements as given by the specified spectral elements at the frequencies x with values y and weights sigma.
The mask (if specified) means: use point if True.
Definition at line 134 of file SpectralFit.h.
References fit().
Bool casa::SpectralFit::fit | ( | const Vector< MT > & | sigma, | |
const Vector< MT > & | y, | |||
const Vector< MT > & | x, | |||
const Vector< Bool > & | mask | |||
) | [inline] |
Definition at line 139 of file SpectralFit.h.
References fit().
Bool casa::SpectralFit::fit | ( | const Vector< MT > & | y, | |
const Vector< MT > & | x, | |||
const Vector< Bool > * | mask | |||
) | [private] |
Real fitters.
Bool casa::SpectralFit::fit | ( | const Vector< MT > & | sigma, | |
const Vector< MT > & | y, | |||
const Vector< MT > & | x, | |||
const Vector< Bool > * | mask | |||
) | [private] |
Bool casa::SpectralFit::fit | ( | const Vector< MT > & | y, | |
const Vector< MT > & | x | |||
) | [inline] |
Fit the elements as given by the specified spectral elements at the frequencies x with values y.
Weights of all points are equal. The mask (if specified) means: use point if True. Returns the convergence status.
Definition at line 121 of file SpectralFit.h.
Referenced by fit().
const SpectralList& casa::SpectralFit::list | ( | ) | const [inline] |
uInt casa::SpectralFit::nIterations | ( | ) | const [inline] |
Get the number of iterations last fit.
Definition at line 146 of file SpectralFit.h.
References iter_p.
Referenced by casa::ProfileFit1D< FitterType >::getNumberIterations().
SpectralFit& casa::SpectralFit::operator= | ( | const SpectralFit & | other | ) |
Assignment (copy semantics).
void casa::SpectralFit::setFitElement | ( | uInt | index, | |
const SpectralElement & | elem | |||
) |
Double casa::SpectralFit::chiSq_p [private] |
uInt casa::SpectralFit::iter_p [private] |
Number of iterations last fit.
Definition at line 156 of file SpectralFit.h.
Referenced by nIterations().
SpectralList casa::SpectralFit::slist_p [private] |