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

博文

能谱指数相互转化(IDL程序)

已有 2991 次阅读 2013-2-2 19:59 |个人分类:编程笔记|系统分类:科研笔记| 程序, frequency

Pro alpaha_corelate,vx=vx,vr=vr,vo=vo,a_ox,a_ro,a_rx

;+
;NAME:
;     alpaha_corelate
;PURPOSE:
;     known two alpaha in order to make sure the third alpaha
;CALLING SEQUENCE:
;     alpaha_corelate,vx=vx,vr=vr,vo=vo,a_ox,a_ro,a_rx
;INPUT & OUTPUT:
;     a_ox
;     a_ro
;     a_rx
;OPTIONAL KEY INPUT:
;     vx   ---  X-ray frequency
;     vr   ---  Radio frequency
;     vo   ---  Optical frequency
;REVISION HISTORY:
;     Original by DL.Wang,May-12-2007
;-

    if n_params() lt 2 then begin
       print,'Syntax - alpaha_corelate,a_ox,,a_ro,a_rx'
       return
    endif

    nox=n_elements(a_ox)<1
    nro=n_elements(a_ro)<1
    nrx=n_elements(a_rx)<1

    a=alog10(vx/vo)/alog10(vx/vr)

    b=alog10(vo/vr)/alog(vx/vr)

;Check which two parameters are defined, and then determine the other
    if (nox and nro) then begin
        a_rx = a * a_ox + b * a_ro
    endif

    if (nrx and nro) then begin
        a_ox = (a_rx - b * a_ro)/ a
    endif

    if (nrx and nox) then begin
        a_ro = (a_rx - a * a_ox)/b
    endif

end 


https://blog.sciencenet.cn/blog-456360-658877.html

上一篇:用相对星等计算绝对星等(IDL程序)
下一篇:同波段不同波长范围的能谱指数转化(IDL程序)
收藏 IP: 123.86.145.*| 热度|

0

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

数据加载中...

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

GMT+8, 2024-11-27 10:59

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部