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

博文

我常用的idl程序或函数名(留个备份,以待后用)

已有 4669 次阅读 2011-10-9 20:30 |个人分类:CFHT|系统分类:科研笔记| 程序

  1. NAME: GETROT
    ; PURPOSE: Return the rotation and plate scale of an image from its FITS header
    ; EXPLANATION:  Derive the counterclockwise rotation angle, and the X and Y scale
    ;     factors of an image, from a FITS image header.   The input parameter
    ;     may be either a FITS image header or an astrometry structure (as
    ;     obtained by extast.pro)

      CALLING SEQUENCE: GETROT, Hdr, [ Rot, CDelt, /SILENT, DEBUG =  ]  or GETROT, Astr, Rot,CDelt...

(Calabretta & Greisen (2002, A&A, 395, 1077) FITs standard))

  1.  NAME ADXY
     PURPOSE:Use a FITS header to convert astronomical to pixel coordinates
    ; EXPLANAtion Use an image header to compute X and Y positions, given the RA and Dec (or longitude, latitude) in decimal degrees. 
    ; CALLING SEQUENCE: ADXY, HDR  ;Prompt for Ra and DEC
    ;                   ADXY, hdr, a, d, x, y, [ /PRINT, ALT= ]
  2. XYAD
         PURPOSE: Use a FITS header to convert pixel (X,Y) to world coordinates
     CALLING SEQUENCE:    XYAD, HDR ;Prompt for X and Y positions ; XYAD, HDR, X, Y, A, D, [ /PRINT, /Galactic, /Celestial, /Ecliptic, ; ALT =, PRECISION=]
     3. ARROW: The ARROW procedure draws one or more vectors with arrow heads.
ARROW, X0, Y0, X1, Y1 [, /DATA | , /NORMALIZED] [, HSIZE=length] [, COLOR=index] [, HTHICK=value] [, /SOLID] [, THICK=value]
Note: you should use the plot first the arrow can work.
EG: plot, X0, YO, psym = 3, symsize =2, xtitle = 'RA(d)', ytitle = 'DEC(d)'
arrow, ........
HSIZE :是关于箭头大小的参数,可设 50-100.

   

3.The ROUND function rounds the argument to its closest integer     Result = ROUND(X [, /L64 ] )

4. CURVEFIT

The CURVEFIT function uses a gradient-expansion algorithm to compute a non-linear least squares fit to a user-supplied function with an arbitrary number of parameters. The user-supplied function may be any non-linear function where the partial derivatives are known or can be approximated. Iterations are performed until the chi square changes by a specified amount, or until a maximum number of iterations have been performed. The CURVEVIT function returns a vector of values for the dependent variables, as fitted by the function fit.

Result = CURVEFIT( X, Y, Weights, A [, Sigma] )

Arguments
X

An n -element vector of independent variables.

Y

A vector of dependent variables, the same length as X .

Weights

For instrumental (Gaussian) weighting, set Weights i = 1.0/standard_deviation( Y i ) 2 . For statistical (Poisson) weighting, Weights i = 1.0/ Y i . For no weighting, set Weights i = 1.0.

A

A vector with as many elements as the number of terms in the user-supplied function, containing the initial estimate for each parameter. On return, the vector A contains the fitted model parameters. If A is double-precision, calculations are performed in double-precision arithmetic, otherwise they are performed in single-precision arithmetic.

Sigma

A named variable that will contain a vector of standard deviations for the elements of the output vector A .             

Smooth The SMOOTH function returns a copy of Array smoothed with a boxcar average of the specified width. The result has the same type and dimensions as Array. The algorithm used by SMOOTH is:

 

 

smooth funcation



https://blog.sciencenet.cn/blog-568426-494961.html

上一篇:linux 系统备份或对全盘数据进行操作及通过终端对系统进行更新
下一篇:安装idl后装IDL Astronomy User's Library
收藏 IP: 159.226.71.*| 热度|

0

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

数据加载中...

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

GMT+8, 2024-9-27 10:48

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部