Function bpt_class_sefertlinear, flux_nl_hb,flux_nl_o3,flux_nl_ha,flux_nl_s2_o3,select=select
;+
;NAME:
; bpt_class_sefertlinear
;PURPOSE:
; spectra classification by the digarm of BPT narrow emission line
; flux ratio
;CALLING SEQUENCE:
; result=bpt_class_sefertlinear(flux_nl_hb,flux_nl_o3,flux_nl_ha,
; flux_nl_s2_o3,select=select)
;INPUT:
; flux_nl_hb
; flux_nl_o3
; flux_nl_ha
; lux_nl_s2_o3
;OPTIONAL KEYWORD INPUT:
; select ------ 0:[S II] line
; 1:[O I] line
;OUTPUT:
; class
;REVISION HISTORY:
; Original by DL.Wang,May-11-2008
;-
num_hb=n_elements(flux_nl_hb)
num_o3=n_elements(flux_nl_o3)
num_ha=n_elements(flux_nl_ha)
num_s2o3=n_elements(flux_nl_s2_o3)
if (num_hb ne num_o3) or (num_ha ne num_s2o3) then begin
print,'! Please check the number of Variable'
return,0
endif
class=strarr(num_hb)
if (num_hb eq num_o3) and (num_ha eq num_s2o3) then begin
if n_elements(select) eq 0 then begin
print,'[S II}:0'
print,'[O I]:1'
read,select
endif
xx=alog10(flux_nl_s2_o3/flux_nl_ha)
yy=alog10(flux_nl_o3/flux_nl_hb)
case select of
0:begin
limit1=0.72/(xx-0.32)+1.30
limit2=1.89*xx+0.76
for i=0L,num_hb-1 do begin
if xx[i] lt 0.32 then begin
if yy[i] gt limit1[i] and yy[i] gt limit2[i] then class[i]='Seyfert'
if yy[i] gt limit1[i] and yy[i] lt limit2[i] then class[i]='LINERs'
if yy[i] lt limit1[i] then class[i]='HII'
endif
if xx[i] gt 0.32 then begin
if yy[i] gt limit2[i] then class[i]='Seyfert'
if yy[i] lt limit2[i] then class[i]='LINERs'
endif
endfor
return,class
end
1:begin
limit1=0.73/(xx+0.59)+1.33
limit2=1.18*xx+1.30
for i=0L,num_hb-1 do begin
if xx[i] lt -0.59 then begin
if yy[i] gt limit1[i] and yy[i] gt limit2[i] then class[i]='Seyfert'
if yy[i] gt limit1[i] and yy[i] lt limit2[i] then class[i]='LINERs'
if yy[i] lt limit1[i] then class[i]='HII'
endif
if xx[i] gt -0.59 then begin
if yy[i] gt limit2[i] then class[i]='Seyfert'
if yy[i] lt limit2[i] then class[i]='LINERs'
endif
endfor
return,class
end
endcase
endif
end
https://blog.sciencenet.cn/blog-456360-658959.html
上一篇:
画出BPT图中的AGN分类线(IDL程序)下一篇:
计算BPT图上的y轴偏离角(IDL程序)