📄 astrom.readme
字号:
/astrom January 2008This directory contain IDL procedures for manipulating FITS images which includeheader keywords specifying the coordinate system. The FITS header must followthe world coordinate (WCS) specification in the paper "Representations ofCelestial Coordinates in FITS" by Eric Greisen and Mark Calabretta (2002, A&A,395, 1061). This paper and other WCS documentation may be obtained from http://fits.gsfc.nasa.gov/fits_wcs.html. All projections in that paper are implemented as of May 2004 The IDL code has been validated using the testimages on http://www.atnf.csiro.au/people/mcalabre/WCS/sample_data/index.html Bill Thompson has written a different IDL implementation of the WCSspecification which also includes support fo solar and spectroscopiccoordinates. His routines are available at the SolarSoftWare (SSW) libraryat http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/wcs/The FITS convention defines the center of the first pixel in thearray to have coordinates (1,1). This differs from the IDL convention wherethe first pixel has coordinates (0,0). Whenever an (X,Y) position isextracted or inserted into a FITS header then this difference must be accountedfor.Several procedures use an IDL structure that contains astrometry information inthe following tags: .NAXIS - 2 element long vector giving dimensions of the images .CD - 2 x 2 array containing the astrometry parameters CD1_1 CD1_2 in DEGREES/PIXEL CD2_1 CD2_2 .CDELT - 2 element vector giving physical increment at the reference pixel .CRPIX - 2 element vector giving X and Y coordinates of reference pixel (def = NAXIS/2) in FITS convention (first pixel is 1,1) .CRVAL - 2 element double precision vector giving R.A. and DEC of reference pixel in DEGREES .CTYPE - 2 element string vector giving projection types, default ['RA---TAN','DEC--TAN'] .LONGPOLE - scalar longitude of north pole (default = 180) .LATPOLE - scalar giving native latitude of the celestial pole default=0) .PV2 - Vector of parameters (PV2_1, PV2_2...) needed in some projections .DISTORT - Optional substructure giving distortion parameters. Currently only implemented for the Spitzer simple imaging polynomial (SIP) see http://ssc.spitzer.caltech.edu/postbcd/doc/shupeADASS.pdfThe procedures EXTAST and PUTAST can be used, respectively, to extractastrometry information from a FITS header and place it into an astrometrystructure, and to put the information from an astrometry structure into a FITSheader. IDL> extast, hdr, astr ;Extract astrometry from a FITS header IDL> putast, hdr, astr ;Put astrometry info into a FITS header (1) Following the discussion in Section 5 of the Greisen & Calabretta paper,this software supports three WCS formats: (1) the PC matrix with the separateCDELT parameters (preferred), (2) the CD matrix without CDELT parameters (IRAFstandard), and (3) the old-style AIPS (CDELT + CROTA) notation. The CDELT tagis not used in format (2), and is normally set to [1.0, 1.0]. However, foran AIPS-style header, the CDELT values are stored in the CDELT tag, and theCROTA value is stored in the CD matrix cd = [ [ cos(crota), -sin(crota) ] , [ sin(crota), cos(crota)] ] If either element of the CDELT tag differs from 1.0 then this signals that theastrometry came from an AIPS type header. Programs using the astrometrystructure should always use the following code if N_elements(CDELT) GE 2 then if (cdelt[0] NE 1.0) then begin cd[0,0] = cd[0,0]*cdelt[0] & cd[0,1] = cd[0,1]*cdelt[0] cd[1,1] = cd[1,1]*cdelt[1] & cd[1,0] = cd[1,0]*cdelt[1] endif(2) Earlier draft versions of the World Coordinate System paper represented theCD matrix in a FITS header with names such as 'CD001001' rather than 'CD1_1', and'PC001001' instead of 'PC1_1'. This notation is no longer recognized, but theprocedure FITS_CD_FIX can be used to convert the FITS header to modern notation.(3) The CRPIX value is stored in the astrometry structure the same way as it isin the FITS header, i.e. in FORTRAN (first pixel is 1) convention. (4) The procedures HREBIN and HCONGRID will update the astrometry, including theSIP distortion coefficients, when expanding or contracting an image. However,note that HROT or HROTATE currently will not update any SIP coefficients ifpresent. Special astrometry procedures are required for the Digitized Sky Survey Imageswhich were released on CD-Rom in early 1994. Information about the Guidestarimages can be obtained from http://archive.stsci.edu/dss/and the Guidestar images can also be obtained from the SKYVIEW facilityat http://skyview.gsfc.nasa.gov/skyview.html. The Schmidt plates used inthis survey have a highly nonlinear plate solution that is not coveredby the Greisen & Calabretta conventions. The procedures GSSSEXTAST, GSSSXYAD and GSSSADXY are the Guidestar survey analogues of the proceduresEXTAST, XY2AD, and ADXY for standard astrometry. All the astrometryprocedures in the library will test for a Guidestar image header (by lookingfor the 'PPO1' keyword) and call the appropriate procedures. The procedureGSSS_STDAST will convert the astrometry in a guidestar image header to an standard tangent projection with very slightly degraded accuracy. A couple of procedures in other directories also use the FITS world coordinatesystem including IMCONTOUR - (in /astro) Contour plots with astronomical labeling (either RA,Dec or arc distance from the image center IMDBASE - (in /database) Find all catalog sources within the field of an image (given a FITS header with astrometry)ADD_DISTORT - Add a distortion structure into a FITS headerAD2XY - Use astrometry structure to convert celestial to pixel coordinates ADXY - Use FITS header to convert celestial (RA,Dec) to pixel coordinatesCONS_DEC() - Obtain the X and Y coordinates of a line of constant declinationCONS_RA() - Obtain the X and Y coordinates of a line of constant right ascensionEXTAST- EXTract ASTrometry parameters from a FITS header into an IDL structureFITS_CD_FIX - Update obsolete representations of the CD matrix in a FITS header GET_EQUINOX() - Return a numeric equinox value from a FITS headerGETROT - GET ROTation and plate scale from a FITS headerGSSS_STDAST - Insert the closest tangent projection astrometry into an STScI Guidestar Survey ImageGSSSADXY - Convert RA, Dec to pixel coordinates for an STScI survey imageGSSSEXTAST - Extract astrometry parameters from an STScI Survey ImageGSSSXYAD - Convert pixel coordinates to RA, Dec for an STScI survey imageHASTROM - Rotate, Congrid, and/or shift an image until astrometry matches that in a reference FITS header. Used to align images.HBOXAVE - Boxaverage an image and update astrometry in a FITS headerHCONGRID - CONGRID an image and update astrometry in a FITS headerHEULER - Convert between Galactic, celestial and ecliptic coordinates in FITS aheaderHEXTRACT - Extract a subimage and update astrometry in a FITS headerHPRECESS - Precess the astrometry in a FITS header to a new equinox.HREBIN - REBIN an image and update the astrometry in a FITS headerHREVERSE - Reverse an image about either dimension and update astrometry in a FITS header HROT - Rotate an image and update astrometry in a FITS header.HROTATE - Apply IDL ROTATE function and update astrometry in a FITS headerMAKE_ASTR - Build an astrometry structure from input parameter valuesPRECESS_CD - Precess coordinate description (CD) matrix in a FITS header to a new equinox. Called by HPRECESSPUTAST - Put astrometry parameters (e.g. rotation, plate scale) into a FITS header. STARAST - Obtain an exact astrometry solution given the coordinates and plate position of 2 or 3 stars.WCS_GETPOLE - Compute the coordinates of the native pole for non-polar projectionWCSSPH2XY - Convert between longitude,latitude to X,Y angular coordinates for 25 different map projection typesWCSXY2SPH - Inverse of WCSSPH2XYWCS_DEMO - Demo program for WCSSPH2XY and WCSXY2SPHWCS_ROTATE - Rotate between standard (e.g. celestial) and native coordinatesWFPC2_METRIC - Compute the distortion in a WFPC2 image and return coordinatesXYAD - Use FITS header to convert pixel (X,Y) to celestial(RA, Dec) coordinatesXY2AD - Use astrometry structure to convert pixel to celestial coordinatesXYXY - Convert X,Y values on one image to X,Y values in another image using astrometry in the FITS headers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -