Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  HPRINT

HPRINT

HPRINT

Name


      HPRINT

Purpose


      Display a FITS header (or other string array)

Explanation


      On a GUI terminal, the string array is displayed using XDISPSTR.
      If printing at a non-GUI terminal, the string array is printed 1 line
      at a time, to make sure that each element of the string array is
      displayed on a separate line.

Calling Sequence


      HPRINT, h, [ firstline ]

Inputs


      H - FITS header (or any other string array).

Optional Input


      FIRSTLINE - scalar integer specifying the first line to begin
              displaying. The default is FIRSTLINE = 1, i.e. display
              all the lines. If Firstline is negative, then the first
              line to be printed is counted backward from the last line.

Notes


      When displaying at the terminal, HPRINT has the following differences
      from the intrinsic PRINT procedure
      (1) Arrays are printed one line at a time to avoid a space between 80
              character lines
      (2) Lines are trimmed with STRTRIM before being printed to speed up
              display
      (3) The /more option is used for output.

Example


      Read the header from a FITS file named 'test.fits' and display it at the
      terminal beginning with line 50
      IDL> h = headfits( 'test.fits') ;Read FITS header
      IDL> hprint, h, 50 ;Display starting at line 50
      To print the last 25 lines of the header
      IDL> hprint, h, -25

Revision History


      Written W. Landsman July, 1990
      Added test for user quit July, 1991
      Added optional FIRSTLINE parameter November, 1992
      Modified for when STDOUT is not a TTY W. Landsman September 1995
      Converted to IDL V5.0 W. Landsman September 1997
      Fixed printing in IDLDE, C. Gehman August, 1998
      Skip PRINTF if IDL in demo mode W. Landsman October 2004
      Fixed bug on non-terminals, William Thompson, 18-Oct-2004
      Assume since V5.4 Use BREAK instead of GOTO W. Landsman Apr 2006
      Call XDISPSTR on a GUI terminal W. Landsman Jun 2006



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us