fits procs

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Tue Dec 20 11:48:25 2005.


List of Routines


Routine Descriptions

FITS_ADD_AXIS_PAR

[Next Routine] [List of Routines]
 NAME:
       FITS_ADD_AXIS_PAR

 PURPOSE:
       Add to FITS header the FITS parameters necessary to
       specify a coordinate axis.

 CALLING SEQUENCE:
       FITS_ADD_AXIS_PAR, axis, hdr, axisnum

 INPUTS:
       AXIS - vector containing values of coordinate axis.
       HDR - FITS header.
       AXISNUM - The number of the coordinate axis.

 KEYWORD PARAMETERS:
       CTYPE - name of the coordinate axis, a character string.
       CUNIT - name of units of coordinate, a character string.
       AXIS_PAR - Set this keyword to a variable in order to
                  return the AXIS_PAR stucture:
                  .NAXIS - size of the axis
                  .CDELT - coordinate increment along axis
                  .CRPIX - coordinate system reference pixel
                  .CRVAL - coordinate system value at reference pixel
                  .CTYPE - name of the coordinate axis

 OUTPUTS:
       None.

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       The coordinate axis header keywords are added or changed in 
       the FITS header.

 PROCEDURES CALLED:
       FITS_GET_AXIS_PAR(), SXPAR(), SXADDPAR

 EXAMPLE:
       Create a header for a data cube...
       IDL> cube = bytarr(512,12,36)
       IDL> mkhdr, hdr, cube

       Now make coordinate axes for the cube...
       IDL> axis1 = findgen(512)*0.33 - 100
       IDL> axis2 = findgen(12)
       IDL> axis3 = findgen(36)*0.5 + 50

       Add the NAXISn, CRVALn, CRPIXn and CRDELTn header
       keywords to HDR...
       IDL> fits_add_axis_par, axis1, hdr, 1
       IDL> fits_add_axis_par, axis2, hdr, 2
       IDL> fits_add_axis_par, axis3, hdr, 3

       Also add the CTYPEn and CUNITn keywords...
       IDL> fits_add_axis_par, axis1, hdr, 1, $
       IDL> CTYPE='Right Ascension (B1950)', CUNIT='deg'

 RELATED PROCEDURES:
       FITS_MAKE_AXIS()

 MODIFICATION HISTORY:
   20 Aug 2003  Written by Tim Robishaw, Berkeley

(See /dzd2/heiles/idl/gen/fits/fits_add_axis_par.pro)


FITS_GET_AXIS_PAR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       FITS_GET_AXIS_PAR

 PURPOSE:
       Return, in structure form, the FITS parameters necessary to
       specify a coordinate axis.

 CALLING SEQUENCE:
       Result = FITS_GET_AXIS_PAR(axis)

 INPUTS:
       AXIS - vector containing values of coordinate axis.

 OUTPUTS:
       Returns the AXIS_PAR structure:
       AXIS_PAR.NAXIS - size of the axis
               .CDELT - coordinate increment along axis
               .CRPIX - coordinate system reference pixel
               .CRVAL - coordinate system value at reference pixel
               .CTYPE - name of the coordinate axis

 COMMON BLOCKS:
       None.

 EXAMPLE:
       AXIS is vector containing the values of an axis...
       IDL> axis_par = fits_get_axis_par(axis)
       IDL> help, axis_par, /structure
       ** Structure <39fc40>, 4 tags, length=16, refs=1:
       NAXIS           LONG              2048
       CDELT           FLOAT           1.00000
       CRPIX           FLOAT           1025.00
       CRVAL           FLOAT           1024.00

 RELATED PROCEDURES:
       FITS_ADD_AXIS_PAR, FITS_MAKE_AXIS()

 MODIFICATION HISTORY:
   20 Aug 2003  Written by Tim Robishaw, Berkeley

(See /dzd2/heiles/idl/gen/fits/fits_get_axis_par.pro)


FITS_MAKE_AXIS -- CREATE AXIS VALUES FROM A FITS HEADER

[Previous Routine] [List of Routines]
 NAME:
FITS_MAKE_AXIS -- create axis values from a FITS header

 PURPOSE:
       To create the axis values from the NAXISn, CDELTn, CRPIXn, and
       CRVALn keyword values stored in a FITS header.

 CALLING SEQUENCE:
       Result = FITS_MAKE_AXIS(hdr, axisnum)

 INPUTS:
       HDR - FITS header (string array)
       AXISNUM - The number of the axis to be created.

 KEYWORD PARAMETERS:
       None.

 OUTPUTS:
       Returns a vector of length NAXISn containing the axis values.

 COMMON BLOCKS:
       None.

 PROCEDURES CALLED:
       SXPAR()

 EXAMPLE:
       Get the header from a FITS file...
       IDL> hdr = headfits('datacube.fits')

       Make the 1st and 2nd axes...
       IDL> xaxis = fits_make_axis(hdr,1)
       IDL> yaxis = fits_make_axis(hdr,2)

 RELATED PROCEDURES:
       FITS_ADD_AXIS_PAR

 MODIFICATION HISTORY:
   20 Aug 2003  Written by Tim Robishaw, Berkeley

(See /dzd2/heiles/idl/gen/fits/fits_make_axis.pro)