27#ifndef math_func_moffat_hpp
28#define math_func_moffat_hpp
71template <
typename realT>
80 return I0 + Ipk * pow(
static_cast<realT
>( 1 ) + pow( x - x0, 2 ) / pow( alpha, 2 ), -beta );
84moffat<float>(
const float x,
const float I0,
const float Ipk,
const float x0,
const float alpha,
const float beta );
86extern template double moffat<double>(
87 const double x,
const double I0,
const double Ipk,
const double x0,
const double alpha,
const double beta );
89extern template long double moffat<long double>(
const long double x,
91 const long double Ipk,
93 const long double alpha,
94 const long double beta );
101 const __float128 alpha,
102 const __float128 beta );
124template <
typename realT>
135 return I0 + Ipk * pow(
static_cast<realT
>( 1 ) + ( pow( x - x0, 2 ) + pow( y - y0, 2 ) ) / pow( alpha, 2 ), -beta );
138extern template float moffat2D<float>(
const float x,
147extern template double moffat2D<double>(
const double x,
156extern template long double moffat2D<long double>(
const long double x,
158 const long double I0,
159 const long double Ipk,
160 const long double x0,
161 const long double y0,
162 const long double alpha,
163 const long double beta );
169 const __float128 Ipk,
172 const __float128 alpha,
173 const __float128 beta );
189template <
typename realT>
194 return 2 * alpha * sqrt( pow(
static_cast<realT
>( 2 ),
static_cast<realT
>( 1 ) / beta ) - 1 );
197extern template float moffatFWHM(
float alpha,
float beta );
199extern template double moffatFWHM(
double alpha,
double beta );
201extern template long double moffatFWHM(
long double alpha,
long double beta );
204extern template __float128
moffatFWHM( __float128 alpha, __float128 beta );
realT moffatFWHM(realT alpha, realT beta)
Compute the full-width at half-maximum of a Moffat profile.
realT moffat(const realT x, const realT I0, const realT Ipk, const realT x0, const realT alpha, const realT beta)
Find value at position (x) of the 1D arbitrarily-centered symmetric unnormalized Moffat function.
realT moffat2D(const realT x, const realT y, const realT I0, const realT Ipk, const realT x0, const realT y0, const realT alpha, const realT beta)
Find value at position (x,y) of the 2D arbitrarily-centered unnormalized symmetric Moffat function.