25#ifndef SCIMATH_FITGAUSSIAN_H
26#define SCIMATH_FITGAUSSIAN_H
28#include <casacore/casa/aips.h>
29#include <casacore/casa/Arrays/Matrix.h>
30#include <casacore/casa/Logging/LogIO.h>
170 T maximumRMS = 1.0,
uInt maxiter = 1024,
171 T convcriteria = 0.0001);
174 T maximumRMS = 1.0,
uInt maxiter = 1024,
175 T convcriteria = 0.0001);
232#ifndef CASACORE_NO_AUTO_TEMPLATES
233#include <casacore/scimath/Fitting/FitGaussian.tcc>
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.
Bool converged()
Returns True if the fit (eventually) converged to a value.
uInt nRetryFactors()
Return the number of retry options available.
const Matrix< T > & solution()
Allow access to the fit parameters from this class.
T chisquared()
Return the chi squared of the fit.
Bool & mask(uInt gaussian, uInt parameter)
Mask out some parameters so that they are not modified during fitting.
Matrix< T > itsSolutionErrors
The errors on the solution parameters.
const Matrix< T > & errors()
void setRetryFactors(const Matrix< T > &retryfactors)
void expandRetryMatrix(uInt rowstoadd)
Add one or more rows to the retry matrix.
uInt countFreeParameters()
Find the number of unmasked parameters to be fit.
FitGaussian(uInt dimension, uInt numgaussians)
T RMS()
Return the RMS of the fit.
Matrix< T > itsFirstEstimate
Matrix< T > defaultRetryMatrix()
Sets the retry matrix to a default value.
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).
void setMaxRetries(uInt nretries)
Set the maximum number of retries.
const Bool & mask(uInt gaussian, uInt parameter) const
void correctParameters(Matrix< T > ¶meters)
Internal function for ensuring that parameters stay within their stated domains (see Gaussian2D and G...
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...
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)
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.