deliangwang的个人博客分享 http://blog.sciencenet.cn/u/deliangwang

博文

用x射线的积分流量计算单色流量(IDL程序)

已有 3350 次阅读 2013-2-2 20:20 |个人分类:编程笔记|系统分类:科研笔记| Energy, X射线, result, 流量

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程序)
收藏 IP: 123.86.145.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-11-23 19:16

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部