Moffat: maxK #1208
Labels
bug report
Bug report
numerics
Involving details of the numerical algorithms for performing some calculation(s)
optimization/performance
Related to the speed and/or memory consumption of some aspect of the code
Milestone
Hi,
In the SBMoffat.cpp :
SBMoffat::SBMoffatImpl::maxK()
, I have found this comment (in the case of trunc=0, aka no truncation)Well, the point is that the code reflect this comment, so it rises me a question.
f(r) = C (1+(r/rd)^2)^(-beta)
C = F (beta-1)/( pi rd^2)
f(k) = 2pi rd^2 C \int_0^\infty J_0(krd x) (1+x^2)^(-beta) xdx = (4 F)/(2^beta Gamma(beta-1)) * (k rd)^(beta-1) K[beta-1, k rd]
So as you notice besides some constant what is puzzling to me is the k power scaling in the comment ie k^beta which is not what I find ie k^(beta-1).
f(k) \appros F \sqrt{pi}/Gamma(\beta-1) e^{k rd} (k rd/2)^(beta-3/2)
and then ones needs to solve w/o the F factor
f(maxK) = maxk_threshold
BUT what is used in the code is
" 2 sqrt(pi) (k/2)^(beta-1/2) exp(-k) / Gamma(beta-1) = maxk_threshold"
missing the correct k-scaling (concerning the Flux factor F, the Gaussian case does not takes it onto account so I guess this is the definition of maxk_threshold)
Anyway I puzzled concerning the k-scaling, do I make a mistake or a misunderstanding of the code?
The text was updated successfully, but these errors were encountered: