Chinese Virtual Observatory IDL Guangzhou 2007 IDL Goddard
Chinese Virtual Observatory IDL语言在天文学中的应用 王凤飞 中科院国家天文台 Guangzhou 2007
IDL在天文学中的应用 • 早期由Goddard Space Flight Center编写的 IDL包,用于哈勃望远镜的GHRS和STIS项目的 二维光谱的分析 China-VO, Guangzhou 11. 20 -11. 21, 2007 11
获取IDL天文包和学习IDL • • • • • IDL Astronomy User's Library http: //idlastro. gsfc. nasa. gov/homepage. html http: //idlastro. gsfc. nasa. gov/ftp/astron. tar. gz FITS http: //idlastro. gsfc. nasa. gov/fitsio. html Solar Software http: //lmsal. com/solarsoft/sswdoc/index_menu. html ftp: //sohoftp. nascom. nasa. gov/solarsoft/offline/swmaint/tar/ ssw_gen. tar. Z Coyote’s Guide to IDL Programming http: //www. dfanning. com ftp: //ftp. dfanning. com/pub/dfanning/outgoing/coyote 2 nd/ IDL Newsgroup (comp. lang. idl-pvwave) http: //groups. google. com/group/comp. lang. idl-pvwave Markwardt IDL Library (Fitting) http: //cow. physics. wisc. edu/~craigm/idl. html JHUAPL IDL Library http: //fermi. jhuapl. edu/s 1 r/idl/s 1 rlib/local_idl. html IDL + EMACS http: //www. idlwave. org/ http: //idlwave. org/download/idlwave-help. tar. bz 2 China-VO, Guangzhou 11. 20 -11. 21, 2007 12
NASA Astronomy Library (http: //idlastro. gsfc. nasa. gov/homepage. html) • best way to read FITS data • Hundreds of useful, and well-tested routines for math, statistics, and astronomical utilities • Should already be on your path • The Astronomy Links page is the source of IDL software used for astronomy China-VO, Guangzhou 11. 20 -11. 21, 2007 13
Contents of the IDL Astronomy Users Library Astronomical Utilities DAOPHOT-Type Photometry Procedures Database Procedures Disk I/O (MIDAS, IRAF files) FITS Astrometry and Calibration STSDAS Image manipulation FITS ASCII & Binary Table I/O FITS Binary Table Extensions I/O FITS I/O Image Manipulation Math and Statistics Plotting Procedures Robust Statistics Procedures IDL Structure procedures STSDAS (Binary) Table I/O Web Socket Procedures TV Display Procedures Miscellaneous (Non-Astronomy) Procedures China-VO, Guangzhou 11. 20 -11. 21, 2007 14
Astronomy utilities • The subdirectory astro includes about 80 mostly self-contained astronomy utilities. A_b Compute B band interstellar extinction according to the RC 2. ADSTRING Return RA and Dec as character string(s) in sexigesimal format. AIRTOVAC Convert air wavelengths to vacuum wavelengths AITOFF Convert longitude, latitude to X, Y using an AITOFF projection. AITOFF_GRID Produce an overlay of latitude and longitude lines over a plot or image ARCBAR Draw an arc bar on an image showing the astronomical plate scale ARROWS To display "weathervane" directional arrows on an astronomical image ASTDISP Print astronomical and pixel coordinates in a standard format ASTRO Interactive utility for precession and coordinate conversion. China-VO, Guangzhou 11. 20 -11. 21, 2007 15
FITS I/O in the IDL Astronomy Library • MRDFITS()/MWRFITS : read any type of FITS ; Mapping an entire FITS table can incur extra CPU and virtual memory overhead (SDSS) • READFITS()/WRITEFITS : read Unix and bzip 2 compressed files; cannot be used to read variable length binary tables • FX* Procedures : most complete and well-tested ; do not handle ASCII tables; use more loops, so slower. • FITS_* and FTAB_* Procedures : most efficient ; only to recognize the STSc. I Inheritance and Implicit Image Conventions; FITS files cannot be read from a Unix pipe or an internet socket. China-VO, Guangzhou 11. 20 -11. 21, 2007 16
Disk IO (IRAF, MIDAS, and WFPC 2 data) • IDL procedures to read popular disk formats in astronomy: 1. IRAF image (. imh) files (read and write) 2. MIDAS (. BDF and. TBL )image and table files (read and update) 3. WFPC 2 images (FITS or STSDAS) 几个子程序: MID_RD_IMAGE. . . image (. BDF) read, MID_UP_IMAGE. . . image (. BDF) update, MID_RD_TABLE. . . table (. TBL) read, MID_UP_TABLE. . . table (. TBL) update. China-VO, Guangzhou 11. 20 -11. 21, 2007 17
Plotting Procedures • The procedures in this directory are useful additions to the intrinsic IDL plotting capabilities. CLEANPLOT Reset all plotting system variables to their default (X) values LEGEND Create an annotation legend for a plot LEGENDTEST Demo program demonstrating the capabilities of LEGEND LINEID_PLOT Annotate the identified lines in a spectrum MULTIPLOT Create multiple plots with shared axes OPLOTERROR Overplot Y vs. X with optional X and Y error bars PLOTERROR Plot Y vs. X with optional X and Y error bars PLOTHIST Plot the histogram of an array PLOTSYM Define useful plotting symbols not in the standard PSYM definition PARTVELVEC Plot the velocity vectors of a set of particles RDPLOT Like intrinsic CURSOR procedure but with a full-screen cursor SUNSYMBOL() Return the character string to plot a subscripted Sun symbol VSYM Create "Mongo"-like rotationally symmetric polygon plotting symbols China-VO, Guangzhou 11. 20 -11. 21, 2007 18
Math and Statistics • This directory contains IDL mathematics and statistics procedures thought to be of interest in astronomy. Fifteen of the procedures, are adapted from algorithms in "Numerical Recipes 2 nd Edition" • PCA Perform a principal component analysis (Karhunen-Loeve expansion) • GAUSSIAN() Evaluate a 1 -d Gaussian and optionally its derivative China-VO, Guangzhou 11. 20 -11. 21, 2007 19
FFT: removing corrugated effect China-VO, Guangzhou 11. 20 -11. 21, 2007 25
SDSS光�数据�理系 �模�( IDL) China-VO, Guangzhou 11. 20 -11. 21, 2007 27
Thanks for your attention! China-VO, Guangzhou 11. 20 -11. 21, 2007 28
- Slides: 28