27 #ifndef math_func_moffat_hpp
28 #define math_func_moffat_hpp
72 template<
typename realT>
81 return I0 + Ipk * pow(
static_cast<realT
>(1) + pow(x-x0,2)/pow(alpha,2), -beta);
85 float moffat<float>(
const float x,
const float I0,
const float Ipk,
const float x0,
const float alpha,
const float beta);
88 double moffat<double>(
const double x,
const double I0,
const double Ipk,
const double x0,
const double alpha,
const double beta);
91 long double moffat<long double>(
const long double x,
const long double I0,
const long double Ipk,
const long double x0,
const long double alpha,
const long double beta);
95 __float128 moffat<__float128>(
const __float128 x,
const __float128 I0,
const __float128 Ipk,
const __float128 x0,
const __float128 alpha,
const __float128 beta);
118 template<
typename realT>
129 return I0 + Ipk * pow(
static_cast<realT
>(1) + (pow(x-x0,2)+pow(y-y0,2))/pow(alpha,2), -beta);
133 float moffat2D<float>(
const float x,
const float y,
const float I0,
const float Ipk,
const float x0,
const float y0,
const float alpha,
const float beta);
136 double moffat2D<double>(
const double x,
const double y,
const double I0,
const double Ipk,
const double x0,
const double y0,
const double alpha,
const double beta);
139 long double moffat2D<long double>(
const long double x,
const long double y,
const long double I0,
const long double Ipk,
const long double x0,
const long double y0,
const long double alpha,
const long double beta);
143 __float128 moffat2D<__float128>(
const __float128 x,
const __float128 y,
const __float128 I0,
const __float128 Ipk,
const __float128 x0,
const __float128 y0,
const __float128 alpha,
const __float128 beta);
160 template<
typename realT>
165 return 2*alpha*sqrt( pow(
static_cast<realT
>(2),
static_cast<realT
>(1)/beta) - 1);
169 float moffatFWHM(
float alpha,
float beta);
172 double moffatFWHM(
double alpha,
double beta);
175 long double moffatFWHM(
long double alpha,
long double beta);
179 __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.