NAME: BLINK PURPOSE: To allow the user to alternatively examine two or more windows within a single window. CALLING SEQUENCE: BLINK, Wndw [, T] INPUTS: Wndw A vector containing the indices of the windows to blink. T The time to wait, in seconds, between blinks. This is optional and set to 1 if not present. OUTPUTS: None. PROCEDURE: The images contained in the windows given are written to a pixmap. The contents of the the windows are copied to a display window, in order, until a key is struck. EXAMPLE: Blink windows 0 and 2 with a wait time of 3 seconds IDL> blink, [0,2], 3 MODIFICATION HISTORY: Written by Michael R. Greason, STX, 2 May 1990. Allow different size windows Wayne Landsman August, 1991
(See /usr/local/idl/lib/zastron/tv/blink.pro)
NAME: CURS PURPOSE: Selects an X windows cursor shape CALLING SEQUENCE: curs, [ sel ] OPTIONAL INPUT: sel - Either an integer giving the CURSOR_STANDARD value (usually an even value between 0 and 152) indicating the cursor shape, or a string from the following menu a -- Up arrow b -- Left-angled arrow c -- Right-angled arrow d -- Crosshair e -- Finger pointing left f -- Finger pointing right g -- Narrow crosshair h -- Cycle through all possible standard cursor shapes OUTPUTS: None. RESTRICTIONS: Uses the CURSOR_STANDARD keyword of the DEVICE procedure, which is only available under X windows. PROCEDURE: If the user supplies a valid cursor shape value, it is set. Otherwise, an interactive command loop is entered; it will continue until a valid value is given. MODIFICATION HISTORY: Converted to VAX 3100 workstations / IDL V2. M. Greason, STX, May 1990. Avoid bad cursor parameter values W. Landsman February, 1991
(See /usr/local/idl/lib/zastron/tv/curs.pro)
NAME: CURVAL PURPOSE: Display values associated with the cursor as it is moved over an image. CURVAL displays different information depending whether the user supplied an image array, and/or a FITS header array CALLING SEQUENCE(S): curval ;Display x,y and byte intensity (inten) curval, im ;Display x,y,inten, and also pixel value (from image array) curval, hdr, im, [X0 =, Y0 =, FILE =] OPTIONAL INPUTS: Hdr = FITS Header array Im = Array containing values that are displayed. Any type. OPTIONAL KEYWORD INPUTS: X0,Y0 = coordinates of lower left-hand corner of input image If not supplied then CURVAL assumes that pixel (0,0) on the image is located at position (0,0) in the window FILENAME = name of file to where CURVAL data can be saved. Data will only be saved if left or center mouse button are pressed. OUTPUTS: None. SIDE EFFECTS: X and Y values, etc., of the pixel under the cursor are constantly displayed. Pressing left or center mouse button prints a line of output, and starts a new line. Pressing right mouse button exits the procedure. If the keyword FILENAME is defined, the date and time, and a heading will be printed in the file before the data. REVISION HISTORY: Written, K. Rhode, STX May 1990 Added keyword FILENAME D. Alexander June 1991 Don't write to Journal file W. Landsman March 1993 Use astrometry structure W. Landsman Feb 1994 Modified for Mac IDL I. Freedman April 1994
(See /usr/local/idl/lib/zastron/tv/curval.pro)
NAME: PIXCOLOR PURPOSE: Assign colors to specified pixel values in a color lookup table CALLING SEQUENCE: PIXCOLOR, pixvalue, color ;Set color at specified pixel values OPTIONAL INPUT PARMETERS: pixvalue - value or range of pixel value whose color will be modified. A single pixel value may be specified by an integer If a range of values is specified, then it must be written as a string, with a colon denoting the range (e.g.'102:123') If omitted, program will prompt for this parameter. color - single character string giving specified color values. Available options are 'R' (red), 'B' (blue), 'G' (green) 'Y' (yellow), 'T' (turquoise), 'V' (violet), 'W' (white) or 'D' (dark). If omitted, program will prompt for this parameter. OUTPUTS: None PROCEDURE: TVLCT is used in RGB mode to load the specified pixel values. EXAMPLE: Set pixel values of 245 to a color of red IDL> pixcolor,245,'R' REVISION HISTORY: Written, W. Landsman ST Systems Corp. February, 1987
(See /usr/local/idl/lib/zastron/tv/pixcolor.pro)
NAME: SIGRANGE PURPOSE: Selects out the most significant range in the data to be used in displaying images. CALLING SEQUENCE: OUTPUT = SIGRANGE( ARRAY [, FRACTION ] ) INPUTS: ARRAY = Array to take most significant range of. OPTIONAL KEYWORD PARAMETERS: FRACTION = Fraction of data to consider most significant. Defaults to 0.9 BADPIXEL = Value used to flag bad points. Data points with this value are not considered or changed. OUTPUTS: The function returns an array where values above and below the selected range are set equal to the maximum and minimum of the range respectively. RESTRICTIONS: ARRAY must have more than two points. Fraction must be greater than 0 and less than 1. PROCEDURE: The histogram of ARRAY is used to select the most significant range. MODIFICATION HISTORY: W.T.T., Oct. 1987. W.T.T., Jan. 1991. Changed FRACTION to keyword, and added keyword BADPIXEL.
(See /usr/local/idl/lib/zastron/tv/sigrange.pro)
NAME: TVBOX PURPOSE: Draw a box(es) or rectangle(s) of specified width centered on the cursor, or at specified position(s). CALLING SEQUENCE: TVBOX, width, [ x, y, color, THICK = , /DATA, COLOR = ] INPUTS: WIDTH - either a scalar giving the width of a box, or a 2 element vector giving the length and width of a rectangle. OPTIONAL INPUTS: X - x position for box center, scalar or vector, device coordinates Y - y position for box center, scalar or vector. If vector, then Y must have the same number of elements as X If X and Y are not specified then program will draw box at current cursor position COLOR - color intensity, scalar. Default = !P.COLOR. User can specify the color using either this parameter of the COLOR keyword OUTPUTS: None OPTIONAL KEYWORD INPUT: THICK - scalar specifying thickness of the drawn box, default = 1 COLOR - Intensity value used to draw the circle. Default = !P.COLOR DATA - if this keyword is set and non-zero, then the box width and X,Y position center are interpreted as being in DATA coordinates. Note that data coordinates must be previously defined (with a PLOT or CONTOUR call). SIDE EFFECTS: A box or rectangle will be drawn on the device For best results WIDTH should be odd. (If WIDTH is even, the actual size of the box will be WIDTH + 1.) EXAMPLE: Draw a double thick box of width 13, centered at 221,256 in the currently active X window IDL> tvbox, 13, 221, 256, thick=2 RESTRICTIONS: TVBOX does not check whether box is off the edge of the screen REVISON HISTORY: Written, W. Landsman STX Co. 10-6-87 Modified to take vector arguments. Greg Hennessy Mar 1991 Fixed centering of odd width W. Landsman Sep. 1991
(See /usr/local/idl/lib/zastron/tv/tvbox.pro)
NAME: TVCIRCLE PURPOSE: Draw a circle or circles of specified radius centered on the cursor, or at specified position CALLING SEQUENCE: TVCIRCLE, rad, x, y, color, [ COLOR = , THICK =, /DATA ] INPUTS: RAD - radius of circle(s) to be drawn, scalar OPTIONAL INPUT: X - x position for circle center, vector or scalar, device coordinates Y - y position for circle center, vector or scalar If X and Y are not specified then program will draw circle at at the current cursor position COLOR - intensity value (0-255) used to draw the circle, Default = !P.COLOR. User can specify color using either this parameter or the COLOR keyword. OPTIONAL KEYWORD INPUTS: THICK - thickness of the drawn circle, default = !P.THICK (=1) DATA - if this keyword is set and non-zero, then the box width and X,Y position center are interpreted as being in DATA coordinates. Note that data coordinates must be previously defined (with a PLOT or CONTOUR call). COLOR - Intensity value used to draw the circle. Default = !P.COLOR OUTPUTS: None RESTRICTIONS: (1) TVCIRCLE does not check whether it writes off of the edge of the display (2) Some round-off error may occur when non-integral values are supplied for both the radius and the center coordinates METHOD: The method used is that of Michener's, modified to take into account the fact that IDL plots arrays faster than single points. See "Fundamental of Interactive Computer Graphics" by Foley and Van Dam" p. 445 for the algorithm. REVISON HISTORY: Original version written by B. Pfarr STX 10-88 Major rewrite adapted from CIRCLE by Allyn Saroyan LNLL Wayne Landsman STX Sep. 91 Added DATA keyword Wayne Landsman HSTX June 1993
(See /usr/local/idl/lib/zastron/tv/tvcircle.pro)
NAME: TVELLIPSE PURPOSE: Draw an ellipse on the current graphics device. CALLING SEQUENCE: TVELLIPSE, rmax, rmin, xc, yc, [ pos_ang, color, THICK = ,/DATA] INPUTS: RMAX,RMIN - Scalars giving the major and minor axis of the ellipse XC,YC - Scalars giving the position on the TV of the ellipse center OPTIONAL INPUTS: POS_ANG - Position angle of the major axis, measured counter-clockwise from the X axis. Default is 0. COLOR - Scalar giving intensity level to draw ellipse. The color can be specified either with this parameter or with the COLOR keyword. Default is !P.COLOR OPTIONAL KEYWORD INPUT: THICK - Scalar set to the thickness of the drawn ellipse, default = 1 DATA - if this keyword is set and non-zero, then the box width and X,Y position center are interpreted as being in DATA coordinates. Note that the data coordinates must have been previously defined (with a PLOT or CONTOUR call). COLOR - Intensity value used to draw the circle. Default = !P.COLOR RESTRICTIONS: TVELLIPSE does not check whether the ellipse is within the boundaries of the window. The ellipse is evaluated at 40 points and connected by straight lines. NOTES: Note that the position angle for TVELLIPSE (counter-clockwise from the X axis) differs from the astronomical position angle (counter-clockwise from the Y axis). REVISION HISTORY: Written W. Landsman STX July, 1989 Converted to use with a workstation. M. Greason, STX, June 1990
(See /usr/local/idl/lib/zastron/tv/tvellipse.pro)
NAME: TVLASER PURPOSE: Prints screen onto a Postscript laser printer. TVLASER uses the logical name or environment variable PSLASER to check which postscript printer to use. Optionally, prints selected information from a FITS header. Users will want to tailor this program to their particular computer environment. CALLING SEQUENCE: TVLASER, [ HEADER = ,YSTART = ,XSTART = ,XDIM = ,YDIM = , /NOEIGHT /PORTRAIT, /REVERSE, /SCALE, /COLOR ] INPUTS: None KEYWORD INPUT PARAMETERS: HEADER = a FITS header string array to create labels XSTART, YSTART = lower left corner (default of (0,0)) XDIM,YDIM = Number of pixels (default taken from !d.x_size and !d.y_size) NOEIGHT = if set then only four bits sent to printer (saves space) PORTRAIT = if present and non-zero, the printer results will be in portrait format; otherwise, they will be in landscape format. If labels are requested, image will be in portrait mode, regardless REVERSE = if present and non-zero, color table will be fliped, so black and white are reversed. SCALE = if present and non-zero, image will be bytscaled after being read off the screen. COLOR = If present and non-zero, the IDL.PS file is written using color postscript. OUTPUTS: IMAGE = array containing byte values of display SIDE EFFECTS: idl.ps file created and deleted in directory. User must have write privileges in the current directory. PROCEDURE: Read display and then redisplay into a postscript file MODIFICATION HISTORY: J. Murthy April, 1990 on a DECstation Converted to SUN IDL. M. Greason, STX, August 1990. for use on VAXes and on SUNs. N. Collins, STX, Dec. 1990 Added keywords SCALE and REVERSE, B. Pfarr, STX, 2/91 Added /COLOR keyword W. Landsman July 93
(See /usr/local/idl/lib/zastron/tv/tvlaser.pro)
NAME TVLIST PURPOSE: Cursor controlled listing of a TV image on the terminal. CALLING SEQUENCE: TVLIST, image, [ dx, dy, TEXTOUT = ] OPTIONAL INPUTS: IMAGE - Array containing the image currently displayed on the TV. If omitted, the byte pixel intensities are read from the TV Image array should be the same size, or a multiple of the size of the image in the current window. DX -Integer scalar giving the number of pixels inthe 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 KEYWORD: TEXTOUT - Optional keyword that determines output device. The following dev/file is opened for output. textout=1 TERMINAL using /more option textout=2 TERMINAL without /more option textout=3.prt textout=4 laser.tmp textout=5 user must open file textout = filename (default extension of .prt) 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: Set !TEXTOUT = 3 to direct output to a disk file. TVLIST will then also prompt for a brief description. RESTRICTIONS: TVLIST may not be able to correctly format all pixel values if the dynamic range near the cursor position is very large. 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
(See /usr/local/idl/lib/zastron/tv/tvlist.pro)