idlastro / TV Display Procedures: TVLIST

[Source code]

NAME
TVLIST
PURPOSE
Cursor controlled listing of image pixel values in a window. 
CALLING SEQUENCE
TVLIST, [image, dx, dy, TEXTOUT=, OFFSET= , ZOOM= ]
OPTIONAL INPUTS
IMAGE - Array containing the image currently displayed on the screen.
        If omitted, the byte pixel intensities are read from the TV
        If the array does not start at position (0,0) on the window then
        the OFFSET keyword should be supplied.
DX     -Integer scalar giving the number of pixels in the X direction 
        to be displayed.  If omitted then DX = 18 for byte images, and 
        DX = 14 for integer images.  TVLIST will display REAL data 
        with more significant figures if more room is availble to 
        print.  
DY    - Same as DX, but in Y direction.  If omitted, then DY = DX 
OPTIONAL INPUT KEYWORDS
OFFSET - 2 element vector giving the location of the image pixel (0,0) 
          on the window display.   OFFSET can be positive (e.g if the 
          image is centered in a larger window) or negative (e.g. if the
          only the central region of an image much larger than the window
          is being displayed. 
          Default value is [0,0], or no offset.
  ZOOM - Scalar specifying the magnification of the window with respect
          to the image variable.    Use, for example, if image has been
          REBINed before display.
  TEXTOUT - Optional keyword that determines output device.
          The following dev/file is opened for output.
          textout=1       TERMINAL using /more option (default)
          textout=2       TERMINAL without /more option
          textout=3       .prt  
          textout=4       laser.tmp
          textout=5       user must open file
          textout=7       Append to an existing .prt file if it
                          exists
          textout = filename (default extension of .prt)
  If TEXTOUT > 3 or set to a filename, then TVLIST will prompt for a 
  brief description to be included in the output file
OUTPUTS
None.
PROCEDURE
Program prompts user to place cursor on region of interest in 
image display.  Corresponding region of image is then displayed at
the terminal.   A compression factor between the image array and the
displayed image is determined using the ratio of image sizes.  If 
necessary, TVLIST will divide all pixel values in a REAL*4 image by a 
(displayed) factor of 10^n (n=1,2,3...) to make a pretty format.
SYSTEM VARIABLE
The nonstandard system variable !TEXTOUT is used as an alternative to
the keyword TEXTOUT.   The procedure ASTROLIB can be used to define
!TEXTOUT (and !TEXTUNIT) if necessary.
RESTRICTIONS
TVLIST may not be able to correctly format all pixel values if the
dynamic range near the cursor position is very large.
or the cursor to work under Mac OSX  the "Click-through Inactive 
indows" setting the in X11:Preferences:Window needs to be enabled.
PROCEDURES CALLED
IMLIST, UNZOOM_XY
REVISION HISTORY
Written by rhc, SASC Tech, 3/14/86.
Added textout keyword option, J. Isensee, July, 1990
Check for readable pixels     W. Landsman   May 1992
Use integer format statement from F_FORMAT    W. Landsman   Feb 1994
Added OFFSET, ZOOM keywords  W. Landsman   Mar 1996
More intelligent formatting of longword, call TEXTOPEN with /STDOUT
        W. Landsman  April, 1996
Added check for valid dx value  W. Landsman   Mar 1997
Converted to IDL V5.0   W. Landsman   September 1997
ajor rewrite to call IMLIST, recognize new integer data types
                                   W. Landsman Jan 2000
emove all calls to !TEXTUNIT   W. Landsman   Sep 2000
lways call UNZOOM_XY for MOUSSE compatibility  W. Landsman Sep. 2004