28 #ifndef SCIMATH_FITGAUSSIAN_H
29 #define SCIMATH_FITGAUSSIAN_H
31 #include <casacore/casa/aips.h>
32 #include <casacore/casa/Arrays/Matrix.h>
33 #include <casacore/casa/Logging/LogIO.h>
173 T maximumRMS = 1.0,
uInt maxiter = 1024,
174 T convcriteria = 0.0001);
177 T maximumRMS = 1.0,
uInt maxiter = 1024,
178 T convcriteria = 0.0001);
235 #ifndef CASACORE_NO_AUTO_TEMPLATES
236 #include <casacore/scimath/Fitting/FitGaussian.tcc>
Bool converged()
Returns True if the fit (eventually) converged to a value.
uInt nRetryFactors()
Return the number of retry options available.
T chisquared()
Return the chi squared of the fit.
const Matrix< T > & solution()
Allow access to the fit parameters from this class.
Matrix< T > itsSolutionErrors
The errors on the solution parameters.
void setRetryFactors(const Matrix< T > &retryfactors)
Matrix< T > defaultRetryMatrix()
Sets the retry matrix to a default value.
void expandRetryMatrix(uInt rowstoadd)
Add one or more rows to the retry matrix.
uInt countFreeParameters()
Find the number of unmasked parameters to be fit.
Bool & mask(uInt gaussian, uInt parameter)
Mask out some parameters so that they are not modified during fitting.
FitGaussian(uInt dimension, uInt numgaussians)
T RMS()
Return the RMS of the fit.
Matrix< T > itsFirstEstimate
void setFirstEstimate(const Matrix< T > &estimate)
Set the initial estimate (the starting point of the first fit.)
FitGaussian(uInt dimension)
void setMaxTime(Double maxtime)
Set the maximum amount of time to spend (in seconds).
const Bool & mask(uInt gaussian, uInt parameter) const
void setMaxRetries(uInt nretries)
Set the maximum number of retries.
void correctParameters(Matrix< T > ¶meters)
Internal function for ensuring that parameters stay within their stated domains (see Gaussian2D and G...
Matrix< T > fit(const Matrix< T > &pos, const Vector< T > &f, const Vector< T > &sigma, T maximumRMS=1.0, uInt maxiter=1024, T convcriteria=0.0001)
const Matrix< T > & errors()
Matrix< T > fit(const Matrix< T > &pos, const Vector< T > &f, T maximumRMS=1.0, uInt maxiter=1024, T convcriteria=0.0001)
Run the fit, using the data provided in the arguments pos and f.
void setNumGaussians(uInt numgaussians)
Adjust the number of gaussians to fit.
FitGaussian()
Create the fitter.
Matrix< T > itsSolutionParameters
The solutions to the fit.
void setDimensions(uInt dimensions)
Adjust the number of dimensions.
void setRetryFactors()
Set the retry factors, the values that are added/multiplied with the first estimate on subsequent att...
size_t nrow() const
The number of rows in the Matrix, i.e.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.