mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]

Fitting Gaussians to data. More...

Fitting Gaussians to data.

The Gaussian function is fit to data.

Classes

struct  mx::math::fit::array2FitGaussian1D< realT >
 Wrapper for a native array to pass to levmarInterface, with !D Gaussian details. More...
 
struct  mx::math::fit::array2FitGaussian2D< realT >
 Wrapper for a native array to pass to levmarInterface, with 2D Gaussian details. More...
 
struct  mx::math::fit::gaussian1D_fitter< _realT >
 levmarInterface fitter structure for the symmetric Gaussian. More...
 
class  mx::math::fit::fitGaussian1D< _realT >
 Class to manage fitting a 1D Gaussian to data via the levmarInterface. More...
 
struct  mx::math::fit::gaussian2D_sym_fitter< _realT >
 Alias for the fitGaussian1D type fitting the gaussian. More...
 
class  mx::math::fit::fitGaussian2D< fitterT >
 Class to manage fitting a 2D Gaussian to data via the levmarInterface. More...
 
struct  mx::math::fit::gaussian2D_gen_fitter< _realT >
 levmarInterface fitter structure for the general elliptical Gaussian. More...
 

Typedefs

template<typename realT >
using mx::math::fit::fitGaussian2Dsym = fitGaussian2D< mx::math::fit::gaussian2D_sym_fitter< realT > >
 Alias for the fitGaussian2D type fitting the symmetric gaussian. More...
 
template<typename realT >
using mx::math::fit::fitGaussian2Dgen = fitGaussian2D< mx::math::fit::gaussian2D_gen_fitter< realT > >
 Alias for the fitGaussian2D type fitting the general elliptical gaussian. More...
 

Functions

template<typename realT >
int mx::math::fit::guessGauss2D_ang (realT &Ag, realT &xg, realT &yg, realT &xFWHM, realT &yFWHM, realT &angG, mx::improc::eigenImage< realT > &im, realT maxWidth, realT widthWidth, realT nAngs, realT xg0, realT yg0)
 Form an estimate of the parameters of an elliptical Gaussian from a 2D image. More...
 

Typedef Documentation

◆ fitGaussian2Dgen

template<typename realT >
using mx::math::fit::fitGaussian2Dgen = typedef fitGaussian2D<mx::math::fit::gaussian2D_gen_fitter<realT> >

Alias for the fitGaussian2D type fitting the general elliptical gaussian.

Definition at line 741 of file fitGaussian.hpp.

◆ fitGaussian2Dsym

template<typename realT >
using mx::math::fit::fitGaussian2Dsym = typedef fitGaussian2D<mx::math::fit::gaussian2D_sym_fitter<realT> >

Alias for the fitGaussian2D type fitting the symmetric gaussian.

Definition at line 735 of file fitGaussian.hpp.

Function Documentation

◆ guessGauss2D_ang()

template<typename realT >
int mx::math::fit::guessGauss2D_ang ( realT &  Ag,
realT &  xg,
realT &  yg,
realT &  xFWHM,
realT &  yFWHM,
realT &  angG,
mx::improc::eigenImage< realT > &  im,
realT  maxWidth,
realT  widthWidth,
realT  nAngs,
realT  xg0,
realT  yg0 
)

Form an estimate of the parameters of an elliptical Gaussian from a 2D image.

Note that this assumes that there is no constant value (i.e. it is zero-ed).

Returns
0 if successful
Parameters
[out]Agestimate of the peak
[out]xgestimate of the x-coordinate of the peak
[out]ygestimate of the y-coordinate of the peak
[out]xFWHMestimate of the x-FWHM
[out]yFWHMestimate of the y-FWHM
[out]angGestimate of the angle of the ellipse
[in]imthe image with an elliptical gaussian
[in]maxWidththe width of the box to search for the maximum
[in]widthWidththe radius of the circle to search for the widths
[in]nAngsthe number of angles at which to search for the widths
[in]xg0an initial guess at the x-coordinate of the peak
[in]yg0an initial guess at the y-coordinate of the peak

Definition at line 750 of file fitGaussian.hpp.

References mx::astro::constants::c().