Created
January 29, 2024 16:09
-
-
Save syrte/027227164d0a3ed33e566fa6bf65065d to your computer and use it in GitHub Desktop.
To compute the coefficient for Sersic or Einasto profile with half-mass radius
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.special import gammaincinv | |
def b(n): | |
# 2 * n - 1 / 3 + 4 / (405 * n) + 46 / (25515 * n**2) + 131 / (1148175 * n**3) | |
return gammaincinv(2 * n, 0.5) | |
def d(n): | |
# 3 * n - 1 / 3 + 8 / (1215 * n) + 184 / (229635 * n**2) + 1048 / (31000725 * n**3) | |
return gammaincinv(3 * n, 0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment