Function dn4000a,wave,flux,select=select
;+
;NAME:
; dn4000a
;PURPOSE:
; compute 4000A break
;CALLING SEQUENCE:
; result=dn4000a(wave,flux,select=select)
;INPUT:
; wave --- rest frame wavelength in Unit:A
; flux --- flux
;OUTPUT:
; dn_4000 --- 4000A break
;REVISION HISTORY:
; Original by DL.Wang,Dec-05-2007
;-
if not keyword_set(select) then begin
print,'wavelength limit select:'
print,'--------------------------------------------'
print,' 1: Bruzual 1983'
print,' 2: Balogh 1999'
print,'--------------------------------------------'
read,select
endif
case select of
1:wavelimit=[3750.0, 3950.0, 4050.0, 4250.0]
2:wavelimit=[3850.0, 3950.0, 4000.0, 4100.0]
endcase
wave_blue=where(wave ge wavelimit[0] and wave le wavelimit[1],blue)
wave_red=where(wave ge wavelimit[2] and wave le wavelimit[3],red)
if blue gt 0 and red gt 0 then begin
flux_blue=int_tabulated(wave[wave_blue],flux[wave_blue]*wave[wave_blue]*wave[wave_blue])
flux_blue_mean=flux_blue/(wavelimit[1]-wavelimit[0])
flux_red=int_tabulated(wave[wave_red],flux[wave_red]*wave[wave_red]*wave[wave_red])
flux_red_mean=flux_red/(wavelimit[3]-wavelimit[2])
dn_4000=flux_red_mean/flux_blue_mean
endif else begin
dn_4000=-999.9
endelse
return,dn_4000
End
https://blog.sciencenet.cn/blog-456360-658962.html
上一篇:
计算BPT图上的y轴偏离角(IDL程序)下一篇:
Linux系统下处理Chandra卫星的X射线数据ACIS(IDL程序)