28 #ifndef IMAGEANALYSIS_SPECTRALFITTER_H
29 #define IMAGEANALYSIS_SPECTRALFITTER_H
44 template <
class T>
class ProfileFit1D;
const SpectralFitter::FitStatus & getStatus()
get the status of the last fit
casacore::Vector< casacore::Double > getResidual() const
get all residuals for the last fit
ProfileFit1D< casacore::Double > _fit
casacore::String _resultMsg
SpectralFitter()
default constructor
casacore::Vector< T > getResidual(casacore::Int which=-1, casacore::Bool fit=true) const
ostream-like interface to creating log messages.
casacore::Double _startVal
casacore::Double getChiSquared() const
Get Chi Squared of fit.
casacore::Bool _prepareData(const casacore::Vector< casacore::Float > &xVals, const casacore::Vector< casacore::Float > &eVals, const casacore::Int &startIndex, const casacore::Int &endIndex, casacore::Vector< casacore::Bool > &maskVals, casacore::Vector< casacore::Double > &weightVals) const
prepare the data which means give all data (independent, dependent, weights) to the fitting class ...
casacore::String report(casacore::LogIO &os, const casacore::String &xUnit="", const casacore::String &yUnit="", const casacore::String &yPrefixUnit="") const
report on the last fit to a stream
casacore::uInt _startIndex
casacore::Vector< casacore::Double > getFit() const
get all values for the last fit
virtual ~SpectralFitter()
destructor
casacore::Vector< T > getFit(casacore::Int which=-1) const
bool Bool
Define the standard types used by Casacore.
casacore::Bool _prepareElems(const casacore::Bool fitGauss, const casacore::Bool fitPoly, const casacore::uInt nPoly, casacore::Vector< casacore::Double > &xVals, casacore::Vector< casacore::Double > &yVals, SpectralList &list)
prepare the components that shall be fitted; this includes the setting of reasonable initial paramete...
casacore::Double getNumberIterations() const
get number of iterations for the last fit
virtual casacore::Bool fit(const casacore::Vector< casacore::Float > &spcVals, const casacore::Vector< casacore::Float > &yVals, const casacore::Vector< casacore::Float > &eVals, const casacore::Float startVal, const casacore::Float endVal, const casacore::Bool fitGauss, const casacore::Bool fitPoly, const casacore::uInt nPoly, casacore::String &msg)
Parameters: spcVals - independent values yVals - dependent values eVals - error values startVal - low...
casacore::String _report(casacore::LogIO &os, const SpectralList &list, const casacore::String &xUnit="", const casacore::String &yUnit="", const casacore::String &yPrefixUnit="") const
report on a list of spectral elements to a stream
casacore::Double getNumberIterations() const
Get number of iterations for last fit.
A set of SpectralElements.
FitStatus
Does a simple fit to data in vectors. It is possible to specify weights (or errors) for each element...
casacore::Double getChiSquared() const
get Chi Squared of the last fit
SpectralFitter::FitStatus _fitStatus
String: the storage and methods of handling collections of characters.
const SpectralList & getList(casacore::Bool fit=true) const
Recover the list of elements.
void _setUp()
do all necessary setup
const SpectralList & getList() const
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.