Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_luminosity_distance(redshift):
- '''finds luminosity distance'''
- lum_dist = cosmo.luminosity_distance(redshift)
- tmp = str(lum_dist)
- tmp = tmp.replace("Mpc","")
- tmp = float(tmp)
- return tmp*3.09*10**22
- print lum_dist
- def get_alpha(s1,s2,v1,v2):
- '''gets alpha from two flux densities'''
- top = math.log10(s1/s2)
- bottom = math.log10(v2/v1)
- return top/bottom
- def get_luminosity(D_l,z,a,nu1,nu2,Sv2):
- '''gets luminosity from alpha'''
- Sv2 = (Sv2/1000)*CF
- lum = (4*math.pi*((D_l**2)))*(1/((1+z)**(1+a)))*((nu1/nu2)**a)*(Sv2)
- return lum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement