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

博文

写一个与NVSS做位置匹配的源列表文件(IDL程序)

已有 2626 次阅读 2013-1-30 12:36 |个人分类:编程笔记|系统分类:科研笔记| 程序, write, Source, Dec

Pro nvss_upfile,ra,dec,radius=radius,filename=filename,format=format
;+
;NAME:
;     nvss_upfile
;PURPOSE:
;     write a upfile for NVSS matched source
;CALLING SEQUENCE:
;     nvss_upfile,ra,dec,filename=filename
;
;INPUT:
;     ra    -----  RA for source in Unit:degree
;     dec   -----  DEC for source in Unit:degree
;OPTIONAL KEYWORD INPUT:
;     radius  ----  matched radius in Unit:arcsec
;                   default it,it will set it 15 arcsec
;     format  ----  if set it,it will output according to format
;OPTIONAL KEYWORD OUT:
;     filename  ----  upfile name
;EXAMPLE:
;     IDL>  nvss_upfile,ra,dec,filename='NVSS_update.dat'
;
;REVISION HISTORY:
;     Original by DL.Wang,Aug-30-2007
;-
    if ( N_PARAMS() lt 2 ) then begin
       message,'Syntax:nvss_upfile,ra,dec,[ radius=radius, .... ]'
       return
    endif
    if not keyword_set(radius) then radius=15
    openw,lun,filename,/get_lun
    n=n_elements(ra)
    for i=0L,n-1 do begin
        if not keyword_set(format) then begin
           printf,lun,adstring(ra[i],dec[i],1),' ',radius,' ','0'
        endif else begin
           printf,lun,adstring(ra[i],dec[i],1),radius,'0',format=format
        endelse
    endfor
    free_lun,lun
End       


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

上一篇:由SDSS的测光坐标得到SDSS源的名字(IDL程序)
下一篇:读取NVSSlist的输出文件(IDL程序)
收藏 IP: 159.226.148.*| 热度|

0

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

数据加载中...

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

GMT+8, 2024-11-23 18:55

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部