Closed jecampagne closed 10 months ago
I think "if needed" is the key phrase. Is there a use case you have in mind where this makes a difference? It seems unlikely to me, and since the current formula is both faster to calculate and slightly conservative, I'm inclined to leave it as is.
As you wish no problem.
Hi, I’ve noticed something in the exponential profile. Galsim uses an approximation to get maxk (here it is maxk before dividing by scale_radius)
The exact formula is the following (you can code it differently)
I do not know the exact reason to use the approximated formula. With the default maxk_threshold=10^(-3) one gets 10. (approx) instead of 9.9498, which is 5 per mille diff. Of course the approx goes in the direction to increase a little bi t the maxk which is at least a good point.
But Spergel profile is exactly the exponential one in the case nu=1/2, and it is noticeable then that the maxk formula for Spergel is exact leading to a difference between Exponential & Spergel maxk which I think may be cured easily if needed.