mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx::math::fit::array2FitGaussian2D< realT > Struct Template Reference

template<typename realT>
struct mx::math::fit::array2FitGaussian2D< realT >

Wrapper for a native array to pass to levmarInterface, with 2D Gaussian details.

Supports fixing G0, G, x0, and y0 independently. The shape and orientation can be fixed, but for the general form, sigma_x, sigma_y, and theta can only be fixed together.

Definition at line 46 of file array2FitGaussian2D.hpp.

#include <math/fit/array2FitGaussian2D.hpp>

Public Member Functions

void setFixed (bool G0, bool G, bool x0, bool y0, bool sigma_x, bool sigma_y, bool theta)
 Set whether each parameter is fixed. More...
 

Public Attributes

realT * data {nullptr}
 Pointer to the array. More...
 
size_t nx {0}
 X dimension of the array. More...
 
size_t ny {0}
 Y dimension of the array. More...
 
realT * mask {nullptr}
 Pointer to the (optional) mask array. Any 0 pixels are excluded from the fit. More...
 
int m_sigma_x_idx {4}
 Index of sigma_x in the parameters. Re-used for a. More...
 
int m_sigma_y_idx {5}
 Index of sigma_y in the parameters. Re-used for b. More...
 
int m_theta_idx {6}
 Index of theta in the parameters. Re-used for c. More...
 
int m_sigma_idx {4}
 Index of sigma in the symmetric case. More...
 

Member Function Documentation

◆ setFixed()

template<typename realT >
void mx::math::fit::array2FitGaussian2D< realT >::setFixed ( bool  G0,
bool  G,
bool  x0,
bool  y0,
bool  sigma_x,
bool  sigma_y,
bool  theta 
)

Set whether each parameter is fixed.

Sets the parameter indices appropriately.

Definition at line 180 of file array2FitGaussian2D.hpp.

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

Referenced by mx::math::fit::fitGaussian2D< fitterT >::setFixed().

Member Data Documentation

◆ data

template<typename realT >
realT* mx::math::fit::array2FitGaussian2D< realT >::data {nullptr}

Pointer to the array.

Definition at line 48 of file array2FitGaussian2D.hpp.

Referenced by mx::math::fit::fitGaussian2D< fitterT >::setArray().

◆ m_sigma_idx

template<typename realT >
int mx::math::fit::array2FitGaussian2D< realT >::m_sigma_idx {4}

Index of sigma in the symmetric case.

Definition at line 76 of file array2FitGaussian2D.hpp.

◆ m_sigma_x_idx

template<typename realT >
int mx::math::fit::array2FitGaussian2D< realT >::m_sigma_x_idx {4}

Index of sigma_x in the parameters. Re-used for a.

Definition at line 72 of file array2FitGaussian2D.hpp.

◆ m_sigma_y_idx

template<typename realT >
int mx::math::fit::array2FitGaussian2D< realT >::m_sigma_y_idx {5}

Index of sigma_y in the parameters. Re-used for b.

Definition at line 73 of file array2FitGaussian2D.hpp.

◆ m_theta_idx

template<typename realT >
int mx::math::fit::array2FitGaussian2D< realT >::m_theta_idx {6}

Index of theta in the parameters. Re-used for c.

Definition at line 74 of file array2FitGaussian2D.hpp.

◆ mask

template<typename realT >
realT* mx::math::fit::array2FitGaussian2D< realT >::mask {nullptr}

Pointer to the (optional) mask array. Any 0 pixels are excluded from the fit.

Definition at line 52 of file array2FitGaussian2D.hpp.

Referenced by mx::math::fit::fitGaussian2D< fitterT >::setArray().

◆ nx

template<typename realT >
size_t mx::math::fit::array2FitGaussian2D< realT >::nx {0}

X dimension of the array.

Definition at line 49 of file array2FitGaussian2D.hpp.

Referenced by mx::math::fit::fitGaussian2D< fitterT >::setArray().

◆ ny

template<typename realT >
size_t mx::math::fit::array2FitGaussian2D< realT >::ny {0}

Y dimension of the array.

Definition at line 50 of file array2FitGaussian2D.hpp.

Referenced by mx::math::fit::fitGaussian2D< fitterT >::setArray().


The documentation for this struct was generated from the following file: