Editing Talk:2853: Redshift
Please sign your posts with ~~~~ |
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 31: | Line 31: | ||
# Age of universe at redshift z as a closed-form solution to its integral definition, | # Age of universe at redshift z as a closed-form solution to its integral definition, | ||
− | def age_at_z(z): # ...which is 27 times faster than the original numeric integration | + | def age_at_z(z): # ...which is 27 times faster than the original numeric integration. |
hypergeom = hyp2f1(0.5, 0.5, 1.5, -OL / (Om * (z + 1)**3)) | hypergeom = hyp2f1(0.5, 0.5, 1.5, -OL / (Om * (z + 1)**3)) | ||
return (2/3) * hypergeom / (Om**0.5 * (z + 1)**1.5) * (977.8 / H0) # 977.8 for Gyr | return (2/3) * hypergeom / (Om**0.5 * (z + 1)**1.5) * (977.8 / H0) # 977.8 for Gyr |