Function absmag, mag, z, extinction=extinction, powindex=powindex, $
h0=h0, k=k, Omega_M=Omega_M, Lambda0=Lambda0, q0=q0, $
Silent = silent
;+
;NAME:
; absmag
;PURPOSE:
; Calculate the absolute magitude from the relative magitude
;CALLING SEQUENCE:
; result=absmag(mag,z)
;INPUT:
; mag --- the relative magitude
; z --- redshift
;OPTIONAL KEYWORD INPUT:
; H0 --- Hubble parameter in km/s/Mpc, default is 70
; k --- curvature constant, normalized to the closure density.
; Default is 0, indicating a flat universe
; Omega_m --- Matter density, normalized to the closure density,
; default is 0.3. Must be non-negative
; Lambda0 --- Cosmological constant, normalized to the closure
; density,default is 0.7
; q0 --- Deceleration parameter,
; numeric scalar = -R*(R'')/(R')^2,
; default is -0.55
;
;OUTPUT:
; absmag --- the absolute magitude
;PROCESS:
; lumindist(), alog10()
;REVISION HISTORY:
; Original by DL.Wang,Jul-26-2007
;-
if not keyword_set(extinction) then extinction=0.0
if not keyword_set(powindex) then powindex=1.0
cosmo_param,Omega_m,Lambda0,k,q0
if N_elements(H0) EQ 0 then H0 = 70
if not keyword_set(silent) then $
print,'LUMDIST: H0:', h0, ' Omega_m:', omega_m, ' Lambda0',lambda0, $
' q0: ',q0, ' k: ', k, f='(A,I3,A,f5.2,A,f5.2,A,f5.2,A,F5.2)'
Kcorrection=2.5D0*(-1.0D0-powindex)*alog10(1.0D0+z)
dL=lumdist(z,h0=h0,k=k,Omega_M=Omega_M,Lambda0=Lambda0,q0=q0)
absmag=mag-extinction-Kcorrection-5.0D0*alog10(dL)-25.0
return, absmag
End
https://blog.sciencenet.cn/blog-456360-658874.html
上一篇:
图解钱穆先生的《中国历代政治得失》(二)下一篇:
能谱指数相互转化(IDL程序)