FUNCTION flux_mono_x,flux,en1=en1,en2=en2,en0=en0,powerindex=powerindex
;+
;NAME:
; flux_x
;PURPOSE:
; compute single-color flux from flux
;CALLING SEQURE:
; result=flux_mono_x(flux,en1=en1,en2=en2,en0=en0,powerindex=powerindex)
;
;INPUT:
; flux - flux in erg/s/cm^2
;OPTIONAL KEYWORD INPUT:
; e2 - energy for the end of band in keV
; e1 - energy for the start of band in keV
; e0 - energy for the needed data of band in keV
; powerindex - power law index
;
;OUTPUT:
; flux_v - single-color flux in erg/s/cm^2/Hz
;
;REVISON HISTORY
; Original by D L.Wang,15-Nov-2006
; rewrite by D L.Wang,3-Nov-2011
;-
;-----------------;
;Trans keV to erg ;
;-----------------;
keV=2.417988D+17 ;Hz
;--------------------;
;compute single flux ;
;--------------------;
Ae0=flux
index=where(powerindex eq 1.0,nu,complement=indey)
if nu gt 0 then begin
Ae0[index]=flux[index]/alog(en2/en1)
endif else begin
ss=1.0D0-powerindex
C0=(en2^ss-en1^ss)/ss
Ae0[indey]=flux[indey]/C0
endelse
flux_v=Ae0/(en0^powerindex)/keV
return,flux_v
end
https://blog.sciencenet.cn/blog-456360-658890.html
上一篇:
距离不同单位表达转化(IDL程序)下一篇:
喷流强度计算(IDL程序)