X2GIF $SSW/gen/idl/image/x2gif.pro
[Previous] [Next]
 Project     :	SDAC

 Name        :	X2GIF

 Purpose     :	read and write X window to GIF file

 Explanation :	Uses TVRD to grab window

 Use         :	X2GIF,FILE
              
 Inputs      :	FILE = GIF file name

 Opt. Inputs : R, G, B = color table values

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	
               WINDOW = index of window to be plotted
               XSIZE, YSIZE = window size to select [def = whole window]
               TITLE = title for GIF file
               XPOS, YPOS = position of title
               PSIZE = extra keywords for xyouts
               RESIZE = [nx,ny] = dimensions to resize GIF image to
               

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONGRID [1], CONGRID [2]
	CONGRID [3], DATATYPE [1], DATATYPE [2], DATATYPE [3], HAVE_WINDOWS [1]
	HAVE_WINDOWS [2], SELECT_WINDOWS, SSW_WRITE_GIF, TEST_OPEN, TRIM, break_file [4]
 CALLED BY:
	MK_SOHO, MOVIE_MAP, XCAT
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Graphics

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 1 July 1994
               Version 2.0, 13-Aug-2003, William Thompson
                       Use SSW_WRITE_GIF instead of WRITE_GIF
               Version 3.0, 03-Sep-2004, William Thompson
                       Fixed problem with true-color display
                       Use have_windows() to support Windows (not just X)
               Version 4, 25-Jan-2006, William Thompson
                       Fixed problem with plotting parameters being reset by
                       unnecessary set_plot call.


X2JPEG $SSW/gen/idl/image/x2jpeg.pro
[Previous] [Next]
 Project     :	SDAC

 Name        :	X2JPEG

 Purpose     :	Read X window and write to JPEG file.

 Explanation :	Uses TVRD to grab window, and writes it to a JPEG file.

 Use         :	X2JPEG  [, FILE ]
              
 Inputs      :	None required.

 Opt. Inputs : FILE	= JPEG file name.  If not passed, then the output is
			  written to "idl.jpg"

 Keywords    :	WINDOW = Index of window to be read.  If not passed, then the
			 currently active window is read.

               RESIZE = [nx,ny] = Dimensions to resize JPEG image to.

		ERRMSG = Returned error message.
               
 Category    :	Graphics

 Prev. Hist. :	Modified from X2GIF by Dominic Zarro.

 Written     :	16-May-2001, William Thompson, GSFC
               Version 2, 25-Jan-2006, William Thompson
                       Fixed problem with plotting parameters being reset by
                       unnecessary set_plot call.

 Version     :	Version 2, 25-Jan-2006
 CALLS:
 CALLED BY
	IMAGE_TOOL_EVENT


X2PS $SSW/gen/idl/display/x2ps.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : X2PS

 Purpose     : convert X window plot to postscript file

 Category    : plotting

 Explanation : uses TVREAD

 Syntax      : IDL> x2ps,file,window=window

 Inputs      : FILE = filename to print

 Opt. Inputs : FILE - output postscript file name

 Outputs     : None

 Opt. Outputs: None

 Keywords    :
               window = index of window to be plotted (def = last window)
               nocolor = for B/W
               x_size,y_size = size of current window to read (def = whole)
               print  = send PS file to printer
               err    = err string
               delete = delete plot file when done

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], SELECT_WINDOWS, TEST_OPEN, TRIM, XPRINT [1], XPRINT [2], XPRINT [3]
	XPRINT [4], XPRINT [5], break_file [4]
 CALLED BY:
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL_EVENT
	MK_CDS_PLAN
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Version 1,  1-Sep-1995,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XACK $SSW/gen/idl/widgets/xack.pro
[Previous] [Next]
 Project     :	SOHO/CDS

 Name        : XACK

 Purpose     : Make user acknowledge an action

 Use         : xack

 Inputs :    : ARRAY = message to user

 Outputs     : RESULT = result of DIALOG_MESSAGE

 Keywords    : 
               GROUP = widget ID of calling widget.
               SPACE = lines of border space surrounding message text.
               INSTRUCT = optional instruction to supersede "Acknowlege" 
               TITLE = Title of the pop-up widget
               WARN  = set to call IDL warning function WIDGET_MESSAGE
               TURN_OFF = set to show suppress future message button
               BACK = set to unsuppress turned-off message
               STOP_ICON = display STOP icon
               SINSTRUCT = suppression instructions
;
 Written     :	Version 1, Zarro (ARC/GSFC) 12 October 1994

 Modification: Version 2, April 19, 1996, Liyun Wang, GSFC/ARC
                  Added TITLE keyword
               Version 3, Sept 19, 2000, Zarro (EIT/GSFC)
                  Updated for IDL 5
               Version 4, May 8, 2002, Zarro (L-3Com/GSFC)
                  Added call to DIALOG_MESSAGE

 CALLS:
 CALLED BY
	ALLOW_SOCKETS, CDS_ENG_N1, CDS_ENG_N1_VW, CDS_ENG_N4, CD_DELETE_FILES
	CD_DISK_SPACE, CD_DISM_CDROM, CD_LOAD_CDROM, CD_MOUNT_CDROM, CD_REG_CDROM
	CD_SUMER, CFIT_APIXLIST, CWF_COMPONENT, DSPWAV, DSP_AUX, DSP_POINT, DSP_WAV
	EIS_CAT [1], EIS_CAT [2], EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2]
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], EIS_ITOOL_PTOOL [1]
	EIS_ITOOL_PTOOL [2], EIS_ITOOL_ZOOMINOUT [1], EIS_ITOOL_ZOOMINOUT [2]
	EIS_LOAD_IMAGE [1], EIS_LOAD_IMAGE [2], FIND_CDS_STUDIES, FREEZE_RAS_DUR
	HAS_ERROR, HSI_FIND_FILE, IMAGE_TOOL, IMAGE_TOOL_EVENT, ITOOL_LOAD_IMAGE
	ITOOL_PTOOL, ITOOL_RD_GIF, ITOOL_ZOOMINOUT, LOCATE_FFCAL, MK_CDS_PLAN
	MK_PLAN_CUSTOM, MK_PLAN_ORDER, MK_POINT_BASE, MK_RASTER, MK_SOHO, MK_SOHO_CUSTOM
	MK_STUDY, PICKFITS, PROGMETER, RD_IMAGE_GIF, READCDSFITS, SCANPATH, SET_CURSOR_SHAPE
	SHOW_SYNOP__DEFINE, SOCK_OPEN, SPECPLOT__DEFINE, ST_MK_UDP_STC, ST_SUMER
	SYNOP_DEFINE, TP_WRT_DWIN, TP_WRT_LLIST, WINDMETER, WIN_DUMP, XCAMP, XCAT
	XCDS_ANALYSIS, XCDS_BOOK, XCDS_COSMIC, XCDS_SNAPSHOT, XCFIT, XCFIT_BLOCK
	XCLONE_PLAN, XCPT, XGET_UTC, XMAIL, XPORT, XPRINT [2], XPRINT [5], XPROGRAM_ADD
	XPS_SETUP, XREPORT, XREPORT_EDIT, XSTUDY, XTEXT, XTKI, XVALIDATE, XZOOM_PLAN, xpickfile
	xpickfile2


XALIVE $SSW/gen/idl/widgets/xalive.pro
[Previous] [Next]
 Project     :	SDAC

 Name        :	XALIVE

 Purpose     :	To check if an X widget is alive
;
 Use         :	ALIVE=XALIVE(ID)
              
 Inputs      :	ID = widget id to check

 Opt. Inputs : None.

 Outputs     :	1/0 if alive/dead

 Keywords    : NAME = set if input ID is widget event handler name
               COUNT = no of multiple instances 

 Category    :	Widgets

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 18 September 1993
               Version 2.0, 16 November 1999 
                -- allowed ID to be widget handler name
 CALLS:
 CALLED BY
	ASSIGN_NOCOPY, CHAN_DEFINE, DSP_AUX, DSP_CUBE, GET_CENT_OFF, GET_HANDLER_NAME
	GE_WINDOW_SIM, HESSI, HESSI MONITOR RATE  CLASS DEFINITION, MK_CDS_PLAN
	MK_PLAN_CUSTOM, MK_PLAN_ORDER, MK_RASTER, MK_SOHO_CUSTOM, MK_STUDY
	Modify_Merge_list [1], Modify_Merge_list [2], PROFILES2, PROGMETER, QLDS_REPORT
	SCANPATH, SHOW_SYNOP, SHOW_SYNOP__DEFINE, SPEX_FIT__DEFINE, SPEX__DEFINE
	VALID_POINTER, WIDGET_MBASE, XACK, XANSWER, XCALENDAR, XCAMP, XCAT, XCDS_ANALYSIS, XCFIT
	XCLONE_PLAN, XCPT, XCRON, XDOC, XGET_UTC, XHIDE, XHOUR, XIAP, XINPUT, XKILL, XLIST
	XMANAGER_RESET, XMATRIX, XMESSAGE, XPLOTSCALE, XPOPUP, XPORT, XPROGRAM, XPROGRAM_ADD
	XPS_SETUP, XREALIZE, XREPORT, XREPORT_EDIT, XSEL_ITEM, XSEL_LIST [1], XSEL_LIST [2]
	XSET_COLOR, XSET_VALUE, XSHOW, XSHOW_RASTER, XSTRUCT, XSTUDY, XTEXT, XTEXTEDIT
	XTEXT_RESET_ID, XTVSCALE, XZOOM_PLAN, cw_edroplist, cw_ut_range, dsp_menu
	ethz_XCHOICE, hsi_clean_options, hsi_coll_widget, hsi_corr_widget
	hsi_cw_ut_range, hsi_do_plotman, hsi_draw_plotman_image, hsi_energy_widget
	hsi_forwardfit_options, hsi_imagemisc_widget, hsi_imagesize_widget
	hsi_memsato_options, hsi_memvis_options, hsi_obs_summary__define [1]
	hsi_obs_summary__define [2], hsi_pix_options, hsi_range_widget
	hsi_spectrum_filewrite_widget, hsi_time_widget, hsi_ui_colloptions
	hsi_ui_flarecat, hsi_ui_img, hsi_ui_img_doimage [1], hsi_ui_img_doimage [2]
	hsi_ui_lc, hsi_ui_mon, hsi_ui_obs, hsi_ui_ql, hsi_ui_qlimage, hsi_ui_setlabels
	hsi_ui_spec, hsi_ui_widgetupdate, imspec [10], imspec [11], imspec [12]
	imspec [13], imspec [14], imspec [15], imspec [16], imspec [17], imspec [18]
	imspec [19], imspec [1], imspec [20], imspec [21], imspec [22], imspec [23]
	imspec [24], imspec [25], imspec [26], imspec [27], imspec [28], imspec [29]
	imspec [2], imspec [30], imspec [31], imspec [32], imspec [33], imspec [34]
	imspec [35], imspec [36], imspec [3], imspec [4], imspec [5], imspec [6], imspec [7]
	imspec [8], imspec [9], plotman, plotman_conf_panels, plotman_draw_event
	plotman_list_int, plotman_panel_control_event, plotman_reset, plotman_widget
	widget_offset, xdroplist, xedit_table, xsel_list_multi


XANSWER $SSW/gen/idl/widgets/xanswer.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       XANSWER()

 PURPOSE:
       Popup widget to get a Yes/No answer for a given question

 CALLING SEQUENCE:
       Result = xanswer(question [,/str])

 INPUTS:
       QUESTION - A string scalar or vector for the question presented to the
                  user

 OPTIONAL INPUTS:
       FLASH - Make the question flash for number of FLASH times
       RATE  - Flashing rate in seconds; default: 0.25 sec.

 OUTPUTS:
       RESULT - A numerical value of 1 or 0, or a string scalar with a value
                'Y' or 'N' if the keyword STR is set

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       STR        - Set this keyword to make string type return
       BEEP       - Make a beep if set
       JUSTIFY    - justify string (| for center, < for left, > for right)
       RIGHT      - Right justify the question
       SPACE      - Number of line to space text; default to 3
       FONT       - Font for text widget
       SUPPRESS   - set to show suppress future message button
       BACK       - set to unsuppress turned-off message
       INSTRUCT   - additional instructions
       CHECK_INSTRUCT - set to check INSTRUCT instead of QUESTION
       DEFAULT    - default answer
       MESSAGE_SUPP - message to suppress
       SKIPPER - returns 1 if user previously suppressed message 

 CATEGORY:
       Utility, widget

 PREVIOUS HISTORY:
       Written March 8, 1995, Liyun Wang, GSFC/ARC

 CALLS: ***
	Bell, DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, FREE_POINTER, GET_CALLER
	GET_POINTER, JUSTIFY, MAKE_POINTER, MK_DFONT, SET_POINTER, SUPPRESS_MESSAGE
	TIMER_VERSION, XALIVE, XANSWER_EVENT, XKILL, XMANAGER, XMANAGER_RESET, XMENU [1]
	XMENU [2], XREALIZE, XSHOW
 CALLED BY:
	CD_DELETE_FILES, EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2]
	EIS_ITOOL_PTOOL [1], EIS_ITOOL_PTOOL [2], FIND_CDS_STUDIES, FREEZE_RAS_DUR
	HTTP__DEFINE, IMAGE_TOOL_EVENT, ITOOL_PTOOL, ITOOL_RD_GIF, ITOOL_SWITCHER
	MK_CDS_PLAN, MK_PLAN_ORDER, MK_POINT_BASE, MK_SOHO, MK_STUDY, MK_WAVECAL
	PLAN_XCAT_SUMM, RD_IMAGE_GIF, SHOW_SYNOP__DEFINE, ST_SUMER, XCAMP, XCAT, XCLONE_PLAN
	XCPT, XIAP, XLIST, XPRINT [2], XPRINT [5], XPROGRAM_ADD, XREPORT, XREPORT_EDIT
	hsi_pix_options, plotman_window_control_event, spex_data__define, text_output
 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, March 8, 1995
       Version 2, Liyun Wang, GSFC/ARC, May 2, 1995
          Added INSTRUCT keyword
       Version 3, Liyun Wang, GSFC/ARC, May 2, 1995
          Got rid of common block
       Version 4, November 15, 1995, Liyun Wang, GSFC/ARC
          Changed exclusive button to regular button
          Added Xresource option
       Version 5, February 15, 1996, Liyun Wang, GSFC/ARC
          Xresource option disabled for IDL version 3.5 and earlier
       Version 6, June 19, 1996, Liyun Wang, GSFC/ARC
          Added a timer event to prevent the widget from hiding behind
             other windows
       Version 7, August 12, 1996, Zarro, GSFC
          Added check for valid handle value
       Version 8, September 12, 1996, Zarro, GSFC
          Added suppression message
	July 5, 2000, Kim Tolbert, Set input focus in widget to default answer
       Oct 22, 2002, Zarro (EER/GSFC) - added SKIPPED keyword


XBLINK $SSW/gen/idl/image/xblink.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	XBLINK
 Purpose     : 
	Blinks two images together by using XMOVIE.
 Explanation : 
	XMOVIE is called to blink the two images together.
 Use         : 
	XBLINK, ARRAY1, ARRAY2  [, RATE ]
 Inputs      : 
	ARRAY1	 = First image to be blinked against the second image.
	ARRAY2	 = Second image.  Must have the same dimensions as the first
		   image.
 Opt. Inputs : 
	RATE	= Optional rate of display.  The rate is a value between 0 and
		  100 that gives the speed that the animation is displayed.
		  The fastest animation is with a value of 100 and the slowest
		  is with a value of 0.  The default value is 10 if not
		  specified.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	NOSCALE  = If set, then the images are not scaled.
	MISSING	 = Value flagging missing pixels.  These points are scaled to
		   zero.
	MAX	 = The maximum value to be considered in scaling the
		   images, as used by BYTSCL.  The default is the maximum value
		   of IMAGES.
	MIN	 = The minimum value of IMAGES to be considered in scaling the
		   image, as used by BYTSCL.  The default is the minimum value
		   of IMAGES.
	TOP	 = The maximum value of the scaled image array, as used by
		   BYTSCL.  The default is !D.N_COLORS-1.
	BOTTOM	 = The minimum value of the scaled image array, as used by
		   BYTSCL.  The default is 0.
	VELOCITY = If set, then the image is scaled using FORM_VEL as a
		   velocity image.  Can be used in conjunction with COMBINED
		   keyword.  Ignored if NOSCALE is set.
	COMBINED = Signals that the image is to be displayed in one of two
		   combined color tables.  Can be used by itself, or in
		   conjunction with the VELOCITY or LOWER keywords.
	LOWER	 = If set, then the image is placed in the lower part of the
		   color table, rather than the upper.  Used in conjunction
		   with COMBINED keyword.
	RESIZE	 = If set, then the image will be resized up or down by integer
		   factors to best fit within the display.  Unless RESIZE or
		   one of the other size related keywords are set, then the
		   image is displayed at its true pixel size.
	NOEXACT	 = If set, then non-integer factors are allowed.
	SIZE	 = If passed and positive, then used to determine the scale of
		   the image.  Returned as the value of the image scale.
	SMOOTH	 = If set, then the image is expanded with bilinear
		   interpolation.
	RELATIVE = Size of area to be used for displaying the image, relative
		   to the total size available.  Must be between 0 and 1.
		   Default is 1.  Ignored unless RESIZE or NOEXACT is set.
 Calls       : ***
	XMOVIE [1], XMOVIE [2]
 Common      : 
	None.
 Restrictions: 
	ARRAY1 and ARRAY2 must have the same dimensions.

	In general, the SERTS image display routines use several non-standard
	system variables.  These system variables are defined in the procedure
	IMAGELIB.  It is suggested that the command IMAGELIB be placed in the
	user's IDL_STARTUP file.

	Some routines also require the SERTS graphics devices software,
	generally found in a parallel directory at the site where this software
	was obtained.  Those routines have their own special system variables.

 Side effects: 
	None.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	Modified from BLINK.
 Written     : 
	William Thompson, GSFC, 7 September 1994
 Modified    : 
	Version 1, William Thompson, GSFC, 7 September 1994
       Version 2, William Thompson, GSFC, 3-Jan-2006
               Added keyword BOTTOM
 Version     : 
	Version 2, 3-Jan-2006


XCALENDAR $SSW/gen/idl/widgets/xcalendar.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XCALENDAR

 Purpose     : widget interface to calendar 

 Category    : widgets

 Explanation :

 Syntax      : IDL> xcalander,date

 Inputs      : None

 Opt. Inputs : None

 Outputs     : DATE = selected date [ yy/mm/dd]

 Opt. Outputs: None

 Keywords    : GROUP = widget ID of any calling widget
               MODAL = set to freeze calling widget

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], CAL_INFO, CW_BSELECTOR2, DATATYPE [1]
	DATATYPE [2], DATATYPE [3], EXIST, FREE_POINTER, GET_CALLER, GET_MONTHS, GET_POINTER
	GET_UTC, HAVE_WIDGETS [1], HAVE_WIDGETS [2], IDL_RELEASE, JULDAY, MAKE_POINTER
	MK_DFONT, SET_POINTER, STR_SEP, TIMER_VERSION, WIDG_TYPE, XALIVE, XCALENDAR_EVENT
	XCALENDAR_FILL, XKILL, XMANAGER_RESET, XREALIZE, XREGISTERED, XSHOW, is_number [1]
	is_number [2]
 CALLED BY:
	XREPORT_EDIT
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Version 1,  26-Dec-1995,  D.M. Zarro, L. Wang.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XCFIT $SSW/gen/idl/fitting/xcfit.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XCFIT
               
 Purpose     : Interactive design of component fit structure
               
 Explanation : The component based fit system allows the user to design a
               model with any number of components to be included in a chi^2
               fit calculation. This program simplifies the design process.

               See the EXAMPLE section below for a hands-on example session
               using the program.

               DISPLAY EXPLANATION

               
               THE LOWER PART OF THE DISPLAY shows one plot of the spectrum
               and the fitted function, and one plot of the current residual.
               You may zoom out/move around/zoom in by clicking the left,
               center and right mouse buttons inside the plots. To move one
               pixel left or right, click outside the plot boundaries.

               To adjust how the plot scaling (i.e., controlling the YRANGE
               of the plot) is performed, click the buttons labeled "Adjust
               plot scaling" to pop up the respective XPLOTSCALE boxes.

               
               ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
               
               THE MIDDLE PART OF THE DISPLAY shows the details of the
               current fit structure:

               Each component in the fit structure is displayed with one
               status line for the whole component, showing:

               Color field: Each component is plotted separately, with the
                            indicated color, in the spectrum/fit plot.
                            
               Name : press the button with the name on it to alter the
                      component name. 

               Descr.: Press this button to see a short description of the
                       component type.

               Include:ON(OFF) : This button toggles whether a component is
	"Center" and, "Left"
	"Lin. A" & "Lin. B", "Right".
	"Value" column for each component is updated with the ending
	"credible" result with the initial values, (and of course
	(initial -> values)" button to undo the best fit calculation.
	(middle) mouse button, (re-)calculations start at the initial values.
	/program, ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	ACTUAL = NOMINAL * TRANS_A + TRANS_B, ACTUAL values
	Add component : This menu is used to add new components
	Although the results from the initial value guesses could
	As an example of how the program works
	Auto-fit:OFF(ON) : This is a status toggle, EXAMPLE
	Each component has a certain number of parameters associated
	Exit : Discard changes - will exit and leave the FIT parameter
	Exit : Flag as FAILED/IMPOSSIBLE - is used when the XCFIT
	Exit : Save changes - will exit and return the current fit, FIT [
	Fit (ON/OFF) : Each component may be held constant during a
	Fit:OFF status. When a parameter is in Fit:OFF
	Fit:ON(OFF) : This button is used to switch ALL the, IDL> delvar
	IDL> print_cfit, IDL> xcfit, In order to allow e.g.
	Initial : The initial value of a parameter. The chi^2 fit
	MOVE AROUND inside the spectrum/residual plots with the
	Max value : The maximum allowed value for the parameter.
	Min value : The minimum allowed value for the, NAME [1], NAME [2], NAME [3]
	NOMINAL = (ACTUAL - TRANS_B)/TRANS_A), Now, Now, Now, Now
	Now we focus on the emission line on the right. Move to the
	Parameter (name) : Press the button to alter the parameter
	Purge components : This button purges all components in the
	Redo fit : Calculate a fit to minimize chi^2 based on the
	Reset values:(initial -> value) Sets all current parameter
	Select Add component : ..showing absolute position.
	Sort components (various) : The options on this menu will sort
	THE UPPER PART OF THE DISPLAY contains various buttons:
	TRANS_A should be -(lam0/c) and TRANS_B should be lam0
	The lab wavelength is taken to be equal to the
	The middle part of the display is updated to show the new
	This means that to make the positional parameter of a gaussian
	This will print out a series of lines that may be inserted
	To visualize the effect of leaving out one of the components
	Use         : XCFIT
	Use as initial state:(value -> initial) Sets all parameter
	Value : The current value of a parameter, WEIGHTS=WEIGHTS]
	We'll also edit the name of the gaussian component by pressing
	We'll see how well this emission feature is matched by a
	When the input parameter X is not defined
	When you're satisfied with a fit, X [1], X [1], X [1], X [1], X [2], X [2], X [2], X [2]
	XCFIT_BLOCK., Y, Y and FIT, You may choose which convention should be used, a
	a dummy spectrum, actually included in the fit model or
	all the line profiles (gaussian, and, and add another component here.
	and in fact we got a much more, and may have to, and the
	and the information about each parameter is displayed, and the resulting
	and then kept at that value if fitting, and then press the "Purge
	and treated as a, are added to the component fit
	as it was on entering XCFIT (if it was previously, as one line, at
	automatic refitting after each modification
	be adjusted manually - by adjusting the linear
	be at about 503.1) and add a third gaussian.
	be initialized with a zero-order polynomial if it is not, component
	component along with the background. The program makes some
	component and this particular part of the spectrum
	component fit. This may then be applied to other data sets
	component have positive velocities (in km/s) when blueshifted
	component was not present at all.
	component's parameters between the Fit:ON or, components
	components" button., constant., current fit model
	current fit structure which are flagged as, current position in the plots
	current values. This is usually done when, defined.
	discussion under "Lin. A" & "Lin. B" above).
	exit the XCFIT program using
	first. We see that the residual now reflects mostly noise, fit, fit, fit
	fit calculation. Press the button to toggle the
	fit will be done (almost) as if this
	for blueshift vs the sign of the velocity., for each parameter.
	function is displayed below. No chi^2 fit has yet been
	highlighted by an asterisk in the plots. You, i.e., i.e.
	if you'd like to use the designed fit inside e.g.
	in a non-interactive way., indicate a fourth compoonent
	initial guesses for the fit parameters, initial state.
	initial values equal to the parameters'
	initial values for the two components. The initial values are
	into an IDL program to construct the structure describing the
	is achieved by flipping the sign of TRANS_A., is turned OFF.
	it seems like this is a good fit for this particular
	it will be set to it's INITIAL value
	its Include switch is turned "OFF", km/s. Of course
	lam0 is the lab wavelength and c is the speed of light in
	line positions to be shown as, make sure
	making positive velocities correspond to
	may select components showing the absolute, minimized.
	move to the peak that's visible in the residual (should
	necessarily reflect a value where the chi^2 is
	not included (see "Include:ON(OFF)" above).
	not. If the component is not included
	of a fit calculation. Note that the chi^2 fit some, of the fit structure.
	or, or components showing the velocity, other types of line profiles that
	parameter values are set to their INITIAL
	parameter values may be represented as NOMINAL values or
	parameter. During the fit calculation
	parameters are kept within the specified min/max
	performed - press "Redo fit" to improve the fit
	plus noise. An array with weights to be used in
	point of the fit calculation.
	position of the line as the nominal position, position of the peak
	positioning the focus point at a close
	press "Use as initial state" to store the current values as
	press the "Include" button and see what happens with the
	program, program is called from other programs
	program with three (undefined) variables, redshifted lines
	related by a LINEAR TRANSFORMATION:, relative to a lab wavelength
	relative to some lab wavelength., result is not quite good
	resultant fit. If you wish to remove a component, revealing the
	second component of the blend, showing (left to right), simply start the
	since this we suspect this
	single gaussian by pressing "Redo fit" again. Obviously
	so this value does not, so we, so we use the "Reset values -
	starting with the INITIAL values, state. Prior to a fit calculation, status
	structure in the FIT parameter., structure., such as, system) in various ways.
	the, the, the, the, the *current position* (or focus point)
	the Exit - Save changes button.
	the button labeled "gauss" - an XINPUT dialog box appears and
	the end point
	the fitting procedure is also created. The fit structure will
	times does not converge, to be the leftmost component.
	to the center of the LEFT emission line.
	transformation coefficients A and B (see, turning on or off
	undefined it will now contain a fit structure with a
	updated on the screen., use the command:, value, values
	values equal to their initial values. Useful to, values., velocities (km/s)
	visualize the actual shape of the model in the, we alter the name to e.g.
	we can name the last two components e.g.
	we'll try to "Redo fit" once, when a fit is calculated, where
	will be created, with a constant background and three gaussian, with it, y, y
	you're satisfied with the design of a fit, zero-order background tag).
 Inputs      : X,Y : The spectrum to be fitted. One-dimensional arrays, same
                     number of elements.

               FIT : Component fit structure, to be modified/created.
               
 Opt. Inputs : None.
               
 Outputs     : FIT is changed
               
 Opt. Outputs: None.
               
 Keywords    : WEIGHTS : Weights attributed to each data point in the chi^2
                         fitting procedure.

               USE_CURRENT_VALUE - Normally the best fit is computed at
               startup, based on the initial values. Setting this keyword
               avoids this, showing the user the result of the current
               values.

               NO_CHANGE : Set flag to disallow adding/removing/sorting
                           components 
               
               FAILED : Set to a named variable, which will be equal to 1 if
                        the user selects the "Flag as FAILED/IMPOSSIBLE" exit
                        option.

 Calls       : ***
	CFIT, CWF_FIT, CW_FLIPSWITCH, CW_PLOTZ [1], DEFAULT, EVAL_CFIT, EXIST, INTERPOL
	MAKE_SFIT_STC, OPLOTERR, PARCHECK, PVOIGT, SINCE_VERSION [1], SINCE_VERSION [2]
	SORT_CFIT, TRIM, TYP, XACK, XALIVE, XCFIT_ADDCOMP, XCFIT_EVENT, XCFIT_REEVAL
	XCFIT_REFIT, XCFIT_REMAKE, XCFIT_REPLOT, XMANAGER, XPLOTSCALE, XUPDATE, cw_plotz [2]
	mk_comp_bgauss, mk_comp_gauss, mk_comp_poly, mk_comp_voigt
 CALLED BY:
	XCFIT_BLOCK
 Common      : None.
               
 Restrictions: hmmm
               
 Side effects: Has been known to cause problems with the X manager.
               
 Category    : Analysis
               
 Prev. Hist. : The component based fitting scheme is inspired by the program
               XSPEC.

 Written     : S.V.H. Haugan, UiO, 20 January 1997
               
 Modified    : Version 2, SVHH, 10 February 1997
                       Minor modifications in xcfit_remake to minimize
                       problems with the "Xlib: sequence lost" errors.
               Version 3, SVHH, 19 March 1997
                       Added some type checking on inputs, and forced
                       subsamp>1.
               Version 4, SVHH, 25 June 1997
                       Made sure duplicate tag names are not attempted, and
                       tried to fix various widget problems under IDL v 5.0
               Version 5, SVHH, 22 October 1997
                       Added plotting of error bars.
		Version 6, 12-Jan-1999, William Thompson
			Added BGauss and Voigt profiles.
		Version 7, 11-Feb-2000, William Thompson
			Allow sorting of BGauss and Voigt profiles.

 Version     : Version 7, 11-Feb-2000


XCFIT_BLOCK $SSW/gen/idl/fitting/xcfit_block.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XCFIT_BLOCK
               
 Purpose     : Design/apply multi-component fit to data block
               
 Explanation : See documentation for XCFIT, CFIT, and CFIT_BLOCK first.

               XCFIT_BLOCK is an interface to visualize and modify component
               fits applied to a block of spectral data, and to keep track of
               parameter values and the INCLUDE/CONST values for locally
               excluded components and locally constant parameters.

               The data block may have anywhere from 2 to 7 dimensions, the
               only requirement is that the first dimension is the
               "dispersion" dimension, i.e., each point spectrum to be fitted
               is located in e.g., DA(*,i,j,k,l,m,n).

               The three display columns are, from left to right, the
               original data, the fit result (one result parameter shown at a
               time), and the residual data array.

               You may view the data in any way you like, try pushing the
               buttons just above the image displays to change the dimensions
               currently displayed, or the button just above the profile
               plots to change the dimension being plotted.

               To move around in the displayed data, use the middle mouse
               button. To zoom out/in, use the left/right buttons. All the
               display columns will be focused on the same physical point in
               the data even though the displayed dimensions may vary.

               To alter the currently displayed result parameter, select from
               the pulldown menu with the label "Result:...".

               To adjust the color/plot scaling method of any of the display
               sections, press the corresponding "Adjust color(plot) scaling"
               buttons.

               Command buttons:

               
          View/tweak
               
               Pushing this button starts XCFIT, showing the data and the
               corresponding fit from the current point in the data
               array. You can modify permanently the INCLUDE and CONST status
               for any component/parameter for this point. You may also
               adjust the MIN/MAX limits, INITIAL value etc to circumvent
               problems with finding a good fit, but these values are not
               stored individually for each point, and WILL REVERT to the
               global values stored in the original CFIT structure.

               
          FAIL

               If the fitting process for any reason (like cosmic rays etc)
               breaks down completely at some point (usually easily
               detectable if you view the Chi^2 values), and no tweaking of
               initial values etc can produce a good fit, you can declare the
               fit in this point as FAILED. This will flag the values of all
               the result parameters (and the Chi^2 value) with the MISSING
               value, and at the same time declares all the variables as
               CONSTANT at this point.  This will also signal to CFIT_BLOCK
               that it should not worry about trying to fit this point again.

               
          Adjust / Adjust (global) MIN/MAX values, names etc

               This button starts XCFIT in the same mode as when you press
               the View/tweak button, but if you alter the MIN/MAX values, or
               the component names, variable names etc, this will be
               permanently changed in the global fit. Be careful not to leave
               components flagged with INCLUDE:OFF or parameters with FIT:OFF
               status, since this will be imposed on all the data array
               points when you do a recalculation from global initial
               values. You may, however, not add, remove or change the order
               of any components.

          Redesign / Discard all results, redesign fit structure

               Use this button to start XCFIT in a mode where you can change
               the fit structure by adding, removing (purging), and sorting
               components. This will, however, leave XCFIT in the blue as to
               which parts of any calculated results correspond to which
               components/parameters, so unless you use either the "Flag as
               FAILED/IMPOSSIBLE" or "Discard changes" exit options, ALL
               RESULTS and RESIDUALS will be discarded.

          Calculate / Recalculate based on current result

               This option runs cfit_block over your data, using the current
               RESULT and INCLUDE/CONST arrays as input. Normally, it's
               quicker to recalculate a fit from current results than to
               recalculate from global initial values (since the starting
               points will normally be much closer to the final values).

          Calculate / Recalculate from global initial values

               This option runs cfit_block over your data, after resetting
               the current RESULT and INCLUDE/CONST arrays to contain the
               INITIAL value and INCLUDE/CONST values of the current fit
               structure.  Normally, it's quicker to recalculate a fit from
               current results than to recalculate from global initial values
               (since the starting points will normally be much closer to the
               final values).
               
 Use         : XCFIT_BLOCK,LAM,DA,WTS,FIT,MISS,RESULT,RESID [,INCLUDE,CONST]
    
 Inputs      : LAM : An array of wavelength values. Either one value for
                     every point in the data array, or a one-dimensional
                     array to go with all the spectra in the data array.

               DA : Data Array. Up to 7-dimensional data array, with spectra
                    along the first dimension.

               WTS : Weights to use in the fitting process. No default!

               FIT : The component fit structure
               
               MISS : The MISSING value, used to flag missing data points,
                      and parameter values at points where the fit has been
                      declared as "FAILED".
               
               RESULT : The array to contain the result parameter values (and
                        the Chi^2) values. May contain current results.

               RESID : Array to contain the residual. Same size as DA, may be
                       undefined on input.

               INLUCDE : Array to keep the INCLUDE status of each component
                         at each point.

               CONST : Array to keep the CONST status of each parameter at
                       each point.

                      
 Opt. Inputs : INCLUDE, CONST
               
 Outputs     : FIT, RESULT, RESID, INCLUDE, CONST
               
 Opt. Outputs: None.
               
 Keywords    : ORIGIN, SCALE : As in e.g., PLOT_IMAGE, but always with one
                               entry for each dimension.

               PHYS_SCALE : Array with same number of elements as ORIGIN and
                            scale, signifying which dimension scale is to be
                            taken as physical (i.e., to be used for scaling
                            the image size).

 Calls       : ***
	AVERAGE, BIGPICKFILE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CFIT
	CFIT_BLOCK, CFIT_BPATCH, CWF_STATUS, CW_CUBEVIEW, CW_FLIPSWITCH, CW_LOADCT
	CW_PLOTZ [1], CW_PSELECT, DEFAULT, DELETE_ANALYSIS, DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], DIMREBIN, DIMREFORM, EVAL_CFIT, EXIST
	HANDLE_KILLER_HOOKUP, INTERPOL, MAKE_SFIT_STC, MATCH_STRUCT, MK_ANALYSIS
	NDIM_INDICES, OPLOTERR, PARCHECK, RESTORE_ANALYSIS, REVERSE, SAVE_ANALYSIS
	SINCE_VERSION [1], SINCE_VERSION [2], STR_SEP, TRIM, TYP, UPDATE_CFIT, XACK, XCFIT
	XCFIT_BLOCK_ADJUSTFIT, XCFIT_BLOCK_ALTERFIT, XCFIT_BLOCK_CALCULATE
	XCFIT_BLOCK_EVENT, XCFIT_BLOCK_EXCLUDE_PATCH, XCFIT_BLOCK_FINDSPOT
	XCFIT_BLOCK_GET_FIT, XCFIT_BLOCK_GET_RESULT, XCFIT_BLOCK_GS
	XCFIT_BLOCK_PIX_APPLY_ALL, XCFIT_BLOCK_PIX_DEFPROG, XCFIT_BLOCK_PIX_EDIT
	XCFIT_BLOCK_PIX_EDIT_SETV, XCFIT_BLOCK_PIX_EXEC, XCFIT_BLOCK_PIX_EXPLAIN
	XCFIT_BLOCK_PIX_FAIL, XCFIT_BLOCK_PIX_FLICKER, XCFIT_BLOCK_PIX_GETMASK
	XCFIT_BLOCK_PIX_RECALC, XCFIT_BLOCK_PIX_RESET, XCFIT_BLOCK_PIX_SETCONST
	XCFIT_BLOCK_PIX_SETINCLUDE, XCFIT_BLOCK_PIX_WMASK, XCFIT_BLOCK_REGISTER
	XCFIT_BLOCK_RESTORE, XCFIT_BLOCK_SAVE_AS, XCFIT_BLOCK_SENSITIZE
	XCFIT_BLOCK_SET_FIT, XCFIT_BLOCK_SET_INITIAL, XCFIT_BLOCK_VISITP, XMANAGER
	XTEXTEDIT, break_file [4], cw_plotz [2], delvarx [5], mk_comp_poly
 CALLED BY:
	XCDS_ANALYSIS
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Analysis
               
 Prev. Hist. : None.

 Written     : S.V.H.Haugan, UiO, 21 January 1997
               
 Modified    : Version 2, SVHH, 15 December 1997
                       Circumventing IDL v 5 bug with scrollable bases.
               Version 3, SVHH, 6 May 1998
                       Smartened routines a bit to have less useless
                       redraw operations.
               Version 4, SVHH, 16 November 1998
                       Fixed a bug that ignored input MISSING value.
               Version 5, SVHH, 15 January 1999
                       Renamed get_indices() -> ndim_indices()
               Version 6, SVHH, 19 January 1999
                       Fixed some minor points.

 Version     : 6, 19 January 1999


XCHOICE $SSW/gen/idl/widgets/xchoice.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XCHOICE

 Purpose     : present a choice 

 Category    : Widgets

 Explanation : 

 Syntax      : IDL> value=xchoice(text,options)

 Inputs      : TEXT    = info text
               OPTIONS = array of options, e.g. ['QUIT','CONTINUE']

 Opt. Inputs : None

 Outputs     : VALUE = index of chosen option (-1 if no selection)

 Opt. Outputs: None

 Keywords    :
              GROUP = group leader of caller
              XOFF,YOFF = device (x,y) offsets of XINPUT base relative to caller
              TFONT = text widget font 
              BFONT = button widget font
              ROW   = layout option buttons into rows
              BUFF_SIZE = buffer space size around text [def = 3]

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, FREE_POINTER, GET_CALLER
	GET_POINTER, HAVE_WIDGETS [1], HAVE_WIDGETS [2], MAKE_POINTER, MK_DFONT
	SET_POINTER, TIMER_VERSION, XCHOICE_EVENT, XKILL, XMANAGER, XMANAGER_RESET, XREALIZE
	XSHOW
 CALLED BY:
	Cont_Surf, Display_1D, MK_CDS_PLAN, SOLAID, ST_SUMER
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Version 1,  1-April-1996,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XCOLORS [1] $SSW/gen/idl/objects/xcolors.pro
[Previous] [Next]
 NAME:                                                                                                           
       XCOLORS                                                                                                   
                                                                                                                 
 PURPOSE:                                                                                                        
                                                                                                                 
       The purpose of this routine is to interactively change color tables                                       
       in a manner similar to XLOADCT. No common blocks are used so                                              
       multiple copies of XCOLORS can be on the display at the same                                              
       time (if each has a different TITLE). XCOLORS has the ability                                             
       to notify a widget event handler, an object method, or an IDL                                             
       procedure if and when a new color table has been loaded. The                                              
       event handler, object method, or IDL procedure is then responsibe                                         
       for updating the program's display on 16- or 24-bit display systems.                                      
                                                                                                                 
 AUTHOR:                                                                                                         
                                                                                                                 
       FANNING SOFTWARE CONSULTING                                                                               
       David Fanning, Ph.D.                                                                                      
       1645 Sheely Drive                                                                                         
       Fort Collins, CO 80526 USA                                                                                
       Phone: 970-221-0438                                                                                       
       E-mail: davidf@dfanning.com                                                                               
       Coyote's Guide to IDL Programming: http://www.dfanning.com
                                                                                                                 
 CATEGORY:                                                                                                       
                                                                                                                 
       Widgets, Object, Command line.                                                                            
                                                                                                                 
 CALLING SEQUENCE:                                                                                               
                                                                                                                 
       XCOLORS                                                                                                   
                                                                                                                 
 INPUTS:                                                                                                         
                                                                                                                 
       None.                                                                                                     
                                                                                                                 
 KEYWORD PARAMETERS:                                                                                             
                                                                                                                 
       BLOCK: If this keyword is set, the program will try to block the                                          
          IDL command line. Note that this is only possible if no other                                          
          widget program is currently blocking the IDL command line. It                                          
          is much more reliable to make XCOLORS a modal widget (see the MODAL                                    
          keyword), although this can generally only be done when XCOLORS                                        
          is called from another widget program.                                                                 
                                                                                                                 
       BOTTOM: The lowest color index of the colors to be changed.                                               
                                                                                                                 
       COLORINFO: This output keyword will return either a pointer to                                            
          a color information structure (if the program is called in                                             
          a non-modal fashion) or a color information structure (if the program                                  
          is called in modal or blocking fashion). The color information                                         
          structure is an anonymous structure defined like this:                                                 
                                                                                                                 
             struct = { R: BytArr(!D.Table_Size), $ ; The current R color vector.                                
                        G: BytArr(!D.Table_Size), $ ; The current G color vector.                                
                        B: BytArr(!D.Table_Size), $ ; The current B color vector.                                
                        NAME: "", $                 ; The name of the current color table.                       
                        INDEX: 0 }                  ; The index number of the current color table.               
                                                                                                                 
          If a pointer to the structure is obtained, you will be responsible                                     
          for freeing it to prevent memory leakage:                                                              
                                                                                                                 
             XColors, ColorInfo=colorInfoPtr                                                                     
             Print, "Color Table Name: ", (*colorInfoPtr).Name                                                   
             Ptr_Free, colorInfoPtr                                                                              
                                                                                                                 
          Note that that Name field will be "Unknown" and the Index field will                                   
          be -1 until a color table is actually selected by the user. You are                                    
          responsible for checking this value before you use it.                                                 
                                                                                                                 
          When called in modal or blocking fashion, you don't have to worry about freeing                        
          the pointer, since no pointer is involved:                                                             
                                                                                                                 
             XColors, /Block, ColorInfo=colorInfoData                                                            
             Help, colorInfoData, /Structure                                                                     
             Print, "Color Table Name: ", colorInfoData.Name                                                     
                                                                                                                 
       DATA: This keyword can be set to any valid IDL variable. If                                               
          the variable is defined, the specified object method or notify                                         
          procedure will be passed this variable via a DATA keyword. This                                        
          keyword is defined primarily so that Notify Procedures are compatible                                  
          with the XLOADCT way of passing data. It is not strictly required,                                     
          since the _EXTRA keyword inheritance mechanism will allow passing                                      
          of *any* keyword parameter defined for the object or procedure that is                                 
          to be notified.                                                                                        
                                                                                                                 
       DRAG: Set this keyword if you want colors loaded as you drag                                              
          the sliders. Default is to update colors only when you release                                         
          the sliders.                                                                                           
                                                                                                                 
       _EXTRA: This keyword inheritance mechanism will pick up and                                               
          pass along to any method or procedure to be notified and keywords                                      
          that are defined for that procedure. Note that you should be sure                                      
          that keywords are spelled correctly. Any mis-spelled keyword will                                      
          be ignored.                                                                                            
                                                                                                                 
       FILE: A string variable pointing to a file that holds the                                                 
          color tables to load. The normal colors1.tbl file is used by default.                                  
                                                                                                                 
       GROUP_LEADER: The group leader for this program. When the group                                           
          leader is destroyed, this program will be destroyed.                                                   
                                                                                                                 
       INDEX: The index of the color table to start up. If provided, a color                                     
           table of this index number is loaded prior to display. Otherwise,                                     
           the current color table is used. Set this keyword if you wish                                         
           to have the index number of the event structure correct when                                          
           the user CANCELs out of the progam.                                                                   
                                                                                                                 
       MODAL: Set this keyword (along with the GROUP_LEADER keyword) to                                          
          make the XCOLORS dialog a modal widget dialog. Note that NO                                            
          other events can occur until the XCOLORS program is destroyed                                          
          when in modal mode.                                                                                    
                                                                                                                 
       NCOLORS: This is the number of colors to load when a color table                                          
          is selected.                                                                                           
                                                                                                                 
       NOSLIDERS: If this keyword is set, the color stretch and color gamma                                      
          sliders are not displayed. This would be appropriate, for example,                                     
          for programs that just load pre-defined color tables.                                                  
                                                                                                                 
       NOTIFYID: A 2-column by n-row array that contains the IDs of widgets                                      
          that should be notified when XCOLORS loads a color table. The first                                    
          column of the array is the widgets that should be notified. The                                        
          second column contains IDs of widgets that are at the top of the                                       
          hierarchy in which the corresponding widgets in the first column                                       
          are located. (The purpose of the top widget IDs is to make it                                          
          possible for the widget in the first column to get the "info"                                          
          structure of the widget program.) An XCOLORS_LOAD event will be                                        
          sent to the widget identified in the first column. The event                                           
          structure is defined like this:                                                                        
                                                                                                                 
          event = {XCOLORS_LOAD, ID:0L, TOP:0L, HANDLER:0L, $                                                    
             R:BytArr(!D.TABLE_SIZE < 256), G:BytArr(!D.TABLE_SIZE < 256), $                                     
             B:BytArr(!D.TABLE_SIZE < 256), INDEX:0, NAME:""}                                                    
                                                                                                                 
          The ID field will be filled out with NOTIFYID[0, n] and the TOP                                        
          field will be filled out with NOTIFYID[1, n]. The R, G, and B                                          
          fields will have the current color table vectors, obtained by                                          
          exectuing the command TVLCT, r, g, b, /Get. The INDEX field will                                       
          have the index number of the just-loaded color table. The name                                         
          field will have the name of the currently loaded color table.                                          
                                                                                                                 
          Note that XCOLORS can't initially tell *which* color table is                                          
          loaded, since it just uses whatever colors are available when it                                       
          is called. Thus, it stores a -1 in the INDEX field to indicate                                         
          this "default" value. Programs that rely on the INDEX field of                                         
          the event structure should normally do nothing if the value is                                         
          set to -1. This value is also set to -1 if the user hits the                                           
          CANCEL button. (Note the NAME field will initially be "Unknown").                                      
                                                                                                                 
          Typically the XCOLORS button will be defined like this:                                                
                                                                                                                 
             xcolorsID = Widget_Button(parentID, Value='Load New Color Table...', $                              
                Event_Pro='Program_Change_Colors_Event')                                                         
                                                                                                                 
          The event handler will be written something like this:                                                 
                                                                                                                 
             PRO Program_Change_Colors_Event, event                                                              
                                                                                                                 
                ; Handles color table loading events. Allows colors be to changed.                               
                                                                                                                 
             Widget_Control, event.top, Get_UValue=info, /No_Copy                                                
             thisEvent = Tag_Names(event, /Structure_Name)                                                       
             CASE thisEvent OF                                                                                   
                                                                                                                 
                'WIDGET_BUTTON': BEGIN                                                                           
                                                                                                                 
                     ; Color table tool.                                                                         
                                                                                                                 
                   XColors, NColors=info.ncolors, Bottom=info.bottom, $                                          
                      Group_Leader=event.top, NotifyID=[event.id, event.top]                                     
                   ENDCASE                                                                                       
                                                                                                                 
                'XCOLORS_LOAD': BEGIN                                                                            
                                                                                                                 
                     ; Update the display for 24-bit displays.                                                   
                                                                                                                 
                   Device, Get_Visual_Depth=thisDepth                                                            
                   IF thisDepth GT 8 THEN BEGIN                                                                  
                   WSet, info.wid                                                                                
                                                                                                                 
                    ...Whatever display commands are required go here. For example...                            
                                                                                                                 
                    TV, info.image                                                                               
                                                                                                                 
                 ENDIF                                                                                           
                 ENDCASE                                                                                         
                                                                                                                 
              ENDCASE                                                                                            
                                                                                                                 
              Widget_Control, event.top, Set_UValue=info, /No_Copy                                               
              END                                                                                                
                                                                                                                 
       NOTIFYOBJ: A vector of structures (or a single structure), with                                           
          each element of the vector defined as follows:                                                         
                                                                                                                 
             struct = {XCOLORS_NOTIFYOBJ, object:Obj_New(), method:''}                                           
                                                                                                                 
          where the Object field is an object reference, and the Method field                                    
          is the name of the object method that should be called when XCOLORS                                    
          loads its color tables.                                                                                
                                                                                                                 
             ainfo = {XCOLORS_NOTIFYOBJ, a, 'Draw'}                                                              
             binfo = {XCOLORS_NOTIFYOBJ, b, 'Display'}                                                           
             XColors, NotifyObj=[ainfo, binfo]                                                                   
                                                                                                                 
          Note that the XColors program must be compiled before these structures                                 
          are used. Alternatively, you can put this program, named                                               
          "xcolors_notifyobj__define.pro" (*three* underscore characters in this                                 
          name!) in your PATH:                                                                                   
                                                                                                                 
             PRO XCOLORS_NOTIFYOBJ__DEFINE                                                                       
              struct = {XCOLORS_NOTIFYOBJ, OBJECT:Obj_New(), METHOD:''}                                          
             END                                                                                                 
                                                                                                                 
          Or, you can simply define this structure as it is shown here in your code.                             
                                                                                                                 
          "Extra" keywords added to the XCOLORS call are passed along to                                         
          the object method, which makes this an alternative way to get information                              
          to your methods. If you expect such keywords, your methods should be defined                           
          with an _Extra keyword.                                                                                
                                                                                                                 
       NOTIFYPRO: The name of a procedure to notify or call when the color                                       
          tables are loaded. If the DATA keyword is also defined, it will                                        
          be passed to this program via an DATA keyword. But note that *any*                                     
          keyword appropriate for the procedure can be used in the call to                                       
          XCOLORS. For example, here is a procedure that re-displays and image                                   
          in the current graphics window:                                                                        
                                                                                                                 
             PRO REFRESH_IMAGE, Image=image, _Extra=extra, WID=wid                                               
             IF N_Elements(wid) NE 0 THEN WSet, wid                                                              
             TVIMAGE, image, _Extra=extra                                                                        
             END                                                                                                 
                                                                                                                 
          This program can be invoked with this series of commands:                                              
                                                                                                                 
             IDL> Window, /Free                                                                                  
             IDL> TVImage, image, Position=[0.2, 0.2, 0.8, 0.8]                                                  
             IDL> XColors, NotifyPro='Refresh_Image', Image=image, WID=!D.Window                                 
                                                                                                                 
          Note that "extra" keywords added to the XCOLORS call are passed along to                               
          your procedure, which makes this an alternative way to get information                                 
          to your procedure. If you expect such keywords, your procedure should                                  
          be defined with an _Extra keyword as illustrated above.                                                
                                                                                                                 
       TITLE: This is the window title. It is "Load Color Tables" by                                             
          default. The program is registered with the name 'XCOLORS:' plus                                       
          the TITLE string. The "register name" is checked before the widgets                                    
          are defined. If a program with that name has already been registered                                   
          you cannot register another with that name. This means that you can                                    
          have several versions of XCOLORS open simultaneously as long as each                                   
          has a unique title or name. For example, like this:                                                    
                                                                                                                 
            IDL> XColors, NColors=100, Bottom=0, Title='First 100 Colors'                                        
            IDL> XColors, NColors=100, Bottom=100, Title='Second 100 Colors'                                     
                                                                                                                 
       XOFFSET: This is the X offset of the program on the display. The                                          
          program will be placed approximately in the middle of the display                                      
          by default.                                                                                            
                                                                                                                 
       YOFFSET: This is the Y offset of the program on the display. The                                          
          program will be placed approximately in the middle of the display                                      
          by default.                                                                                            
                                                                                                                 
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], FILEPATH, LOADCT, REVERSE
	XCOLORS_BOTTOM_SLIDER, XCOLORS_CANCEL, XCOLORS_CLEANUP, XCOLORS_COLORTABLE
	XCOLORS_DISMISS, XCOLORS_GAMMA_SLIDER, XCOLORS_NOTIFYOBJ__DEFINE
	XCOLORS_PROTECT_COLORS, XCOLORS_SET, XCOLORS_TOP_SLIDER, XMANAGER, XREGISTERED
 CALLED BY:
	CIndex, EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], FSC_SURFACE
	FSC_WINDOW, XDETECTOR [1], XIMOVIE [1], XIMOVIE [2], XIMOVIE [4], XMAP [1], XMAP [2]
	ZIMAGE, xwhisker [1], xwhisker [2]
 COMMON BLOCKS:                                                                                                  
                                                                                                                 
       None.                                                                                                     
                                                                                                                 
 SIDE EFFECTS:                                                                                                   
                                                                                                                 
       Colors are changed. Events are sent to widgets if the NOTIFYID                                            
       keyword is used. Object methods are called if the NOTIFYOBJ keyword                                       
       is used. This program is a non-blocking widget.                                                           
                                                                                                                 
 RESTRICTIONS:                                                                                                   
                                                                                                                 
       None.                                                                                                     
                                                                                                                 
 EXAMPLE:                                                                                                        
                                                                                                                 
       To load a color table into 100 colors, starting at color index                                            
       50 and send an event to the widget identified at info.drawID                                              
       in the widget heirarchy of the top-level base event.top, type:                                            
                                                                                                                 
       XCOLORS, NCOLORS=100, BOTTOM=50, NOTIFYID=[info.drawID, event.top]                                        
                                                                                                                 
 MODIFICATION HISTORY:                                                                                           
       Written by:     David W. Fanning, 15 April 97. Extensive modification                                     
         of an older XCOLORS program with excellent suggestions for                                              
         improvement by Liam Gumley. Now works on 8-bit and 24-bit                                               
         systems. Subroutines renamed to avoid ambiguity. Cancel                                                 
         button restores original color table.                                                                   
       23 April 1997, added color protection for the program. DWF                                                
       24 April 1997, fixed a window initialization bug. DWF                                                     
       18 June 1997, fixed a bug with the color protection handler. DWF                                          
       18 June 1997, Turned tracking on for draw widget to fix a bug                                             
         in TLB Tracking Events for WindowsNT machines in IDL 5.0. DWF                                           
       20 Oct 1997, Changed GROUP keyword to GROUP_LEADER. DWF                                                   
       19 Dec 1997, Fixed bug with TOP/BOTTOM reversals and CANCEL. DWF.                                         
        9 Jun 1998, Fixed bug when using BOTTOM keyword on 24-bit devices. DWF                                   
        9 Jun 1998, Added Device, Decomposed=0 for TrueColor visual classes. DWF                                 
        9 Jun 1998, Removed all IDL 4 compatibility.                                                             
       21 Oct 1998, Fixed problem with gamma not being reset on CANCEL. DWF                                      
        5 Nov 1998. Added the NotifyObj keyword, so that XCOLORS would work                                      
         interactively with objects. DWF.                                                                        
        9 Nov 1998. Made slider reporting only at the end of the drag. If you                                    
         want continuous updating, set the DRAG keyword. DWF.                                                    
        9 Nov 1998. Fixed problem with TOP and BOTTOM sliders not being reset                                    
         on CANCEL. DWF.                                                                                         
       10 Nov 1998. Fixed fixes. Sigh... DWF.                                                                    
        5 Dec 1998. Added INDEX field to the XCOLORS_LOAD event structure. This                                  
         field holds the current color table index number. DWF.                                                  
        5 Dec 1998. Modified the way the colorbar image was created. Results in                                  
         greatly improved display for low number of colors. DWF.                                                 
        6 Dec 1998. Added the ability to notify an unlimited number of objects. DWF.                             
       12 Dec 1998. Removed obsolete Just_Reg keyword and improved documetation. DWF.                            
       30 Dec 1998. Fixed the way the color table index was working. DWF.                                        
        4 Jan 1999. Added slightly modified CONGRID program to fix floating divide                               
          by zero problem. DWF                                                                                   
        2 May 1999. Added code to work around a Macintosh bug in IDL through version                             
          5.2 that tries to redraw the graphics window after a TVLCT command. DWF.                               
        5 May 1999. Restore the current window index number after drawing graphics.                              
          Not supported on Macs. DWF.                                                                            
        9 Jul 1999. Fixed a couple of bugs I introduced with the 5 May changes. Sigh... DWF.                     
       13 Jul 1999. Scheesh! That May 5th change was a BAD idea! Fixed more bugs. DWF.                           
       31 Jul 1999. Substituted !D.Table_Size for !D.N_Colors. DWF.                                              
        1 Sep 1999. Got rid of the May 5th fixes and replaced with something MUCH simpler. DWF.                  
       14 Feb 2000. Removed the window index field from the object notify structure. DWF.                        
       14 Feb 2000. Added NOTIFYPRO, DATA, and _EXTRA keywords. DWF.                                             
       20 Mar 2000. Added MODAL, BLOCK, and COLORINFO keywords. DWF                                              
       20 Mar 2000. Fixed a slight problem with color protection events triggering                               
          notification events. DWF.                                                                              
       31 Mar 2000. Fixed a problem with pointer leakage on Cancel events, and improved                          
          program documentation. DWF.                                                                            
       17 Aug 2000. Fixed a problem with CANCEL that occurred only if you first                                  
          changed the gamma settings before loading a color table. DWF.                                          
       10 Sep 2000. Removed the requirement that procedures and object methods must                              
          be written with an _Extra keyword. DWF.                                                                
        5 Oct 2000. Added the File keyword to LOADCT command, as I was suppose to. DWF.                          
        5 Oct 2000. Now properly freeing program pointers upon early exit from program. DWF.                     
        7 Mar 2001. Fixed a problem with the BLOCK keyword. DWF.                                                 
       12 Nov 2001. Renamed Congrid to XColors_Congrid. DWF.                                                     
       14 Aug 2002. Moved the calculation of NCOLORS to after the draw widget creation                           
          to fix a problem with !D.TABLE_SIZE having a correct value when no windows had                         
          been opened in the current IDL session. DWF.                                                           
       14 Aug 2002. Fixed a documentation problem in the NOTIFYID keyword documentation                          
          that still referred to !D.N_COLORS instead of the current !D.TABLE_SIZE. DWF.                          
       27 Oct 2003. Added INDEX keyword. DWF.                                                                    
       29 July 2004. Fixed a problem with freeing colorInfoPtr if it didn't exist. DWF.                          
        5 December 2005. Added NOSLIDERS keyword and performed some small cosmetic changes. DWF.                 


XCRON $SSW/gen/idl/widgets/xcron.pro
[Previous] [Next]
 Project     : HESSI

 Name        : XCRON

 Purpose     : Simulate running IDL commands in a cron job

 Category    : Utility 

 Syntax      : IDL> xcron,command,tstart

 Inputs      : COMMAND = command to execute
               TSTART = time after which to start

 Outputs     : None

 Keywords    : NREPEATS = # of times to repeat 
               TEND = time to stop execution
               WAIT_TIME = seconds to wait between execution
               VERBOSE = send message output
               KILL = job id to stop
               LIST = list running jobs
               HOURS,MINUTES = wait time in hours/minutes

 CALLS: ***
	ANYTIM2TAI, ARR2STR [1], Arr2Str [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, IS_BLANK, MERGE_STRUCT
	PR_SYNTAX, TRIM, VALID_TIME, XALIVE, XCRON_CHECK, XCRON_CLEAR, XCRON_EVENT, XCRON_KILL
	XCRON_LIST, XCRON_REGISTER, XKILL, XMANAGER, delvarx [5], is_number [1]
	is_number [2]
 History     : Written 3 July 2001, D. Zarro (EITI/GSFC)

 Contact     : dzarro@solar.stanford.edu


XCROP_CUBE $SSW/gen/idl/widgets/xcrop_cube.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XCROP_CUBE
               
 Purpose     : General N-dimensional cube cropping.
               
 Explanation : This is a routine that allows the user to interactively pick
               out a "rectangular" subset of any N-dimensional data cube in
               IDL.

               Although IDL allows up to 8 dimensions in an array, only 7
               subscripts are allowed (!) so any "cropping" can be described
               by the start and stop indices of 7 dimensions. Thus a cropping
               is defined as a structure:

                        c = {b:lonarr(7), e:lonarr(7)}

               and cropping an array given such a structure is done by

                 cropped = cube(c.b(0):c.e(0),c.b(1):c.e(1),$
                                c.b(2):c.e(2),c.b(3):c.e(3),$
                                c.b(4):c.e(4),c.b(5):c.e(5),$
                                c.b(6):c.e(6))

 Use         : XCROP_CUBE,CUBE,CROP
    
 Inputs      : CUBE : Any data array.

               CROP : A structure {b:lonarr(7), e:lonarr(7)}, where the B and
                      E array describe the start and stop indices of the
                      cropping, respectively.
                      
 Opt. Inputs : CROP does not need to be defined on input.
               
 Outputs     : CROP is modified by the user.
               
 Opt. Outputs: None.
               
 Keywords    : FIXED_SIZE : The size of the cropping region may be fixed in
                            each dimension individually. E.g.,
                            FIXED_SIZE=[0,1,0,1,0,0,0] will fix the size of
                            dimensions 2 and 4.

               MISSING : The value of missing data (for color scaling
                         purposes).

               GROUP_LEADER : Group leader.

 Calls       : ***
	BOX_CURSOR, CW_CUBEVIEW, CW_ENTERB, DEFAULT, FIND_DRAW_WIDGET
	HANDLE_KILLER_HOOKUP, PCONVERT, PRESTORE, STR_SEP, TRIM, XCROP_CUBE_CROP
	XCROP_CUBE_EVENT, XCROP_CUBE_HELP, XCROP_CUBE_OPLOT, XCROP_CUBE_RESIZE, XMANAGER
	XTEXT, sgn [1], sgn [2]
 CALLED BY:
	XCDS_ANALYSIS
 Common      : None
               
 Restrictions: ...
               
 Side effects: ...
               
 Category    : Utility, Widgets
               
 Prev. Hist. : None

 Written     : SVH Haugan, UiO, 26 September 1997
               
 Modified    : Not yet.

 Version     : 1, 26 September 1997


XDEVICE $SSW/gen/idl/display/xdevice.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME: 
	XDEVICE

 PURPOSE: Returns the name of the windows device suitable for current os.


 CATEGORY: DISPLAY, SYSTEM


 CALLING SEQUENCE: 
	device = xdevice()
	or 
	device = xdevice(!d.name) ;returns windows device only if windows device is present.


 CALLS: ***
	FCHECK, OS_FAMILY
 INPUTS:
       Current_device - string name of current plot device.

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	IS_IT_X - Return 'X' if the passed current_device is a windowing device, X, Mac, Win.
 CALLED BY:
	BATSE_FLARES_WEEK, CAL_SHER, FSDEF, FS_ARCHIVE_DRAW, FS_AUTO_LOG, GE_WINDOW [1]
	MARK_REGION [1], MARK_REGION [2], POINT [1], QLDISPLAY, SELECT_DEV
	SET_GRAPHICS [1], SET_GRAPHICS [2], SNU, SPEX_COMMONS [2], SPEX_COMMONS [4]
	SPEX_FLASH [1], SPEX_FLASH [2], SPEX_PROC [1], SPEX_PROC [2], TEK_END [1]
	TEK_END [2], TWIDGET, plotman, point [2], setup_spex [1], setup_spex [2]
	spex_intervals [1], spex_intervals [2]
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Uses os_family to resolve device.

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 2-feb-1998.


XDIFF $SSW/gen/idl/widgets/xdiff.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XDIFF

 Purpose     : Show differences between program versions

 Explanation : When altering IDL software I often find it convenient to be
               able to pinpoint the changes that have been made, in order to
               ascertain that no unintended alterations were made, and in
               order to write up a modification notice in the documentation.

               Given the name of an IDL .pro file, this program locates the
               first occurence of the program in the path, including the
               current directory. This file is assumed to be the new,
               "development" copy. Then the second occurrence of the program
               in the path is located (assumed to be the old version), and
               the two are processed by spawning the diff command in Unix, and
               the perl program diffnew.pl in Windows.  The defaults are
               to make no distinction between upper and lower case, and
               to ignore white space differences.

               The output from diff is processed and the files are padded as
               to display them side by side by XTEXT, with marks inside
               '<' and '>' for lines that have been changed. The notation
               is:

               <c> Line changed
               <+> Line was added (blank line inserted in display)
               <-> Line was deleted (i.e., added in the *other* copy).
               | | Line was unchanged.

               If more than one "old" copy are present, it is possible to
               tell XDIFF to skip one or more versions when locating the old
               copy, by setting the SKIP keyword to the number of versions to
               skip.

               You can compare two different programs as well, by supplying a
               two-element string array as the program name. This is useful
               for comparing "isomorphic" routines.

               I normally use a suicidally small font when programming, so
               I've included a check whether it's me working or someone else
               when setting the font. It's also possible to use the FONT
               keyword to change the display font.

 Use         : XDIFF,'<program-name>' [,flags]

 Inputs      : '<program-name>' the name of the program to compare with older
               versions.

               If program_name is a two-element array, the two different
               programs are compared (always the first found copies).

 Opt. Inputs : FLAGS : The diff flags to be used. Defaults to "-iw", which
                       ignores case changes and white space, which is quite
                       convenient when comparing programs.  Note: You can not
                       specify both the flags argument AND the icase / iwhitespace
                       keywords.  If you specify the icase and/or iwhitespace keywords,
                       the diff flags will be set accordingly. There is no diff flag
                       for ignoring comments or blank lines, so use keywords for
                       those options.

 Outputs     : None.

 Opt. Outputs: None.

 Keywords    : SKIP : Number of (old) versions in the path to skip.
             : IBLANKLINE : If set, ignore blank lines. (default is 0)
             : ICOMMENT : If set, ignore comment lines. (default is 0)
             : IWHITESPACE : If set, ignore whitespaces.(default is 1)
             : ICASE : If set, ignore case differences. (default is 1)
             : FONT : The font to use for the text display.
             : CONTEXT : Just show changed lines, with a window of this many lines
               before and after
             : MAXCHARS : Limit output line length to maxchars for each file
             Note:  setting the flags argument is incompatible with
               setting the icase and/or iwhitespace keywords.

 Examples:
             xdiff,'testpro'
             xdiff,'testpro', 'i'
             xdiff,['testpro','testpro2'], /icomment, iwhitespace=0
             xdiff,'testpro', context=2, maxchars=40

 Calls       : ***
	APPEND_ARR, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHKLOG [1], CHKLOG [2]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DEFAULT, DETABIFY [1]
	DETABIFY [2], DETABIFY [3], EXIST, FILE_STAT [1], FILE_STAT [2], FIND_WITH_DEF [1]
	FIND_WITH_DEF [2], FIND_WITH_DEF [3], GET_TEMP_DIR, OS_FAMILY, PARCHECK
	RD_ASCII [1], RD_ASCII [2], REMCHAR [1], REMCHAR [2], REMCHAR [3], RM_FILE
	SINCE_VERSION [1], SINCE_VERSION [2], STRPAD, STR_SEP, TRIM, TYP, XDIFF_ADD
	XDIFF_PARSE4, XDIFF_REMPATH, XTEXT, break_file [4], concat_dir [4], curdir [1]
	curdir [2], del_blank_lines, del_comment_lines, file_stat [3], find_changes
	find_contig_ranges, remove_w_c
 Common      : None.

 Restrictions: Unix and Windows specific.

 Side effects: None.

 Category    : Utility

 Prev. Hist. : Yes, I know about dxdiff, but I cannot control the diff flags
               used in it, and I don't like the visual appearance.

 Written     : Stein Vidar Hagfors Haugan, UiO, 17 June 1996

 Modified    : Version 2, SVHH, 18 June 1996
               Added comparison of two differently named files.
               Version 3, SVHH, 16 October 1996
               Fixed a bug in XDIFF_ADD that crashed in marginal
               cases.
               Version 4, 30-Aug-02, mimster@stars.gsfc.nasa.gov, kim.tolbert@gsfc.nasa.gov
                 Compatibility for Windows
                 Added icase, iwhitespace, iblankline, and icomment keywords
                 Also added an indication of how many differences were found to the
                   widget title (actually counts the number of groups of changes, so
                   a group of consecutive +'s, e.g., counts as one change)
                 Also changed |c| to <c> (also |+|, |-|) to make changes stand out more
                 Also, on unix, if flags is empty, don't use it in spawn command
                 Also added context and maxchars keywords.
               Version 5, 8-Aug-2005, Kim Tolbert.  Doesn't work on Windows in IDL 6.2
                 because of call to file_stat. Not sure why, but file_info
                 works (file_info was introduced in 5.5)

 Version     : 4, 30 August 2002


xdisp_fits $SSW/gen/idl/display/xdisp_fits.pro
[Previous] [Next]
NAME:
	xdisp_fits
PURPOSE:
	To allow a user to select a file and image to be displayed
SAMPLE CALLING SEQUENCE:
	xdisp_fits
	xdisp_fits, h, img, img3
OUTPUT:
	h	- The FITS header
	img	- The image
	img3	- The extracted and processed image (back subtraction)
 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_CURSOR, BREAK_FILE [1], BREAK_FILE [2]
	BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], CONGRID [1]
	CONGRID [2], CONGRID [3], EVENT_NAME, FILE_EXIST [2], FMEDIAN, FXADDPAR [1]
	FXADDPAR [2], FXHMAKE [1], FXHMAKE [2], GET_WVALUE, PROFILES [1], PROFILES [2]
	REVERSE, RFITS [1], RFITS [2], RFITS [3], STDEV, STR2ARR [1], STR2ARR [2], UNSIGN
	WDEF [1], WDEF [2], XDISP_FITS_EVENT, XMANAGER, XMENU [1], XMENU [2]
	XMENU_GEN_INPUT [1], XMENU_GEN_INPUT [2], XMENU_SEL [1], XMENU_SEL [2]
	anytim2ex [1], anytim2ex [2], break_file [4], concat_dir [4], cross_corr [1]
	cross_corr [2], disp_gen [1], disp_gen [2], ex2fid [1], ex2fid [2]
	file_append [1], file_append [2], file_exist [1], file_exist [3], file_list [1]
	file_list [2], find_grid, get_subdirs [1], get_subdirs [2], get_xfont [1]
	get_xfont [2], img_summary [1], img_summary [2], mapx [1], mapx [2]
	next_window [1], next_window [2], pprint [1], pprint [2], prstr [1], prstr [2]
	rd_tfile [1], rd_tfile [2], remtab [1], remtab [2], set_printer [1]
	set_printer [2], set_printer [3], set_printer [4], set_printer [5]
	str_replace [1], str_replace [2], strmids [1], strmids [2], tbeep [1], tbeep [2]
	tbeep [3], tr_wrt_fits, where_arr [1], where_arr [2], zbuff2file [1]
	zbuff2file [2]
OPTIONAL KEYWORD INPUT:
	margin	- The margin value to use in passing to "img_summary"
	dir	- The list of directories to allow selection from
	disp_size- The image is rebinned to this size.  Default is 512
METHOD:
	The directories to be searched can be set by passing
	the directory name in by keyword or by:
	   1. Defining XDISP_FITS_BASE_DIR to the top data directory
	      and it will find all subdirectories under that
	      directory
	   2. Defining XDISP_FITS_DIRS as a comma separated list of
	      directories.
	The 16 bit data can be converted to 32 bit unsigned by setting
	the env var XDISP_FITS_UNSIGN
	
	The env var XDISP_FITS_KEYS can be defined as a comma separated 
	list of keywords to display.
HISTORY:
	Written 15-Jul-98 by M.Morrison (taking XDISP_TRACE as start)
	16-Jul-98 (MDM) - Various fixes and additions
	22-Jul-98 (MDM) - Added median filter and box stats options
V1.23	22-Jul-98 (MDM) - Added option to select the keywords for INFO display
			  by environment variable
V1.24	23-Jul-98 (MDM) - Corrected passing out of the data


XDISPSTR $SSW/gen/idl_libs/astron/misc/xdispstr.pro
[Previous] [Next]
  NAME:      
     XDISPSTR

  PURPOSE:   
     Display a string array in a text widget with a simple search capability.

 EXPLANATION:
     Similar to the IDL XDISPLAYFILE procedure but includes a search capbility.
 CALLING SEQUENCE:    
                 
     xdispstr, array, [/BLOCK, WIDTH= , HEIGHT=, TITLE=, GROUP_LEADER=, FONT=]

 INPUT PARAMETER:

     array  - String array (.e.g. FITS header) to be displayed

  OPTIONAL INPUT KEYWORD PARAMETERS:

    block -  Set to 1 to make widget blocking.  Default = block=0
          
    width, height  - Scalars giving number of characters per line, number
                           of lines.  Default = 80x24

    title  - Scalar Title for outermost base widget.

    group_leader  -    Group leader for top level base.

    top_line - first line to display (default is 0)

    font  -     Display font for text.

    top_line -  first line number in the string array to display

 CALLS: ***
	STRN [1], STRN [2], STRN [3], XDISPSTR_CLEANUP, XDISPSTR_EVENT, XMANAGER
 CALLED BY:
	HPRINT [1], HPRINT [2]
  MODIFICATION HISTORY:
     Written by R. S. Hill, RITSS, 17 Nov 2000
     Use cumulative keyword to TOTAL   W. Landsamn   May 2006


XDOC $SSW/gen/idl/help/xdoc.pro
[Previous] [Next]
 Project     : SDAC

 Name        : 
	XDOC
 Purpose     : 
	Front end to online documentation software.
 Explanation : 
	Provides online documentation for IDL procedures found in the IDL
	search path.  This procedure decides whether the graphics device
	supports widgets, in which case it calls SCANPATH; otherwise it calls
	DOC_MENU.
 Use         : 
	XDOC		;For prompting.
	XDOC, NAME	;Extract documentation for procedure NAME.
 Inputs      : 
	None required.
 Opt. Inputs : 
	NAME = String containing the name of the procedure.
 Outputs     : 
	PROC = string array with latest selected procedure text.
 Opt. Outputs: 
	None.
 Keywords    : 
       See SCANPATH
 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DOC_MENU, GET_CALLER, HAVE_WIDGETS [1]
	HAVE_WIDGETS [2], SCANPATH, SELECT_WINDOWS, SETPLOT [1], SETPLOT [2], XALIVE, XKILL
 CALLED BY:
	IMAGE_TOOL_EVENT, MK_CDS_PLAN, eis_mk_plan_gui [1], eis_mk_plan_gui [2]
	trace_euv_resp [1]
 Common      : 
	None.
 Restrictions: 
	None.
 Side effects: 
	None.
 Category    : 
	Documentation, Online_help.
 Written     : 
	Dominic Zarro, (ARC/GSFC), 1991.
 Modified    : 
	Version 1, William Thompson, GSFC, 23 April 1993.
		Changed test for widgets and incorporated into CDS library.
	Version 2, William Thompson, GSFC, 24 June 1993.
		Added ON_ERROR statement to correct problem on VMS machines.
       Version 3, Dominic Zarro, (ARC/GSFC), 1 August 1994.
               Changed name from DOC to XDOC and added keyword-inheritance
               to inherit keywords from SCANPATH.
       Version 3.1, Dominic Zarro (ARC/GSFC), 18 September 1994.
               Added PROC argument to return text of last selected procedure.
       Version 3.2, Dominic Zarro (ARC/GSFC), 12 December 1994.
               Added check for IDL release version.
       Version 4, Zarro, GSFC, 2 September 1996.
               Incorporated new SCANPATH
	Version 5, 23-Oct-1997, William Thompson, GSFC,
		Only select X device if on Unix or VMS.
		Use SELECT_WINDOWS
 Version     : 
	Version 5, 23-Oct-1997


xdroplist $SSW/gen/idl/widgets/xdroplist.pro
[Previous] [Next]
 Name: xdroplist

 Purpose: Function to select an item from a droplist widget.

 Calling sequence:  list = xdroplist (items)

 Input arguments:
   items - string array of items for droplist selection

 Keywords:
   initial - index into items of initial selection
   index - if set, return index of selection, otherwise return string
   title - title of widget
   label - label in front of droplist widget
   group - widget id of calling widget
   cancel - set to 1 if user pressed cancel button

 Output:
   Function returns item selected (as index if index keyword set).

 Written:  Kim Tolbert, 12/3/00
 Modifications: 
   22-Apr-2001, Kim. Added cancel keyword
 CALLS:
 CALLED BY
	hsi_ui_flarecat


XEDIT $SSW/gen/idl/fund_lib/sdac/xedit.pro
[Previous] [Next]
 NAME:		
       XEDIT
 PURPOSE:	
       Call the XEDIT editor to edit a file.
 CALLING SEQUENCE:
       XEDIT                ;Prompt for filename
	XEDIT, File
 INPUTS:
	File = Name of file to edit, scalar string
 OUTPUTS:
	None.
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHKLOG [1], CHKLOG [2]
	break_file [4]
 CALLED BY:
	MAKE_GOES_RESP
 COMMON BLOCKS:
	LASTFILE -- Contains the single variable FILENAME.
	same common block is used for filename in notepad.pro and edit.pro
 PROCEDURE:
	spawn is used to call xedit, except under vms where we use
	vue$library:vue$notepad.com  On ultrix or osf the process is launched.

 NOTES:

 RESTRICTIONS:
       

 MODIFICATION HISTORY:
	ras 3-apr-95


xedit_table $SSW/gen/idl/widgets/xedit_table.pro
[Previous] [Next]
 Project     : HESSI

 Name        : xedit_table

 Purpose     : Allows you to edit an array of values using a table widget.

 Category    : widgets

 Explanation : Builds a base for a widget_table, and adds accept and cancel buttons.

 Syntax      : vals = xedit_table (array [, group=group, title=title, _extra=_extra])

 Inputs      : array = 1 or 2-D array of values (strings or numbers) to edit

 Outputs     : vals - modified array

 Keywords    : group   = widget id of parent widget (if any)
               title   = string to put in title of widget
               _extra  = any keywords to pass into IDL widget_table routine

 CALLS: ***
	EXIST, XALIVE, XEDIT_TABLE_EVENT, XMANAGER, widget_offset
 CALLED BY:
	hsi_imagemisc_widget
 Restrictions:
              Changes to values only take effect when user presses return or clicks
              in another cell of table.  I gave up trying to make it work without that
              requirement.  There are lots of way to generate events when
              the user does stuff, but doing a widget_control,id,get_value=v doesn't
              get the changed values until one of those two things happen.

 Example     :
               vals = xedit_table (findgen(8,3), $
                      column_labels=['a','b','c','d','e','f','g','h'], $
                      row_labels=['A','B','C'], $
                      title='XEDIT_TABLE Example')

 Written     : 4-May-2005, Kim Tolbert

 Modifications:


XGAMMA $SSW/gen/idl/widgets/xgamma.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	XGAMMA
 Purpose     : 
	Widget interface to control the screen brightness.
 Explanation : 
	A widgets-based interface to the routine GAMMA_CT,/INTENSITY to control
	the brightness of the screen.
 Use         : 
	XGAMMA
 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : ***
	GAMMA_CT, XGAMMA_EVENT, XMANAGER
 Common      : 
	COLORS:  The IDL colors common block.
	XGAMMA:  Stores the widget labels for event handling.
 Restrictions: 
	Only useful on displays with widget support.

	In general, the SERTS image display routines use several non-standard
	system variables.  These system variables are defined in the procedure
	IMAGELIB.  It is suggested that the command IMAGELIB be placed in the
	user's IDL_STARTUP file.

	Some routines also require the SERTS graphics devices software,
	generally found in a parallel directory at the site where this software
	was obtained.  Those routines have their own special system variables.

 Side effects: 
	If the "Read from screen" button is pressed, then the color tables in
	the COLORS common block are replaced with whatever color tables are
	currently in use, evaluated by interrogating the screen.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, September 1992.
 Written     : 
	William Thompson, GSFC, September 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 4 May 1993.
		Incorporated into CDS library.
 Version     : 
	Version 1, 4 May 1993.


xgen_widget $SSW/gen/idl/widgets/xgen_widget.pro
[Previous] [Next]
NAME:
	xgen_widget
PURPOSE:
	Takes a text file and creates a widget.  The
	text file has three items
	   a) A label used to identify the button selected
	   b) How to block the widget (organization)
	   c) The label for the widget button
	The use of a text file can allow the layout to be
	adjusted varily easily, and the event handler can be
	simplified.
SAMPLE CALLING SEQUENCE:
	wfil = concat_dir('$MDI_CAL_INFO', 'xjitter.widg')
	xgen_widget, wfil, 'xjitter_event', 'XJITTER'
METHOD:
	The input text file has # as the comment character
	A sample file contents is:

               #
               #
               #
               Button Code     Blk     Label
               --------------- ----    --------------------------
               QUIT            1a      Quit
               LIST_TFR        1a      List TFR
               LIST_ISSSUM     1a      List ISS_SUM
               DATE_ST         1a      Start Date/Time

               MK_SUM          1b      Make Summary File
               RD_SUM          1b      Read ISS_SUM File
               RESET_BLKS      1b      Select all blocks
               SEL_BLKS        1b      Select which Blocks

               #(label)                2b      FFT Spectra Plot
               #FFTS-1         2b      PZT Average A (Z)
               #FFTS-2         2b      PZT Average B
               #FFTS-3         2b      PZT Average C

               (label)         2b      Location/Amp/Phase
               LAP-1           2b      PZT Average A (Z)
               LAP-2           2b      PZT Average B

               INT_SELIMG      5a      Select blks to integrate on image
               INT_SELBKG      5a      Select bkg blocks to integrate on image
               INT_CALC        5a      Re-calculate average spectra
	The "BLK" column indicates how to cluster the button
	layout.  The number indicates the column and the letter
	indicates the grouping within that column.

	See "XJITTER.PRO" in the SOHO/MDI tree for an example of
	how the routine can be used.
DISCLAIMER:
	The module was put together in one day without
	extensive thought.  At this time there is only ONE
	IDL routine which uses it.
 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], WDEF [1], WDEF [2], XMANAGER, XMENU [1], XMENU [2]
	get_xfont [1], get_xfont [2], rd_tfile [1], rd_tfile [2], remtab [1], remtab [2]
	str2cols [1], str2cols [2]
HISTORY:
	Written 30-Jan-97 by M.Morrison
	15-Apr-97 (MDM) - Added documentation header


XGET_SYNOPTIC $SSW/gen/idl/image_tool/xget_synoptic.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       XGET_SYNOPTIC()

 PURPOSE:
       Return a string array of SOHO synoptic or summary image file names

 EXPLANATION:
       XGET_SYNOPTIC searches for filenames of the SOHO synoptic images from
       variety of sources or SOHO summary images. The search path is
       determined by environmental variable SYNOP_DATA or
       SUMMARY_DATA. If neither of the env variables is defined,
       user's home directory will be used as the search path. All
       synoptic and summary data files have to be named inthe format
       of '*yymmdd.*', where the wild card character * can be 1 or
       more characters.

 CALLING SEQUENCE:
       Results = XGET_SYNOPTIC([start] [,stop] [source=source] [group=group])

 INPUTS:
       None required.

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       Results -- String containing filename selected from the directory
                  specified by the SYNOP_DATA env. variable (or user's home
                  directory if SYNOP_DATA is not set), based on the source of
                  file indicated by the SOURCE keyword. A null string will be
                  returned if no appropriate file is selected. Please
                  note that if the keyword ININITIALIZE is set,
                  RESULTS will be a structure named SYNOP_SRC that
                  has the following tags:

          NAME    - Name of image sources (if TYPE is not set) or name
                    of image types (if TYPE is set).
          DIRNAME - Directory names under SYNOP_DATA in which image
                    files reside

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       INITIALIZE -- If set, does nothing but initialize the common block
       START --  Date string in YYYY/MM/DD format, beginning date
                 from which the image data base is searched. Default:
                 1990/01/01
       STOP  --  Date string in  YYYY/MM/DDformat, end date for which the
                 image data base is searched. If absent, current (system)
                 date is assumed.
       SOURCE_IDX --  Index number of image source to be searched.
                      For synoptic data, the current image sources are:

                0 -- Yohkoh Soft-X Telescope
                1 -- Big Bear Solar Observatory
                2 -- Kitt Peak National Observatory
                3 -- Learmonth Observatory, Australia
                4 -- Mt. Wilson Observatory
                5 -- Space Environment Lab
                6 -- Holloman AFB
                7 -- Mees Solar Observatory
                8 -- Sacramento Peak Observatory
                9 -- Nobeyama Solar Radio Observatory
               10 -- Other Institutes

       GROUP   -- ID of the widget that functions as a group leader
       SUMMARY -- Set this keyword for SOHO summary data. If not set,
                  SOHO synoptic data will be assumed.
       MODAL   -- Set this keyword to make this program a blocking
                  widget program

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], Bell, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], CW_BSELECTOR, CW_FIELD, DATE_CODE, DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], EXIST, FLASH_MSG, GET_CENT_OFF, GET_DFONT [1]
	GET_DFONT [2], GET_SOURCE_STC, GET_UTC, INFO_UPDATE, ITOOL_GETFILE, REP_TAG_VALUE
	STRIP_DIRNAME [1], STRIP_DIRNAME [2], SYNOP_UPDATE, VALID_TIME
	XGET_SYNOPTIC_EVENT, XKILL, XMANAGER, XTEXT, concat_dir [4], delvarx [5]
 CALLED BY:
	DSP_RASTER
 COMMON BLOCKS:
       FOR_SYNOP_UPDATE (used internally by built-in routines)

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Science planning

 PREVIOUS HISTORY:
       Written September 19, 1994, by Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Liyun Wang, GSFC/ARC, October 5, 1994
          Modified so that the file extension name does not have to be
          ".fits"
       Version 2, Liyun Wang, GSFC/ARC, October 12, 1994
          Added keyword TYPE to allow choosing images based on image type
       Version 3, Liyun Wang, GSFC/ARC, November 21, 1994
          Made the list selected if it is the only one
       Version 4, Liyun Wang, GSFC/ARC, December 29, 1994
          Removed the .tags tag, and renamed the .value tag to .dirname in
             the SOURCES structure;
       Version 5, Liyun Wang, GSFC/ARC, February 1, 1995
          Made it work for files with the SOHO filename convention
       Version 6, Liyun Wang, GSFC/ARC, February 13, 1995
          Made it work under VMS (requires the "new" version of
             CONCAT_DIR that can concatinate two directories under VMS).
       Version 7, Liyun Wang, GSFC/ARC, March 30, 1995
          Added the Help button
       Version 8, Liyun Wang, GSFC/ARC, April 19, 1995
          Added Mauna Loa Solar Obs of HAO site
       Version 9, Liyun Wang, GSFC/ARC, May 9, 1995
          Got rid of common blocks in main routine and event handler
          Remembers the last image source and selected items
          Returns a structure (with tag names NAME and DIRNAME) when
             the keyword INITIALIZE is set
       Version 10, Liyun Wang, GSFC/ARC, May 25, 1995
          Replaced image source names with the cw_bselector widget
       Version 11, July 21, 1995, Liyun Wang, GSFC/ARC
          Replaced call to FINDFILE with LOC_FILE to avoid limitation
             of number of files being read in
       Version 12, February 15, 1996, Liyun Wang, GSFC/ARC
          Changed keyword TYPE to SUMMARY
          Xresource option disabled for IDL 3.5 and earlier
       Version 13, March 27, 1996, Liyun Wang, GSFC/ARC
          Added interface to SOHO private data directory
       Version 14, April 22, 1996, Liyun Wang, GSFC/ARC
          Improved file name list (truly list files according to time)
       Version 15, June 17, 1996, Liyun Wang, GSFC/ARC
          Used FIND_FILE to fix built-in FINDFILE() problem
       Version 16, July 1, 1996, Liyun Wang, GSFC/ARC
          Speeded up the file searching process by adding more specific
             filter pattern
       Version 17, August 9, 1996, Liyun Wang, NASA/GSFC
          Fixed a bug occuring when switching between summary and
             private database
       Version 18, November 27, 1996, Liyun Wang, NASA/GSFC
          Sorted listed entries by date as well as by time
       Version 19, December 6, 1996, Liyun Wang, NASA/GSFC
          Made it more tolerent to date strings. Whatever ANYTIM2UTC
             accepts will be fine now
       Version 20, January 15, 1997, Liyun Wang, NASA/GSFC
          Modified to use ITOOL_GETFILE (which is also used by GET_SYNOPTIC)

 VERSION:
       Version 20, January 15, 1997


XGET_UTC $SSW/gen/idl/widgets/xget_utc.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       XGET_UTC()

 PURPOSE:
       A widget program to select date/time (UTC) interactively

 CATEGORY:
       Widget, utility

 SYNTAX:
       Result = xget_utc( [date] )

 INPUTS:
       None required.

 OPTIONAL INPUTS:
       DATE - Initial Date/Time in any ECS time formats

 OUTPUTS:
       RESULT - Date/Time (UTC time structure unless other keyword is set);  
                -1 IF an error occurs

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       GROUP  - ID of widget which serves as a group leader
       ERROR  - Error message returned; null string if no error
       YRANGE - 2-element integer array indicating allowed time range
                in years; default to [1995, 2010]
       CENTER - Set this keyword to have the widget centered in the screen
       _EXTRA - Any keywords accepted by ANYTIM2UTC

 CALLS: ***
	ADJUST_DAY, ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DAY_MAX, FREE_POINTER, GET_CENT_OFF, GET_DFONT [1], GET_DFONT [2]
	GET_POINTER, GET_UTC, LEAP_YEAR, MAKE_POINTER, SET_POINTER, XACK, XALIVE
	XGET_UTC_EVENT, XKILL, XMANAGER, XTEXT_RESET
 CALLED BY:
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL_EVENT
 COMMON:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       Caller widget program is frozen till XGET_UTC is killed.

 HISTORY:
       Version 1, April 3, 1996, Liyun Wang, GSFC/ARC. Written
       Version 2, August 12, 1996, Zarro, GSFC, added check for valid handle

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


XGHOST $SSW/gen/idl/widgets/xghost.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XGHOST

 Purpose     : to get IDs of widgets that have the same event handler

 Category    : widgets

 Explanation : examines XMANAGER common for registered ID's

 Syntax      : IDL> ghosts=xghost(id)

 Inputs      : ID = widget id or widget event handler name

 Opt. Inputs : None

 Outputs     : GHOSTS = IDs of widgets with same event handler

 Opt. Outputs: NGHOSTS = # of ghost widgets found

 Keywords    : None

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_HANDLER_ID, GET_HANDLER_NAME
 CALLED BY:
	XKILL
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Version 1,  22-Aug-1996,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XHIDE $SSW/gen/idl/widgets/xhide.pro
[Previous] [Next]
 Project     :	SDAC

 Name        :	XHIDE

 Purpose     :	To hide (map) an X widget

 Explanation :	So obvious, that explaining it will take more
               lines than the code.

 Use         :	XHIDE,ID
              
 Inputs      :	ID = widget id to hide

 Category    :	Useful stuff

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 18 September 1993
 CALLS:
 CALLED BY
	MK_STUDY, XCAMP, XCAT, XLIST, XSHOW_RASTER, XSTUDY, plotman
	plotman_panel_control_event


XHOUR $SSW/gen/idl/widgets/xhour.pro
[Previous] [Next]
 Project     : RHESSI

 Name        : XHOUR

 Purpose     : produce widget hourglass

 Use         : XHOUR

 Opt. Inputs : BASE = widget base id

 Outputs     : None

 Keywords    : None

 Explanation : On some devices, the command: widget_control,/hour 
               produces device errors. 
               This procedure protects against these using catch.

 Category    : Widgets

 Written    : Zarro (L-3Com/GSFC) 23 August 2005 - Added CATCH
 CALLS:
 CALLED BY
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL
	IMAGE_TOOL_EVENT, ITOOL_DRAW_ICON, ITOOL_PICKFILE, ITOOL_PKFILE_BS, SCANPATH
	SHOW_SYNOP__DEFINE, XCAT, XSET_STRUCT, XTEXT, xpickfile, xpickfile2


XIMOVIE [1] $SSW/gen/idl/widgets/ximovie.pro
[Previous] [Next]
 NAME:
       XIMOVIE

 PURPOSE:
      
       XIMOVIE provides a widget interface to run and control 
       images displayed as a movie. The images must be written 
       as an assoc file.
                                                                  

 CATEGORY:
       Hansteen/Wikstol Data analysis SW

 CALLING SEQUENCE:
       ximovie, file

 INPUTS:
       pos: assoc file

 KEYWORD PARAMETERS:

 OUTPUTS:
       A widget that shows the movie with buttons to control it, and 
       various options to save movie/images and to select color table. 

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], CW_FIELD, GET_BMP_BUTTONS, INTERPOL, MEAN
	MPEG_CLOSE, MPEG_OPEN, MPEG_PUT, MPEG_SAVE, WRITE_GIF, XCOLORS [1], XCOLORS [2]
	XCOLORS [3], XCOLORS [4], XCOLORS [5], XIMOVIE_ASPECT, XIMOVIE_BCK, XIMOVIE_BLINK
	XIMOVIE_BLINK_START, XIMOVIE_BLINK_STOP, XIMOVIE_BOXDRAW, XIMOVIE_CLEANUP
	XIMOVIE_COLORS, XIMOVIE_DECR, XIMOVIE_DESTROY, XIMOVIE_DRAW, XIMOVIE_FRAMEINCR
	XIMOVIE_FRAMESLIDER, XIMOVIE_FRAMESPEED, XIMOVIE_GIF, XIMOVIE_GIF_ALL
	XIMOVIE_INCR, XIMOVIE_JPEG, XIMOVIE_JPEG_ALL, XIMOVIE_MIX, XIMOVIE_MPEG
	XIMOVIE_PAUSE, XIMOVIE_PLAY_CYCLE, XIMOVIE_PLAY_FWD, XIMOVIE_PLAY_REV
	XIMOVIE_PS, XIMOVIE_RESIZE, XIMOVIE_SETFRAMES, XIMOVIE_SETFRAMES_DESTROY
	XIMOVIE_STREAM1, XIMOVIE_STREAM2, XIMOVIE_XSCROLL_SLIDER
	XIMOVIE_YSCROLL_SLIDER, XIMOVIE_ZOOM, XMANAGER, string3 [1], string3 [2]
 CALLED BY:
	XDETECTOR [1], XMAP [1], XMAP [2], lp_ximovie [1], lp_ximovie [2], xwhisker [1]
	xwhisker [2]
 COMMON BLOCKS:
       

 PROCEDURE:

 RESTRICTIONS:


 MODIFICATION HISTORY:
       Version 1.0, Jan-2004: Oivind Wikstol. 


XINPUT $SSW/gen/idl/widgets/xinput.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        : XINPUT

 Purpose     : Allow user to input text

 Use         : xinput,text

 Inputs      : None.

 Opt. Inputs : INSTRUCT = instructions for user

 Outputs     : TEXT = string response text entered by user

 Opt. Outputs: None.

 Keywords    :
              GROUP = group leader of caller
              MODAL = modal (make caller insensitive)
              XOFF,YOFF = device (x,y) offsets of XINPUT base relative to caller
              TFONT = text widget font
              BFONT = button widget font
              YSIZE = ysize of input text widget
              TITLE = title for main base
              STATUS = 0/1 if CANCELLED/ACCEPTED
              ACCEPT_ENTER = Set to make ENTER key act as ACCEPT
              NOBLANK = if set, the user cannot exit without typing something

 Category    : Widgets

 Written     :	Version 1, Zarro (ARC/GSFC) 23 October 1994

 Modified:   : Version 2, Liyun Wang, GSFC/ARC, March 24, 1995
                  added MAX_LEN keyword
               Version 3, Liyun Wang, GSFC/ARC, March 29, 1995
                  Made the widget's width be at least MAX_LEN if
                  MAX_LEN is passed
               Version 4, Zarro, GSFC, August 15 1996
                  Added second XMANAGER call to catch a problem
                     occuring on SUMER's VMS system.
                  Limited instruction window to maximum of 25 rows
                     instead of 45 rows --- LYW
               Version 5, SVHH, UiO, 22 October 1996
                  Added /ACCEPT_ENTER keyword.
               Version 6, DMZ, GSFC, 24 October 1996
                  Initialize cursor position in text widget prior to
                  exiting. This helps avoid IDL FONT error.
               Version 7, DMZ, GSFC, 4 October 1996
                  Added /NOBLANK
               Kim, 28 March 2000.  Took /modal off xmanager call, and added group
		and modal to call to widget_base if using > Version 5.0.
		Kim, 6 April 2000.  Redid change of 28 March.
               Modified, 8 April 2000 (Zarro, SM&A/GSFC) - wrapped first
               call to widget base with call_function in case pre-5 compilers
               complain about having modal keyword embedded.

 CALLS:
 CALLED BY
	CHIANTI_NE, CHIANTI_TE, CWF_COMPONENT, CW_ENTERB, EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL_EVENT, ITOOL_RD_GIF, MK_CDS_PLAN, MK_SOHO
	MK_STUDY, MK_WAVECAL, RD_IMAGE_GIF, SCANPATH, SUMER_TOOL_PD_EVENT, TP_WRT_IEF, XCAT
	XIAP, XMAIL, XPORT, XPS_SETUP, XSTUDY, XTEXT


XINTERANIMATE2 $SSW/gen/idl/widgets/xinteranimate2.pro
[Previous] [Next]
 NAME:
		XINTERANIMATE2

 PURPOSE:
	Display an animated sequence of images using X-windows Pixmaps.
	The speed and direction of the display can be adjusted using
	the widget interface.

 CATEGORY:
	Image display, widgets.

 CALLING SEQUENCE:
	To initialize:
		XINTERANIMATE2, SET = [Sizex, Sizey, Nframes]

	To load a single image:
		XINTERANIMATE2, IMAGE = Image, FRAME = Frame_Index

	To load a single image that is already displayed in an existing window:
		XINTERANIMATE2, FRAME = Frame_index, $
			WINDOW = [Window_Number [, X0, Y0, Sx, Sy]]
	(This technique is much faster than reading back from the window.)

	To display the animation after all the images have been loaded:
		XINTERANIMATE2 [, Rate]

	To close and deallocate the pixmap/buffer (which also takes place
	automatically when the user presses the "Done With Animation"
	button or closes the window with the window manager):
		XINTERANIMATE2, /CLOSE

 OPTIONAL INPUTS:
	Rate:	A value between 0 and 100 that represents the speed of the
		animation as a percentage of the maximum display rate.
		The fastest animation is with a value of 100 and the slowest
		is with a value of 0.  The default animation rate is 100.
		The animation must be initialized using the SET
		keyword before calling XINTERANIMATE2 with a rate value.

 KEYWORD PARAMETERS:
	CLOSE:	Set this keyword to delete the offscreen pixwins and Widget,
		freeing storage.

	CYCLE: If set, cycle.  Normally, frames are displayed going either
		forward or backwards.  If CYCLE is set, reverse direction
		after the last frame in either direction is displayed.
		Provide this keyword with the SET keyword.

	FRAME:	The frame number when loading frames.  This keyword only has
		an effect when used in conjunction with the SET keyword.
		FRAME must be set to a number in the range 0 to Nframes-1.

	GROUP:	The widget ID of the widget that calls XINTERANIMATE2.  When
		this ID is specified, the death of the caller results in the
		death of XINTERANIMATE2.

	IMAGE:	A single image to be loaded at the animation position given
		by FRAME.  The keyword parameter FRAME must also be specified.

	KEEP_PIXMAPS: If TRUE, XINTERANIMATE2 doesn't destroy the animation
		pixmaps when it is killed. Calling it again without
		going through the SET and LOAD steps will cause the same
		animation to play without the overhead of creating
		the pixmaps.
	BLOCK:  Set this keyword to have XMANAGER block when this
		application is registered.  By default the Xmanager
               keyword NO_BLOCK is set to 1 to provide access to the
               command line if active command 	line processing is available.
               Note that setting BLOCK for this application will cause
		all widget applications to block, not only this
		application.  For more information see the NO_BLOCK keyword
		to XMANAGER.
	ORDER:	Set this keyword to display images from the top down instead
		of the default bottom up.  This keyword is only used when
		loading images.
       MODAL:  If set, then XINTERANIMATE2 runs in "modal" mode, meaning that
               all other widgets are blocked until the user quits
               XINTERANIMATE2.
       MPEG_OPEN: Set this keyword to open an MPEG file.
       MPEG_FILENAME: Set this keyword equal to a string for the desired
               MPEG filename.  If not set, idl.mpg is used.
       MPEG_QUALITY : Set this keyword to a value between 0 (low quality)
               and 100 (high quality) to control the quality of the movie file.
       MPEG_BITRATE, MPEG_IFRAME_GAP, MPEG_MOTION_VEC_LENGTH : See the
               documentation for the IDLgrMPEG object for information on
               using these keywords for finer control of the MPEG quality.
               In most situations, the MPEG_QUALITY keyword should be
               sufficient.
       MPEG_CLOSE: Set this keyword to write the MPEG file.
     SHOWLOAD:	Set this keyword (in conjunction with the SET keyword) to
		display each frame and update the frame slider as frames are
		loaded.

	SET:	This keyword initializes XINTERANIMATE2.  SET should be equated
		to a 3-element integer vector containing the following
		parameters:
		  Sizex, Sizey:	The width and height of the images to be
				displayed, in pixels.

		  Nframes:	The number of frames in the animated sequence
				(since XINTERANIMATE2 is an animation routine,
				Nframes must be at least 2 frames).

	TITLE:	A string to be used as the title of the widget.  If this
		keyword is not specified, the title is set to "XInterAnimate2"
		This keyword has an effect only when used in conjunction with
		the SET keyword).

	TRACK: If set, the frame slider tracks the current frame.  Default
		is not to track.  Provide this keyword with the SET keyword.

	WINDOW:	When this keyword is specified, an image is copied from an
		existing window to the animation pixmap.  When using X
		windows, this technique is much faster than reading
		from the display and then calling XINTERANIMATE2 with a 2D
		array.

		The value of this parameter is either an IDL window
		number (in which case the entire window is copied),
		or a vector containing the window index and the rectangular
		bounds of the area to be copied, for example:
		WINDOW = [Window_Number, X0, Y0, Sx, Sy]

      XOFFSET:	The horizontal offset, in pixels from the left of the frame,
		of the image in the destination window.

      YOFFSET:	The vertical offset, in pixels from the bottom of the frame,
		of the image in the destination window.

 OUTPUTS:
	No explicit outputs.

 CALLS: ***
	CW_ANIMATE2, CW_ANIMATE2_GETP, CW_ANIMATE2_LOAD, CW_ANIMATE2_RUN, MPEG_CLOSE
	MPEG_PUT, MPEG_SAVE, XINTANIM_EVENT, XINTANIM_KILL_PIX, XKILL, XMANAGER, XREGISTERED
 CALLED BY:
	MOVIE_MAP
 COMMON BLOCKS:
	XINTERANIMATE2_COM: a private common block.

 SIDE EFFECTS:
	A pixmap and widget are created.

 RESTRICTIONS:
	Only a single copy of XINTERANIMATE2 can run at a time.

 PROCEDURE:
	When initialized, this procedure creates an approximately square
	pixmap or memory buffer, large enough to contain Nframes of
	the requested size.  Once the images are loaded, using the
	IMAGE and FRAME keywords, they are displayed by copying the images
	from the pixmap or buffer to the visible draw widget.

 EXAMPLE:
	Enter the following commands to open the file ABNORM.DAT (a series
	of images of a human heart) and animate the images it contains using
	XINTERANIMATE2.  For a more detailed example of using XINTERANIMATE2,
	see the example in the "Using IDL Widgets" chapter of "IDL Basics".
	Read the images into the variable H by entering:

		OPENR, 1, FILEPATH('abnorm.dat', SUBDIR = 'examples/data')
		H = BYTARR(64, 64, 16)
		READU, 1, H
		CLOSE, 1
		H = REBIN(H, 128, 128, 16)

	Initialize XINTERANIMATE2 with the command:

		XINTERANIMATE2, SET=[128, 128, 16], /SHOWLOAD

	Load the images into XINTERANIMATE2 and play the animation by entering:

		FOR I=0,15 DO XINTERANIMATE2, FRAME = I, IMAGE = H[*,*,I]
		XINTERANIMATE2

 MODIFICATION HISTORY:
	DMS, April, 1990.
	SMR, December, 1990.  	Modified the XANIMATE code to work
				interactively with widgets.

	DMS, March, 1991.	Modified the routine to use individual pixmaps
				for each frame of the animation.  Also added
				the ability to read in from current IDL
				windows directly into offscreen bitmap.

	SMR, March, 1991.	Modified to use new XMANAGER keyword CLEANUP
				to clean up the offscreen pixmaps when dying.

	SMR, Jan, 1992.		Modified the /CLOSE portion to check for a
				valid widget before using WIDGET_CONTROL
				and /DESTROY.

	AB, June 1992		Rewrite using the new CW_ANIMATE compound
				widget. Added the KEEP_PIXMAPS keyword.

	DJE, April, 1996	Replaced XANNOUNCE with DIALOG_MESSAGE

       SJL, December, 1997     Added MPEG capability.

LP, 6/16/98             Added MODAL keyword.
  Kim Tolbert, 4-Feb-2005.  Replaced xinteranimate2 with the newer version of xinteranimate
    (main diff is addition of mpeg stuff), but kept the change to xkill.  This version
    calls cw_animate2 instead of cw_animate.  cw_animate2 has a catch in it, so that
    when the it crashes (usually by running out of memory for pixmaps) it cleans up
    after itself before returning, instead of leaving a gazillion pixmaps.
  Kim Tolbert, 16-Nov-2005.  Call xintanim_kill_pix from the catch block.


XKILL $SSW/gen/idl/widgets/xkill.pro
[Previous] [Next]
 Project     :	SDAC

 Name        :	XKILL

 Purpose     :	To kill a bunch of X widgets

 Explanation :	

 Use         :	XKILL,ID1,ID2,..............ID10
              
 Inputs      :	IDn = widget id (or name) to kill

 Opt. Inputs : None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	ALL = if set, then destroy all active widgets
               WAIT = wait specified seconds before killing
               NOCLEAN = do not kill related widget ID's

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_HANDLER_ID, IDL_RELEASE, XALIVE
	XGHOST
 CALLED BY:
	Automatic polarization determination with background subtraction
	BLINK_MAP, CDS_PLAN_BRIEF, CD_LOAD_CDROM, CFIT_BLOCK, CHAN_DEFINE, CHKARG
	CH_SYNTHETIC, DSP_AUX, Determine Drift Rate, EIS_CAT [1], EIS_CAT [2]
	EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], FREE_POINTER, FTP__DEFINE, GE_WINDOW_SIM, HESSI, HXRBS
	IMAGE_TOOL, IMAGE_TOOL_EVENT, IMAGE_TOOL_HLP, ITOOL_PICKFILE, MK_CDS_PLAN
	MK_PLAN_CUSTOM, MK_RASTER, MK_SOHO, MK_SOHO_CUSTOM, MK_SOHO_EDP, MK_STUDY
	OVSA_LTC_DEFINE, PLMONITOR, PROGMETER, RDWRT_BUFF, ROT_SUBIMAGE, SCANPATH
	SET_CURSOR_SHAPE, SHOW_SYNOP__DEFINE, SITE__DEFINE, ST_SUMER, ST_SUMER_WIN
	SYNOP_DEFINE, Tv_Zoom, UPDATE_CAMPAIGN, WINDMETER, XACK, XANSWER, XCALENDAR, XCAMP, XCAT
	XCDS_BOOK, XCHOICE, XCLONE_PLAN, XCPT, XCRON, XDOC, XGET_SYNOPTIC, XGET_UTC, XIAP, XINPUT
	XINTERANIMATE2, XLIST, XMESSAGE, XPOPUP, XPORT, XPROGRAM, XPROGRAM_ADD, XPS_SETUP
	XRECORDER, XREPORT, XREPORT_EDIT, XSEL_ITEM, XSEL_LIST [1], XSEL_LIST [2]
	XSET_COLOR, XSET_VALUE, XSHOW_RASTER, XSPECT, XSTRUCT, XSTUDY, XTEXT, XZOOM_PLAN
	ethz_XCHOICE, hsi_ui_img_doimage [1], hsi_ui_img_doimage [2]
	plotman_conf_panels, spex_image__define, xpickfile, xpickfile2
 Common      :	None.

 Restrictions:	Up to 10 specific widgets can be killed

 Side effects:	Specified widgets and their relations will be killed

 Category    :	Widgets

 Prev. Hist. :	None.

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 18 September 1993


XLIST $SSW/gen/idl/widgets/xlist.pro
[Previous] [Next]
 Project     :	SOHO/CDS

 Name        : XLIST

 Purpose     : lists structure tags in a list widget.

 Use         : XLIST,STRUCT.

 Inputs      : STRUCT

 Opt. Inputs : None.

 Outputs     : INDEX = selected index of structure array

 Keywords    : 
               wbase  = widget id of parent widget (input/output)
               wlist  = widget id of list widget into which to write (input/output)
               lfont   = list widget font 
               bfont   = button widget font 
               title  = title of parent base
               tags   = tags to list
               select = set to permit list selection
               remove = set to permit list deletion
               ysize  = ysize of list widget
               xsize  = xsize of list widget
 Explanation :

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CHILD_POINTER, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, FREE_POINTER, GET_CALLER
	GET_POINTER, HAVE_WIDGETS [1], HAVE_WIDGETS [2], MAKE_POINTER, MK_DFONT
	REP_TAG_VALUE, SELECT_WINDOWS, SET_POINTER, STRPAD, TRIM, WHERE_VECTOR, XALIVE
	XANSWER, XHIDE, XKILL, XLIST_BUTTONS, XLIST_EVENT, XLIST_VIEW, XMANAGER
	XMANAGER_RESET, XMENU [1], XMENU [2], XREALIZE, XSHOW, XSTRUCT, delvarx [5]
 CALLED BY:
	MK_CDS_PLAN, MK_SOHO, XCAMP, XCDS_BOOK, XCPT, XSTUDY
 Common      : None.

 Restrictions: None.

 Side effects: None.

 Category    : Widgets

 Prev. Hist. : None.

 Written     :	Zarro (ARC/GSFC) 12 October 1994

 Version     : 1


XLOAD $SSW/gen/idl/widgets/xload.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	XLOAD
 Purpose     : 
	Widget control of color tables, with SERTS enhancements.
 Explanation : 
	Provides a graphical interface to allow the user to load one of the
	standard color tables, or the special SERTS velocity color table, and
	to interactively adjust these color tables in various ways.  The user
	can also split the color tables into two parts: an upper and a lower
	section, load different color tables into these two parts, and adjust
	them separately.
 Use         : 
	XLOAD
 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
       FILE    = If this keyword is set, the file by the given name is used
                 instead of the file colors1.tbl in the IDL directory.  This
                 allows multiple IDL users to have their own color
                 table file.
	GROUP	= The widget ID of the widget that calls XLOAD.  When this ID
		  is specified, a death of the caller results in a death of
		  XLOAD.
	SILENT	= Normally, no informational message is printed when a color
		  map is loaded.  If this keyword is present and zero, this
		  message is printed.
	TWO	= If set, then XLOAD goes directly to a split color display.

 Calls       : ***
	BSCALE, COMBINE_COLORS, COMBINE_VEL, FILEPATH, GAMMA_CT, INT_STRETCH, LOADCT, LOAD_VEL
	REVERSE, STRETCH, VEL_STRETCH, XDISPLAYFILE [1], XDISPLAYFILE [2], XLOAD_EVENT
	XLOAD_TWO, XLOAD_TWO_EVENT, XMANAGER, XREGISTERED
 CALLED BY:
	IMAGE_TOOL_EVENT, ITOOL_OVERLAYER, XTVSCALE, dsp_menu
 Common      : 
	Uses the standard IDL common block COLORS (as used by LOADCT, etc.), as
	well as COMBINE_COL from COMBINE_COLORS, and it's own XLOAD common
	block.
 Restrictions: 
	The graphics device must support widgets.

	In general, the SERTS image display routines use several non-standard
	system variables.  These system variables are defined in the procedure
	IMAGELIB.  It is suggested that the command IMAGELIB be placed in the
	user's IDL_STARTUP file.

	Some routines also require the SERTS graphics devices software,
	generally found in a parallel directory at the site where this software
	was obtained.  Those routines have their own special system variables.

 Side effects: 
	The variables in the COLORS and COMBINE_COL common blocks are modified.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, Oct 1992, from XLOADCT by Ali Bahrami and Mark
		Rivers.
	William Thompson, Nov 1992, added "Recenter Gamma Slider" option.
	William Thompson, Mar 1993, fixed bug with "Velocity Options" pull-down
		menu button in Motif.

  The original XLOADCT file contained the following statement:

	Copyright (c) 1991, Research Systems, Inc.  All rights reserved.
		Unauthorized reproduction prohibited.

 Written     : 
	William Thompson, GSFC, October 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 4 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 29 October 1993.
		Added keyword TWO.
	Version 3, William Thompson, GSFC, 31 May 1995
		Removed dependence on obsolete data file.
		Removed bug when R_CURR was not defined.
	Version 4, Liyun Wang, NASA/GSFC, September 19, 1997
               Added the FILE keyword

 Version     : 
	Version 4, September 19, 1997


XMAIL $SSW/gen/idl/widgets/xmail.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XMAIL

 Purpose     : widget mail interface

 Category    : OS, Widgets

 Explanation : prompts user for e-mail address

 Syntax      : IDL> xprint,file

 Inputs      : FILE = filename to print

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : STATUS = 0/1 if mail aborted/continued
               ARRAY = alternative string array to print

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FILE_OR_STRING, SEND_MAIL, XACK, XINPUT
	XTEXT
 CALLED BY:
	XCAMP, XREPORT, XREPORT_EDIT
 Common      : XMAIL - contains last address

 Restrictions: currently works best for UNIX

 Side effects: None

 History     : Version 1,  1-Sep-1995,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XMANAGER $SSW/gen/idl/widgets/ymanager.pro
[Previous] [Next]
 NAME:
	XMANAGER

 PURPOSE:
	Provide main event loop and management for widgets created using IDL.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	XMANAGER [, Name, ID]

 OPTIONAL INPUTS:
	NAME:	A string that contains the name of the routine that creates 
		the widget.
  
	ID:	The widget ID of the base of the new widget.

 KEYWORD PARAMETERS:
   BACKGROUND:
      -------------------------------------------------------------------
      | PLEASE NOTE: This keyword is OBSOLETE. It's functionality is    |
      | provided by the TIMER keyword to the WIDGET_CONTROL procedure.  |
      -------------------------------------------------------------------
		A string that contains the name of a background task procedure
		to be called when the event loop is idle.  The background task
		procedure has only one parameter.  The parameter is the widget
		ID of the top-level base widget associated with the background
		task.  The background task should be very short and quick in 
		execution.  Long, complicated routines will hinder the 
		smoothness of event processing.  See the "Simple Widget
		Examples" (available from the XDEMO examples menu or by
		entering WEXMASTER at the IDL prompt) for an example of a 
		background task widget.

      CLEANUP:	This keyword contains a string that is the name of the
		routine called when the widget dies.  If not specified,
		no routine is called.  The cleanup routine must accept one 
		parameter which is the widget id of the dying widget.

EVENT_HANDLER:	The name of the routine that is to be called when a
		widget event occurs in the widget being registered.  If this 
		keyword is not supplied, the Xmanager will try to process the
		event by calling the routine name with "_event" appended.  See
		below for a more detailed explanation.

 GROUP_LEADER:	The widget id of the group leader for the
		widget being processed.  When the leader dies either by the 
		users actions or some other routine, all widgets that have that
		leader will also die.

		For example, a widget that views a help file for a demo 
		widget would have that demo widget as it's leader.  When
		the help widget is registered, it sets the keyword 
		GROUP_LEADER to the widget id of the demo widget. If 
		the demo widget is destroyed, the help widget led by 
		the it would be killed by the XMANAGER.

     JUST_REG:	This keyword tells the manager to just register the widget
		but not to start doing the event processing.  This is useful
		when you want to register a group of related top level widgets
		before beginning processing.

	 MODAL:	When this keyword is set, the widget that is being registered
		traps all events and desensitizes all the other widgets.  It
		is useful when input from the user is necessary to continue.
		Once the modal widget dies, the others are resensitized and the
		normal event processing is restored.

 OUTPUTS:
	No explicit outputs.

 CALLED BY:
	ACRIM, ACRIMHELP, ACRIMHELP_EV, ACRIM_EV, ACRIM_OUT, ATV, BCS, BIGPICKFILE
	BREAK_FILE [2], CALCONLEV, CATWIDHELP_EV, CDSLOG, CDSNOTIFY, CDSPICKFILE, CDS_ENG_N1
	CDS_ENG_N1_VW, CDS_ENG_N4, CD_DELETE_FILES, CD_DISK_SPACE, CD_LOAD_CDROM
	CD_SEARCH_DBASE, CD_SORT_DBASE, CD_SUMER, CD_VIEW_DBASE, CENTER_NRH2, CHAN_DEFINE
	CHIANTI_DEM, CHIANTI_NE, CHIANTI_TE, CHOOSE_FL, CH_GET_FILE, CH_XMENU_SEL, CIndex
	CMTEST, CP [2], CPCURSOR, CPGET_R_T, CPHELP, CPHELP_EV [1], CPHELP_EV [2], CPMOVIE
	CPMOVIE_DO, CPMOVIE_EV, CPONE, CPONE_EV, CPSUNCEN, CPSUNCEN_EV, CPTVCOPY, CPZOOM
	CPZOOMIT, CPZOOM_EV, CP_CATHELP, CP_EVENT, CW_FILE_NAME, CW_HEADER, CW_LABELNRH
	CW_NRH_FILTER, CW_OPTPOS, CW_POS, CW_RD_STRING, CW_SCANSOURCE, CW_SELFIELD
	CW_XTD_NRHF, DBEDIT [1], DBEDIT [2], DBEDIT [3], DCD_FICPOINT, DLASCAN, DRAWBUTTON
	DRAWBUTTON_EV, DSPEXP, DSPWAV, DSP_AUX, DSP_CUBE, DSP_INFO, DSP_MOVIE, DSP_STRARR
	DSP_STRUCT, DSP_WAV, DTSELECT, DURLST_EV, EIS_CAT [1], EIS_CAT [2]
	EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], EIS_RASTER_BROWSER [1], EIT_CATRD [1]
	EIT_DISPLAY, EIT_PA, EIT_PA_ev, EIT_SUBFIELD, EIT_SUB_MAN_INPUT, FCS
	FIND_CDS_STUDIES, FLAREMETER, FLUX_NRH2, FREEZE_RAS_DUR, FSC_PSCONFIG__DEFINE
	FSC_SURFACE, FSC_WINDOW, GDSPSPEC, GETIMAGE, GET_PT, GE_WINDOW_SIM, GR_IMAGES, HESSI
	HESSI PARAMETER SELECTION TOOL [1], HESSI SOHDATA CLASS DEFINITION
	HESSI_NRH, HFLARE, HSI_CW_Profiles, HXISDURALST, HXISSELECT, HXISSEL_EV
	HXISSETLEVEL, HXISWIDGET, HXISWIDG_EV, HXRBS, IMAGE_REGISTER, ITOOL_PICKFILE
	LAUNCHER, LISTBCS, LOADDATA, LOCATE_FFCAL, MAKE_WIDG_EV [1], MAKE_WIDG_EV [2]
	MENUBCKGRD, MENUCALCFLUX1D, MENUCALCPOS2D, MENULISTPOS, MENUSHIFTRH1D
	MENUTRACEISOPH, MENUTRACEPOS, MENUTRACEPROF, MENUVERIF, MK_CDS_PLAN
	MK_PLAN_CUSTOM, MK_RASTER, MK_SOHO, MK_SOHO_CUSTOM, MK_SOHO_EDP, MK_STUDY
	MK_WAVECAL, MOVIE_MAKER, MVIPLAY, MVIPLAY3, Modify_Merge_list [1]
	Modify_Merge_list [2], NDSPSPEC, NRH, NRH1_ANIM, NRH1_XTEXT, NRH2_PROJECTION, NRHR
	NRHRCAL, NRH_ANIM, NRH_FILTER, NRH_INTGCOMP, NRH_VISU_2D, OBS_WIDGET, OPTIC_CIRC
	OVSA_EXPLORER formerly OVSA_PRESUB, OVSA_LTC_DEFINE, OVSA_PRESUB
	Optional title of the message window, PB_INVERTER, PICKCOLOR, PICKCOLORNAME
	PICKFILE, PICKFILES, PICKFILES2, PICKFITS, PICKFONT  use to be XFONT, PICK_LINE
	PLOT_HKLZ, PLOT_HT, POINTING3, POPUP_MSG, PQLPROFILE, PQLZOOM, PS_FORM [1]
	PS_FORM [2], PTEST, QLHELP, QL_MENU, QUICK_LOOK, RATIO_PLOTTER [1], RD_FICPOINT
	READCOL [3], RESPOND_WIDG, ROUTINE_NAME [1], ROUTINE_NAME [2], ROUTINE_NAME [3]
	ROUTINE_NAME [4], ROUTINE_NAME [5], ROUTINE_NAME [6], ROUTINE_NAME [7], RTMOVIE
	RTMVIPLAY [1], RTMVIPLAY [2], RTMVIPLAYPNG, SAVE_PROFILE, SCAN4FLARE, SCHEDULE, SDAC
	SDAC_CAT, SELECT_W [1], SELECT_W [2], SELECT_W [3], SELTIME, SEL_FICPOINT
	SEL_LINE_MENU, SETLEVEL_EV, SET_CURSOR_SHAPE, SHOWPROGRESS__DEFINE
	SHOW_SYNOP__DEFINE, SHOW_ZOOMED, SLIDE_IMAGEf, SMEI_CALC_MENU, SMEI_CHOOSE_SOP
	SNU, SOLAID, STARFIELD, STV, ST_SUMER, ST_SUMER_WIN, SUBFIELD_EV, SUMER_REFORMAT [2]
	SUMER_SEARCH, SUMER_TOOL, SUN_IMAGE, SYNOP_DEFINE, SetFitParm, TKI_PHOTO_BASE
	TRACE_SSWHERE [1], TVZOOM, TVZOOM2, TWIDGET, UVSP_CATWIDHELP [2], WACAL, WAMPHIT
	WANALYZE, WASK, WATCHER, WBDA [1], WBDA [2], WBSA [1], WBSA [2], WBSC [1], WBSC [2]
	WBSC_FIT_EV [1], WBSC_FIT_EV [2], WBSC_LTC_EV [1], WBSC_LTC_EV [2], WC2P, WCALCL
	WCALCNEW, WCURRENT, WDIALOG_HISTORY, WDLA_ADJ, WDMEMORY [1], WDUMPREC, WD_NRH_ROUT
	WFLIMB, WFSURVEY, WGETGPS, WGETSATS, WHIST, WIC, WIDG_HELP, WIMG_INFO1, WIMG_INFO2
	WIMG_INFO3, WIMG_INFO4, WINFO_ACTIV, WINUP [5], WLINES, WLISTER, WLOAD, WLOADC
	WLOADINFO, WLOADINFO1, WLOKMAP, WOBSDATE, WPHZFIT, WPLOT, WPLOT1, WPLOT_NONOP
	WPLOT_SUBHTR [2], WPOINT, WPREFERENCES, WREBIN, WREGION, WRUNMOVIE [2], WRUNMOVIE4
	WRUNMOVIEM, WRUNMOVIEM3, WRUNMOVIEM_RT, WR_BEAM, WR_BEAM1, WSAVE_PS [2], WSIZE
	WSTATUS_HISTORY, WSUNPROFILE, WTESTPLOT, WTIME_HEIGHT, WTPCAL, WUPTIME, W_HISTOGRAM
	XACK, XANSWER, XCAL [1], XCAL [2], XCAMP, XCAT, XCDS_ANALYSIS, XCDS_COSMIC
	XCDS_SNAPSHOT, XCFIT, XCFIT_BLOCK, XCHOICE, XCLONE_PLAN, XCME_MES, XCOLORS [1]
	XCOLORS [2], XCOLORS [4], XCONTROL [1], XCONTROL [2], XCPT, XCRON, XCROP_CUBE
	XCR_REMOVE, XDETECTOR [1], XDISPSTR, XDL [1], XDL [2], XEDITFRAME, XFILES [1]
	XFILES [2], XGAMMA, XGAUSSFIT, XGET_SYNOPTIC, XGET_UTC, XIAP, XIMOVIE [1], XIMOVIE [2]
	XIMOVIE [4], XINPUT, XINTERANIMATE2, XLIST, XLOAD, XLOADCT [1], XLOADCT [2]
	XLOADCT [3], XMANAGER_RESET, XMAP [1], XMAP [2], XMENU_GEN_BUT [1]
	XMENU_GEN_BUT [2], XMENU_GEN_B_EV [1], XMENU_GEN_B_EV [2], XMENU_GEN_INPUT [1]
	XMENU_GEN_INPUT [2], XMENU_GEN_I_EV [1], XMENU_GEN_I_EV [2], XMENU_SEL [1]
	XMENU_SEL [2], XMESSAGE, XMKFITS [1], XMKFITS [2], XMOMENT [1], XMOMENT [2]
	XPLOTSCALE, XPLOT_HT, XPL_STRUCT, XPOPUP, XPORT, XPROGRAM, XPROGRAM_ADD, XPS_SETUP
	XRASTER [1], XRASTER [2], XRECORDER, XREPORT, XREPORT_EDIT, XSELECT, XSELECT_EIT
	XSELECT_SUMER, XSEL_ITEM, XSEL_LIST [1], XSEL_LIST [2], XSET_COLOR, XSET_VALUE
	XSHOW_RASTER, XSPECT, XSTARTHT, XSTRUCT, XSTUDY, XTEXTEDIT, XTKI, XTV, XTVSCALE, XVAREDT
	XZOOM, XZOOM_PLAN, YO_TAPE_WIDG [2], YO_TAPE_WIDG [4], ZIMAGE, ZOOMPRNT
	acknowledge [1], acknowledge [2], acknowledge [3], ch_ss, cp [1], cp_catwidget
	display_jpg, dsp_menu, eis_acronym_input_gui, eis_aec_event_gui [1]
	eis_aec_event_gui [2], eis_aec_widgets [1], eis_aec_widgets [2]
	eis_cpt_gui [1], eis_cpt_gui [2], eis_ct_summary_gui [1]
	eis_ct_summary_gui [2], eis_db_save_gui [1], eis_db_save_gui [2]
	eis_event_gui [1], eis_event_gui [2], eis_event_ll_gui [1]
	eis_event_ll_gui [2], eis_export_gui [1], eis_export_gui [2]
	eis_exposure_times_gui [1], eis_exposure_times_gui [2], eis_flare_gui [1]
	eis_flare_gui [2], eis_import_acronym_gui, eis_import_study_gui
	eis_import_title_gui, eis_jar_gui [1], eis_jar_gui [2]
	eis_line_name_custom_gui [1], eis_line_name_custom_gui [2]
	eis_line_name_gui [1], eis_line_name_gui [2], eis_linelist_gui [1]
	eis_linelist_gui [2], eis_lines_gui [1], eis_lines_gui [2]
	eis_mk_plan_gui [1], eis_mk_plan_gui [2], eis_mk_raster_gui__define [1]
	eis_mk_raster_gui__define [2], eis_mk_study_gui [1], eis_mk_study_gui [2]
	eis_plot_spectrum [1], eis_plot_spectrum [2], eis_raster_browser [2]
	eis_raster_details_gui [1], eis_raster_details_gui [2], eis_raster_gui [1]
	eis_raster_gui [2], eis_raster_index_gui [1], eis_raster_index_gui [2]
	eis_repoint_xy_gui [1], eis_repoint_xy_gui [2], eis_response_study_gui [1]
	eis_response_study_gui [2], eis_sci_obj_gui, eis_status_fits_reader1
	eis_study_gui [1], eis_study_gui [2], eis_timeline_plot_gui [1]
	eis_timeline_plot_gui [2], eis_title_input_gui, eis_xrt_flare_gui [1]
	eis_xrt_flare_gui [2], eis_xy_flare_pos_gui [1], eis_xy_flare_pos_gui [2]
	eis_xy_min_limit_gui [1], eis_xy_min_limit_gui [2], eis_xy_threshold_gui [1]
	eis_xy_threshold_gui [2], ethz_XCHOICE, favviewer, get_slider, hrts_w [1]
	hrts_w [2], hsi_as_proc, hsi_as_proc_rate, hsi_as_ptedit, hsi_as_wascii
	hsi_clean_options, hsi_coll_widget, hsi_corr_widget, hsi_energy_widget
	hsi_forwardfit_options, hsi_imagemisc_widget, hsi_imagesize_widget
	hsi_memsato_options, hsi_memvis_options, hsi_pix_options, hsi_range_widget
	hsi_show_flags [2], hsi_spectrum_filewrite_widget, hsi_time_widget
	hsi_ui_colloptions, hsi_ui_flarecat, hsi_ui_img, hsi_ui_lc, hsi_ui_mon, hsi_ui_obs
	hsi_ui_ql, hsi_ui_qlimage, hsi_ui_spec, imspec [10], imspec [11], imspec [12]
	imspec [13], imspec [14], imspec [15], imspec [16], imspec [17], imspec [18]
	imspec [19], imspec [1], imspec [20], imspec [21], imspec [22], imspec [23]
	imspec [24], imspec [25], imspec [26], imspec [27], imspec [28], imspec [29]
	imspec [2], imspec [30], imspec [31], imspec [32], imspec [33], imspec [34]
	imspec [35], imspec [36], imspec [3], imspec [4], imspec [5], imspec [6], imspec [7]
	imspec [8], imspec [9], lwa_te_intact, makemovie, mk_gset, mk_key, mpeg_wid
	oneline [1], oneline [2], oneline_event [1], oneline_event [2], opsys_lgcl [1]
	opsys_lgcl [2], option_changer [1], option_changer [2], option_toggle [1]
	option_toggle [2], out_spectra_4_designer, plot_fov [1], plotman_conf_panels
	plotman_imageoptions, plotman_widget, polariz_display, popup_help [1]
	popup_help [2], popup_menu, pro xtyoshidactparamnoxnox, psk_correlate, qBar
	qEphem, qFramestamp, qGlitch, qImage, qLine, qLoadCT, qNagoya, qSave2File, qSet_Page
	qShow, qSlider, qTool, qView, qsmei_sky, qvox, qvu, ratio_plotter [2], sda_look [1]
	select_widg, set_field, show_pix [1], show_pix [2], spex_evnt [1], spex_evnt [2]
	sswhere, tot_int_w, trace_sswhere [2], trace_sswhere [3], trace_sswhere [4]
	user_time, uvsp, uvsp_catwidhelp [1], verify_gui, vmain, w_las_exp_norm, w_mk_stdim
	w_poly_diffim, w_stdim_list, wdefroi [3], wdefroi [4], wfilpck, winup [1], winup [2]
	winup [3], winup [4], wmkkey [1], wmkkey [2], wprint, wsave, wsave1, wsave2, xanal_emi
	xcheckip, xdate [1], xdate [2], xdisp_fits, xdisp_sci5k, xdisp_tfr, xdisp_trace [1]
	xdisp_trace2, xdisp_trace3, xdroplist, xedit_table, xgen_widget, xhkplot, xpickfile
	xpickfile2, xread_hist, xsearch_obs, xsel_list_multi, xset_chain [1]
	xset_chain [2], xspr [1], xspr [2], xstepper [1], xstepper [2], xstepper_event
	xsw2tree, xsw2tree_event, xswlist [2], xtyoshidact, xwhisker [1], xwhisker [2]
	xwrite_hist, yo_tape_widg [1], yo_tape_widg [3], zmovie
 COMMON BLOCKS:
	MANAGED:  Common block used for widget maintenance.  This common block
		is internal and should not be referenced outside the IDL
		supplied routines.  It is subject to change without notice.
	XMAN_BCK_OBSOLETE: Used to keep track of BACKGROUND keyword message.
	

 SIDE EFFECTS:
	XMANAGER takes control of event processing and locks out the IDL 
	prompt until all widgets have been destroyed.

 RESTRICTIONS:
	Widgets being registered with the Xmanager must provide at least two 
	routines.  The first routine creates the widget and registers it with
	the manager and the second routine processes the events that occur 
	within that widget.  Optionally, a third routine can is used for the
	processing of background tasks while awaiting input.  An example 
	widget is suplied below that uses only two routines.  For more 
	information on using the background tasks, see the XEXAMPLE routine
	that is found in this same library.  It demonstrates background 
	routines.  Also, the "Simple Widget Examples", that can be viewed by
	entering WEXMASTER at the IDL prompt, demonstrate many aspects of
	widget programming. 

   !!!!! WARNING !!!!!!!!! WARNING !!!!!!!!! WARNING !!!!!!!!! WARNING !!!!!

	Although this is a library routine, it may change in the future in
	its internal implementation.  For future upgradability, it is best
	not to modify or even worry about what this routine does internally.

 EXAMPLE USE:
	To create a widget named Example that is just a base widget with a done
	button using the XMANAGER you would do the following:


	;------ first - the event handler routine ------;

     PRO example_event, ev			;this is the routine that 
						;deals with the events in the 
						;example widget.
	
	WIDGET_CONTROL, ev.id, GET_UVALUE = uv	;the uservalue is retrieved 
						;from the widget where the 
						;event occured

	if(uv eq 'DONE') then $			;if the event occured in the
	  WIDGET_CONTROL, ev.top, /DESTROY	;done button then kill the 
     END					;widget example


	;------ second - the main routine ------;

     PRO example				;this is the main routine
						;that builds the widget and
						;registers it with the Xmanager
	
	base = WIDGET_BASE(TITLE = 'Example')	;first the base is created
	
	done = WIDGET_BUTTON(base, $		;next the done button is 
			     TITLE = 'DONE', $	;created and it's user value
			     UVALUE = 'DONE')	;set to "DONE"

	WIDGET_CONTROL, base, /REALIZE		;the widget is realized

	XManager, 'example', base		;finally the example widget
						;is registered with the 
						;Xmanager
     END

	notes:	First the event handler routine is listed.  The handler
		routine has the same name as the main routine with the 
		characters "_event" added.  If you would like to use another
		event handler name, you would need to pass it's name in as
		a string to the EVENT_HANDLER keyword.  Also notice that the
		event routine is listed before the main routine.  This is 
		because the compiler will not compile the event routine if
		it was below the main routine.  This is only needed if both
		routines reside in the same file and the file name is the same
		as the main routine name with the ".pro" extension added.


 PROCEDURE:
	When the first widget is registered, initialize the lists and then 
	start processing events.  Continue registering widgets and dispatching
	events until all the widgets have been destroyed.  When a widget is 
	killed, destroy all widgets that list the destroyed widget as their 
	leader, if any.

 RELATED FUNCTIONS AND PROCEDURES:
	XREGISTERED, XMANAGERTOOL, XBACKREGISTER

 MODIFICATION HISTORY: Written by Steve Richards, November, 1990
	SMR, Mar,  1991	Added a cleanup routine keyword to allow dying
			widgets to clean themselves up when dying.
	SMR, May,  1991 Fixed a bug found by Diane Parchomchuk where 
			an error occured when registering a widget 
			right after destroying another.
	SMR & ACY, July, 1991
			Fixed a bug found by Debra Wolkovitch where
			lone widgets being destroyed and new ones 
			created caused problems.
	SMR, Sept, 1991	Changed cleanup to use the new WIDGET_INFO
			routine.
	SMR & ACY, Oct,  1991
			Fixed a bug where a background event that 
			unregistered itself after a time would result
			in an XMANAGER error.
 	SMR, Mar.  1992	Changed XMANAGER to use enhanced widget functions for
			event processing.
	SMR, Nov.  1992 Changed modal widget handling allowing nesting of
			modal widgets.  The first modal desensitizes all 
			current widgets and subsequent modals only desensitize
			the modal that called them.
	JIY, Apr.  1993 Changed modal widget handling process to not run
			the event loop for nested modal widgets.
			Allowed for multiple modal widgets.
	AB & SMR, 17 November 1993
			Added ID validity checking to desensitizing of modal
			widgets to fix a bug where already dead widgets
			were being accessed.
	DJE, Feb, 1995
			Made it so that non-modal widgets created from a modal
			widget have events processed in the modal widget's
			event loop. This fixes a bug where xmanager wouldn't
			return immediately if there was a modal widget somewhere
			in the nesting, even though a non-modal widget was being
			added. The nesting level could get _very_ deep.
	DJE, Apr 1995
			Pass a local variable to WIDGET_EVENT in the MODAL
			case, instead of passing the common block variable
			outermodal. This avoids a bug where outermodal gets
			changed behind WIDGET_EVENT's back.
       SVHH, UiO, 26 May 1997
                       Added /IMMUNE keyword.


XMANAGER_COM $SSW/gen/idl/widgets/xmanager_com.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XMANAGER_COM
               
 Purpose     : return widget ID's and application names from
               XMANAGER common block
               
 Category    : widgets
               
 Explanation : useful to check what the heck XMANAGER is doing when
               an application crashes. Actually, a shell around two
               lower-level versions that work differently between
               pre- and post-IDL version 3.6.
               
 Syntax      : IDL> XMANAGER_COM,IDS,NAMES
    
 CALLED BY:
	GET_HANDLER_ID, GET_HANDLER_NAME, XVALID, widget_kill
 Examples    : 

 Inputs      : None.
               
 Opt. Inputs : None
               
 Outputs     : IDS = long array of widget IDS
               NAMES = companion string array of associated application names
               NUMMANAGED = number of widgets being managed
               STATUS = 1 if valid entries found in XMANAGER common

 Opt. Outputs: None.
               
 Keywords    : None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], RECOMPILE
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 History     : Version 1,  17-July-1996,  D M Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XMANAGER_COM_NEW $SSW/gen/idl/widgets/xmanager_com_new.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XMANAGER_COM_NEW
               
 Purpose     : return widget ID's and application names from
               XMANAGER common block
               
 Category    : widgets
               
 Explanation : useful to check what the heck XMANAGER is doing when
               an application crashes. Used for post IDL version 3.6.
               The XMANAGER common block MANAGED can be referenced
               by name in this case.
               
 Syntax      : IDL> XMANAGER_COM_NAME,IDS,NAMES
    
 Examples    : 

 Inputs      : None.
               
 Opt. Inputs : None
               
 Outputs     : WIDS = long array of widget IDS
               WNAMES = companion string array of associated application names
               WNUMMANAGED = number of widgets being managed

 Opt. Outputs: None.
               
 Keywords    : None.

 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 History     : Version 1,  17-July-1996,  D M Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XMANAGER_COM_OLD $SSW/gen/idl/widgets/xmanager_com_old.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XMANAGER_COM_OLD
               
 Purpose     : return widget ID's and application names from
               XMANAGER common block
               
 Category    : widgets
               
 Explanation : useful to check what the heck XMANAGER is doing when
               an application crashes. Used for IDL version le 3.6.
               The XMANAGER common block MANAGED has to be hardwired
               in this case.
               
 Syntax      : IDL> XMANAGER_COM_OLD,IDS,NAMES
    
 Examples    : 

 Inputs      : None.
               
 Opt. Inputs : None
               
 Outputs     : WIDS = long array of widget IDS
               WNAMES = companion string array of associated application names
               WNUMMANAGED = number of widgets being managed

 Opt. Outputs: None.
               
 Keywords    : None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 History     : Version 1,  17-July-1996,  D M Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XMANAGER_RESET $SSW/gen/idl/widgets/xmanager_reset.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XMANAGER_RESET
               
 Purpose     : Reset XMANAGER after a widget application crashes
               
 Category    : widgets
               
 Explanation : Useful to restart XMANAGER after a widget application
               crashes and restarting the application fails.
               Call this immediately after the first XMANAGER call
               
 Syntax      : IDL> xmanager_reset
    
 CALLED BY:
	IMAGE_TOOL, MK_CDS_PLAN, MK_STUDY, SCANPATH, XACK, XANSWER, XCALENDAR, XCAMP, XCAT
	XCHOICE, XCLONE_PLAN, XCPT, XIAP, XLIST, XPORT, XPROGRAM, XSEL_LIST [1], XSEL_LIST [2]
	XSTRUCT, XSTUDY, XTEXT, XZOOM_PLAN, ethz_XCHOICE
 Examples    : 

 Inputs      : None.
               
 Opt. Inputs : None.
               
 Outputs     : None.

 Opt. Outputs: None.
               
 Keywords    : GROUP = widget group leader
               MODAL = if widget was called with MODAL
               JUST_REG = if widget is just being registered
               CRASH = name of procedure to recover from in case of crash
               RETALL = set to not RETALL after a crash

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DPRINT, GET_CALLER, GET_HANDLER_NAME, TRIM, XALIVE, XMANAGER, XSHOW
	break_file [4]
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 History     : Version 1,  17-May-1997,  D M Zarro -  Written
             : Version 2,  22-Sept-1998,  D M Zarro - Added version 5 checks

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XMATRIX $SSW/gen/idl/widgets/xmatrix.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XMATRIX

 Purpose     : Widget display of fields within an arbitrary structure

 Use         : xmatrix,struct,wbase

 Inputs      :
               STRUCT = input structure
               WBASE = parent widget base into which place matrix

 Opt. Inputs : None.

 Outputs     : None.

 Opt. Outputs: None.

 Keywords    :
               NX = # of columns by which to arrange widgets (def=2)
               WTAGS = text widget id's for each tag
               TITLE = optional widget title
               EDITABLE = make fields editable
               ALL      = generate events without return key
               XSIZE = optional width for text widgets
               LFONT = font for tag labels
               TFONT = font for tag fields
 CALLED BY:
	GE_WINDOW_SIM, Modify_Merge_list [1], Modify_Merge_list [2], XSTRUCT
 Procedure   :
               Arranges structures in a matrix format with the tag
               name in label widget and the tag value in a text widget.
               If wbase and wtags exist, then widget is just updated
               with input field values. This procedure is called by XSTRUCT

 Calls       : ***
	ARR2STR [1], Arr2Str [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST
	GET_DFONT [1], GET_DFONT [2], GET_POINTER, VALID_POINTER, XALIVE, XSTRUCT
	XSTRUCT_BUTTONS
 Common      : None.

 Restrictions:
               Input must be a structure.
               WBASE must be a valid parent base

 Side effects: None.

 Category    : Widgets

 Prev. Hist. : None.

 Written     : Zarro (ARC/GSFC) 20 August 1994

 Modified    :
       Version 2, Liyun Wang, GSFC/ARC, October 12, 1994
          Made the WIDGET_LABEL right justified by using the 'fixed' font
       Version 3, Zarro, (GSFC/ARC) 8 March, 1994
          Added nested structure display
       Version 4, Zarro, (GSFC/SM&A) 22 April 1999
          Added pointer capability
       Version 5, mimster@stars.gsfc.nasa.gov, (GSFC) 21 October 2002
          Added capability to separate string array data members with '||' and modify.
       Version 6, Sandhia Bansal, Alphabetized the list of parameter tags.
       14-Dec-2004, Kim Tolbert - fixed problem where byte data didn't show up in matrix
 VERSION:
       Version 6


XMEDSKY $SSW/gen/idl_libs/astron/image/xmedsky.pro
[Previous] [Next]
 NAME:
       XMEDSKY

 PURPOSE:
       Subtract sky from an image as a 1-D function of X
 EXPLANATION:
       This procedure is designed to remove the sky from slitless spectra.
       The sky is assumed to vary with wavelength (along a row) but not with
       position (along a column).    The sky is computed as the 
       column-by-column median of pixels within 3 sigma of the image global 
       median.   This procedure is called by the cosmic ray rejection routine
       CR_REJECT

 CALLING SEQUENCE:
       XMEDSKY, Image, Bkg, [ CLIP=[x0, x1, y0, y1], NSIG= ]

 INPUTS:
       Image:  Input image for which sky vector is to be computed.
       
 INPUT KEYWORD PARAMETERS:
       CLIP:   [x0, x1, y0, y1]: region of image to be used for all
               statistical computations.    Default is to use the entire
               image.   For STIS 1024 x 512 slitless spectra, the suggested
               value is CLIP = [32,1023,12,499]
       NSIG:   Positive scalar giving the number of sigma a pixel must be above
               the global median to be reject.   Default is 3 sigma.
 OUTPUT PARAMETER:
       Bkg:    Vector of sky values.
;
 CALLS: ***
	STDDEV
 CALLED BY:
	EXTRAP, SKYADJ_CUBE
 MODIFICATION HISTORY:
       Written by:     R. S. Hill, Hughes STX, 20 Oct. 1997
       Converted to V5.0, use STDDEV()   W. Landsman   June 1998
       Check for valid WHERE, added NSIG keyword  W. Landsman   December 2000 
       Assume since V5.1 so always use STDDEV  W. Landsman Feb 2004   


XMENU [1] $SSW/gen/idl/widgets/xmenu.pro
[Previous] [Next]
 NAME:
	XMENU

 PURPOSE:
	This procedure simplifies setting up widget menus. XMENU accepts a 
	string array of menu labels, creates a widget base, and populates
	the base with buttons containing the specified labels.

 CALLING SEQUENCE:
	XMENU, Values [, Parent]

 INPUTS:
	Values:	An array of labels for the butons (menu items).  
		If VALUES is a string array, then it is a 1-D array of labels.
		If it a byte array, it is a 3-D array of bitmaps, where
		the 1st 2 dimensions are the width and height of each
		bitmap.

	Parent:	The widget ID of parent base widget.  If this argument is
		omitted, the menu base is a top-level base.

 KEYWORDS:
	BASE:	A named variable to recieve the widget ID of the created base.

      BUTTONS:	A named variable to recieve the widget ID of the created
		buttons. This return value is a longword array, with each
		element matching the corresponding element in Values.

	COLUMN: This keyword specifies that the buttons should be layed out 
		in columns. The value specified gives the number of columns
		desired.

    EXCLUSIVE:	Set this keyword to make each menu selection an exclusive
		button.  Exclusive buttons have both selected and unselected 
		states and only one button at a time can be selected.

	FONT:	A string containing the name of the font for the button labels.

	FRAME:	If this keyword is specified, it represents the thickness (in
		pixels) of the frame drawn around the base.  The default is
		no frame.

 NONEXCLUSIVE:	Set this keyword to make each menu selection a non-exclusive
		button.  Non-exclusive buttons have both selected and 
		un-selected states.  More that one button can be selected at
		one time.

   NO_RELEASE:	Set this keyword to prevent the buttons from returning release
		events.  Normally, buttons return both selection and release
		events.

	ROW:	This keyword specifies that the buttons should be layed out 
		in rows.  The value specified gives the number of rows desired.

	SCROLL:	Set this keyword to give the base scrollbars to allow a large 
		number of buttons to be viewed in a small region.

	SPACE:	The space, in pixels, to be left around the edges of the base.

	TITLE:	If PARENT is not specified, TITLE specifies the MENU title.
		If PARENT is specified, a framed base is created and a
		label with the value TITLE is added before the menu. 

	XPAD:	The horizontal space, in pixels, to be left between the 
		buttons.

	YPAD:	The vertical space, in pixels, to be left between the buttons.

	UVALUE:	An array of user values to be set into the UVALUE of the
		buttons. This array must have the same number of elements
		as VALUES.

X_SCROLL_SIZE:	The width of the scrolling viewport.  This keyword implies 
		SCROLL.

Y_SCROLL_SIZE:	The height of the scrolling viewport.  This keyword
		implies SCROLL.
	
 OUTPUTS:
	None.

 CALLED BY:
	BCS, CDSLOG, CH_XMENU_SEL, CPMOVIE, CPMOVIE_DO, CPMOVIE_EV, EIS_CAT [1], EIS_CAT [2]
	FCS, HXRBS, IMAGE_TOOL, MK_PLAN_CUSTOM, MK_RASTER, MK_SOHO_CUSTOM, MK_SOHO_EDP
	MK_STUDY, MK_WAVECAL, Multi_draw [1], Multi_draw [2], OBS_WIDGET, PICKFILES2
	PQLPROFILE, PTEST, SELECT_W [1], SELECT_W [2], SELECT_W [3], SET_CURSOR_SHAPE
	TP_PLOT_VDS, TRACE_SSWHERE [1], WBDA [1], WBDA [2], WBSA [1], WBSA [2], WBSC [1]
	WBSC [2], WOBJECT, XACK, XANSWER, XCAT, XCLONE_PLAN, XLIST, XMENU_GEN_BUT [1]
	XMENU_GEN_BUT [2], XMENU_GEN_B_EV [1], XMENU_GEN_B_EV [2], XMENU_GEN_INPUT [1]
	XMENU_GEN_INPUT [2], XMENU_GEN_I_EV [1], XMENU_GEN_I_EV [2], XMENU_SEL [1]
	XMENU_SEL [2], XREPORT, XSELECT, XSELECT_EIT, XSTUDY, XTEXT, favviewer, lcurve
	lwa_te_intact, oneline [1], oneline [2], plot_fov [1], save_data [1]
	save_data [2], show_pix [1], show_pix [2], sswhere, trace_sswhere [2]
	trace_sswhere [3], trace_sswhere [4], user_time, uvsp, wdefroi [3], wdefroi [4]
	wfilpck, xanal_emi, xcheckip, xdate [1], xdate [2], xdisp_fits, xdisp_sci5k, xdisp_tfr
	xdisp_trace [1], xdisp_trace2, xdisp_trace3, xgen_widget, xhkplot, xread_hist
	xsearch_obs, xset_chain [1], xset_chain [2], xsw2tree, xsw2tree_event, xswlist [1]
	xswlist [2], xwrite_hist
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A widget base containing buttons is created, but not realized.

 EXAMPLE:
	For an example of using XMENU to create menus see the "Non-Exclusive
	Menu" and "Exclusive Menu" examples in the "Simple Widget Examples".
	The simple widget examples menu can be seen by entering WEXMASTER at
	the IDL prompt.

 MODIFICATION HISTORY:
	16 January 1991, AB, RSI

	5 September 1991, SMR, RSI   Fixed bug where titles were ignored when
				     no base specified.

	21 January 1992, ACY, RSI    Added FONT keyword.


XMENU [2] $SSW/gen/idl/widgets/xmenu2.pro
[Previous] [Next]
 NAME:
	XMENU

 PURPOSE:
	This procedure simplifies setting up widget menus. XMENU accepts a 
	string array of menu labels, creates a widget base, and populates
	the base with buttons containing the specified labels.

 CALLING SEQUENCE:
	XMENU, Values [, Parent]

 INPUTS:
	Values:	An array of labels for the butons (menu items).  
		If VALUES is a string array, then it is a 1-D array of labels.
		If it a byte array, it is a 3-D array of bitmaps, where
		the 1st 2 dimensions are the width and height of each
		bitmap.

	Parent:	The widget ID of parent base widget.  If this argument is
		omitted, the menu base is a top-level base.

 KEYWORDS:
	BASE:	A named variable to recieve the widget ID of the created base.

      BUTTONS:	A named variable to recieve the widget ID of the created
		buttons. This return value is a longword array, with each
		element matching the corresponding element in Values.

	COLUMN: This keyword specifies that the buttons should be layed out 
		in columns. The value specified gives the number of columns
		desired.

    EXCLUSIVE:	Set this keyword to make each menu selection an exclusive
		button.  Exclusive buttons have both selected and unselected 
		states and only one button at a time can be selected.

	FONT:	A string containing the name of the font for the button labels.

	FRAME:	If this keyword is specified, it represents the thickness (in
		pixels) of the frame drawn around the base.  The default is
		no frame.

 NONEXCLUSIVE:	Set this keyword to make each menu selection a non-exclusive
		button.  Non-exclusive buttons have both selected and 
		un-selected states.  More that one button can be selected at
		one time.

   NO_RELEASE:	Set this keyword to prevent the buttons from returning release
		events.  Normally, buttons return both selection and release
		events.

	ROW:	This keyword specifies that the buttons should be layed out 
		in rows.  The value specified gives the number of rows desired.

	SCROLL:	Set this keyword to give the base scrollbars to allow a large 
		number of buttons to be viewed in a small region.

	SPACE:	The space, in pixels, to be left around the edges of the base.

	TITLE:	If PARENT is not specified, TITLE specifies the MENU title.
		If PARENT is specified, a framed base is created and a
		label with the value TITLE is added before the menu. 

	XPAD:	The horizontal space, in pixels, to be left between the 
		buttons.

	YPAD:	The vertical space, in pixels, to be left between the buttons.

	UVALUE:	An array of user values to be set into the UVALUE of the
		buttons. This array must have the same number of elements
		as VALUES.

X_SCROLL_SIZE:	The width of the scrolling viewport.  This keyword implies 
		SCROLL.

Y_SCROLL_SIZE:	The height of the scrolling viewport.  This keyword
		implies SCROLL.
	
 OUTPUTS:
	None.

 CALLS: ***
	XMENU2
 CALLED BY:
	BCS, CDSLOG, CH_XMENU_SEL, CPMOVIE, CPMOVIE_DO, CPMOVIE_EV, EIS_CAT [1], EIS_CAT [2]
	FCS, HXRBS, IMAGE_TOOL, MK_PLAN_CUSTOM, MK_RASTER, MK_SOHO_CUSTOM, MK_SOHO_EDP
	MK_STUDY, MK_WAVECAL, Multi_draw [1], Multi_draw [2], OBS_WIDGET, PICKFILES2
	PQLPROFILE, PTEST, SELECT_W [1], SELECT_W [2], SELECT_W [3], SET_CURSOR_SHAPE
	TP_PLOT_VDS, TRACE_SSWHERE [1], WBDA [1], WBDA [2], WBSA [1], WBSA [2], WBSC [1]
	WBSC [2], WOBJECT, XACK, XANSWER, XCAT, XCLONE_PLAN, XLIST, XMENU_GEN_BUT [1]
	XMENU_GEN_BUT [2], XMENU_GEN_B_EV [1], XMENU_GEN_B_EV [2], XMENU_GEN_INPUT [1]
	XMENU_GEN_INPUT [2], XMENU_GEN_I_EV [1], XMENU_GEN_I_EV [2], XMENU_SEL [1]
	XMENU_SEL [2], XREPORT, XSELECT, XSELECT_EIT, XSTUDY, XTEXT, favviewer, lcurve
	lwa_te_intact, oneline [1], oneline [2], plot_fov [1], save_data [1]
	save_data [2], show_pix [1], show_pix [2], sswhere, trace_sswhere [2]
	trace_sswhere [3], trace_sswhere [4], user_time, uvsp, wdefroi [3], wdefroi [4]
	wfilpck, xanal_emi, xcheckip, xdate [1], xdate [2], xdisp_fits, xdisp_sci5k, xdisp_tfr
	xdisp_trace [1], xdisp_trace2, xdisp_trace3, xgen_widget, xhkplot, xread_hist
	xsearch_obs, xset_chain [1], xset_chain [2], xsw2tree, xsw2tree_event, xswlist [1]
	xswlist [2], xwrite_hist
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A widget base containing buttons is created, but not realized.

 EXAMPLE:
	For an example of using XMENU to create menus see the "Non-Exclusive
	Menu" and "Exclusive Menu" examples in the "Simple Widget Examples".
	The simple widget examples menu can be seen by entering WEXMASTER at
	the IDL prompt.

 MODIFICATION HISTORY:
	16 January 1991, AB, RSI

	5 September 1991, SMR, RSI   Fixed bug where titles were ignored when
				     no base specified.

	21 January 1992, ACY, RSI    Added FONT keyword.
	7  July 1997, Zarro, GSFC    Passed FONT to TITLE and made FRAME optional
                                    (renamed to XMENU2)
       7 May 2000, Zarro (SM&A/GSFC) - added LFONT


XMENU_GEN_B_EV [1] $SSW/gen/idl/widgets/xmenu_gen_but.pro
[Previous] [Next]

 NAME: 
 	XMENU_GEN_B_EV

 PURPOSE:
       The event handler for XMENU_GEN_BUT


 CALLS: ***
	EVENT_NAME, GET_WVALUE, XMANAGER, XMENU [1], XMENU [2], XMENU_GEN_BUT [1]
	XMENU_GEN_BUT [2]
 CALLED BY:
	XMENU_GEN_BUT [1], XMENU_GEN_BUT [2]
 RESTRICTIONS:
	none

 HISTORY:
	Written 31-Jan-95 by M.Morrison 


XMENU_GEN_BUT [1] $SSW/gen/idl/widgets/xmenu_gen_but.pro
[Previous] [Next]

 NAME: 
	XMENU_GEN_BUT

 PURPOSE:
     	Allow user to pass an array of labels for buttons and allow user
	to click on them to select a single option/item

 CALLING SEQUENCE:
	result = xmenu_gen_but(array, group=group, tit=tit)
	result = xmenu_gen_but(['Continue', 'Abort'])

 INPUTS:
       ARRAY       A string or string array of values to be displayed for
		    selection
 CALLS: ***
	EVENT_NAME, GET_WVALUE, XMANAGER, XMENU [1], XMENU [2], XMENU_GEN_B_EV [1]
	XMENU_GEN_B_EV [2]
 CALLED BY:
	XMENU_GEN_B_EV [1], XMENU_GEN_B_EV [2], xhkplot, xyesno
 OPTIONAL KEYWORD INPUT:
	TIT	    The title of the widget
	GROUP	    The parent widget id (so that if the parent widget exits,
		    this widget is destroyed too)
	LOCATION    the location of the upper left corner relative to the
		    upper left corner of the screen
 RESTRICTIONS:
	Must have widgets available.

 HISTORY:
	Written 31-Jan-95 by M.Morrison 
	12-Jun-95 (MDM) - Added LOCATION keyword


XMENU_GEN_I_EV [1] $SSW/gen/idl/widgets/xmenu_gen_input.pro
[Previous] [Next]

 NAME: 
 	XMENU_GEN_I_EV

 PURPOSE:
       The event handler for XMENU_GEN_INPUT


 CALLS: ***
	EVENT_NAME, GET_WVALUE, XMANAGER, XMENU [1], XMENU [2], XMENU_GEN_INPUT [1]
	XMENU_GEN_INPUT [2]
 CALLED BY:
	XMENU_GEN_INPUT [1], XMENU_GEN_INPUT [2]
 RESTRICTIONS:
	none

 HISTORY:
	Written 30-Jan-95 by M.Morrison 


XMENU_GEN_INPUT [1] $SSW/gen/idl/widgets/xmenu_gen_input.pro
[Previous] [Next]

 NAME: 
	XMENU_GEN_INPUT

 PURPOSE:
     	Allow user to pass an array of labels and to allow users to 
	modify 1 to 5 fields

 CALLING SEQUENCE:
	xmenu_gen_input, array, out1, out2, out3, nchar=nchar, group=group, tit=tit
	xmenu_gen_input, mnem, ymin, ymax, labels=['YMIN: ','YMAX: ']

 INPUTS:
       ARRAY       A string or string array of values to be displayed for
		    selection
 CALLS: ***
	EVENT_NAME, GET_WVALUE, XMANAGER, XMENU [1], XMENU [2], XMENU_GEN_I_EV [1]
	XMENU_GEN_I_EV [2]
 CALLED BY:
	XMENU_GEN_I_EV [1], XMENU_GEN_I_EV [2], xdisp_fits, xdisp_trace [1]
	xdisp_trace2, xdisp_trace3, xhkplot, xread_hist
 OPTIONAL KEYWORD INPUT:
	TIT	    The title of the widget
	GROUP	    The parent widget id (so that if the parent widget exits,
		    this widget is destroyed too)

 INPUT/OUTPUT:
	out1	    The default input and the output for what the user entered
	out2	    The default input and the output for what the user entered
	out3	    The default input and the output for what the user entered

 RESTRICTIONS:
	Must have widgets available.

 HISTORY:
	Written 30-Jan-95 by M.Morrison 


XMENU_SEL [1] $SSW/gen/idl/widgets/xmenu_sel.pro
[Previous] [Next]

 NAME: 
	XMENU_SEL

 PURPOSE:
     	Allow user to select a set of items from a list.  Widget equivalent
	of WMENU_SEL

 CALLING SEQUENCE:
       ss = xmenu_sel(array)
       ss = xmenu_sel(array, /one)
       ss = xmenu_sel(array, /fixed) - use fixed font (keep column alignement)

 INPUTS:
       ARRAY       A string or string array of values to be displayed for
		    selection
 CALLS: ***
	EVENT_NAME, GET_WVALUE, XMANAGER, XMENU [1], XMENU [2], XMENU_SEL_EV, XMENU_SEL_LAB
	tbeep [1], tbeep [2], tbeep [3]
 CALLED BY:
	focus_trace_flt, full_graph_gif, get_hk_mnem, jitter_gif_xyimg, rd_dt_genx
	set_sci160k_dir, tr_scan_images, tr_switch_dirs, trace_uniq_movies, xcheckip
	xdisp_fits, xdisp_trace [1], xdisp_trace [2], xdisp_trace2, xdisp_trace3, xhkplot
	xrd_trace
 OPTIONAL KEYWORD INPUT:
	ONE	    If set then only one button may be turned on at a time.
	TIT	    The title of the widget
	GROUP	    The parent widget id (so that if the parent widget exits,
		    this widget is destroyed too)
       FIXED_FONT  If set, use fixed font (keep columns aligned)
       SIZE_FONT   Size of (fixed) font to use - default=15 (implies /FIXED)
       NLINES      How many lines to display.  Default is 20

 OUTPUTS:
	The result returns the select indices of the array ARRAY.

 ROUTINES CALLED:
       wmenu_sel
       get_xfont

 RESTRICTIONS:
	Must have widgets available.

 HISTORY:
	Written 30-Jan-95 by M.Morrison using Elaine Einfalt
	YO_TAPE_WIDG as a starting point
	10-Jul-96 (MDM) - Ajustment to make the output scaler if it
			  is a single item
       11-nov-96 (SLF) - add FIXED_FONT and SIZE_FONT keywords
	15-Apr-97 (MDM) - Re-added the 9-Jan-97 (MDM) modification
			  to merge with 11-Nov-96 version
			      9-Jan-97 (MDM) - Added NLINES option
	22-Jul-97 (MDM) - Added call to WMENU_SEL if the device is
			  not X (so that terminal prompting is
			  enabled.


XMESSAGE $SSW/gen/idl/widgets/xmessage.pro
[Previous] [Next]
 PROJECT:
       SOHO

 NAME:
       XMESSAGE

 PURPOSE:
       Make a pop-up widget window to display a brief message

 CATEGORY:
       Utility, widget

 EXPLANATION:

 SYNTAX:
       xmessage, msg

 INPUTS:
       MSG - A string array or scalar containing the message

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       WBASE       - A named variable containing base ID of the pop-up widget
       TITLE       - A string scalar variable; title of the pop-up widget
       REGISTER    - Set this keyword to get the pop-up widget
                     registered with XMANAGER. If this keyword is not
                     set, XMANAGER is NOT called, and it's caller's
                     responsibility to remove the pop-up widget
       GROUP       - group leader of text widget parent; meaningful
                     only when REGISTER keyword is set
       FONT        - font for text widget
       XOFF,YOFF   - pixel offset relative to caller
       WAIT        - secs to wait before killing widget
       XSIZE,YSIZE - X-Y sizes for text widget
       SPACE       - number of lines to space text
       APPEND      - append to existing text

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DETABIFY [1], DETABIFY [2], DETABIFY [3]
	GET_CENT_OFF, GET_DFONT [1], GET_DFONT [2], HAVE_WIDGETS [1], HAVE_WIDGETS [2]
	XALIVE, XKILL, XMANAGER, XMESSAGE_EVENT, XSHOW
 CALLED BY:
	Automatic polarization determination with background subtraction
	CD_LOAD_CDROM, Determine Drift Rate, EIT_CATRD [1], EIT_DISPLAY, EIT_MKMOVIE
	MK_SOHO, Move_Image, SPEX_DRM__DEFINE, SPEX_FIT__DEFINE, SPEX__DEFINE, Tv_Zoom
	XCDS_COSMIC, cw_ut_range, eis_mk_plan_gui [1], eis_mk_plan_gui [2], hsi_chk_obj
	hsi_cw_ut_range, hsi_spectrum_filewrite_widget, hsi_ui_img
	hsi_ui_img_doimage [1], hsi_ui_img_doimage [2], list_sp_files, plotman
	read_xsm_4_ospex, spex_image__define
 COMMON:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       The widget window is left on the screen unless it is killed by
       the caller or by killing the parent widget if REGISTER and
       GROUP keywords are set.  

 HISTORY:
       Version 1, August 19, 1996, Liyun Wang, NASA/GSFC. Written

 CONTACT:
       Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)


XMLPARSER__DEFINE $SSW/gen/idl/xml/xmlparser__define.pro
[Previous] [Next]
 Project     : Virtual Solar Observatory                                                               
                                                                                                       
 Name        : XMLPARSER__DEFINE                                                                       
                                                                                                       
 Purpose     : To organize various XML parsing functions                                               
                                                                                                       
 Category    : Utility, VSO                                                                            
                                                                                                       
 Explanation : The XMLparser object handles the necessary procedures                                   
               to deal with xml input as a string (not file), and                                      
               organize some generic dom-walking functions                                             
                                                                                                       
 Syntax      : IDL> a = obj_new('xmlparser')                                                           
                                                                                                       
 CALLS: ***
	CLOSE_LUN, GET_TEMP_FILE, XMLPARSER::DOM, XMLPARSER::DOM2STRUCT
	XMLPARSER::FINDELEMENT, XMLPARSER::GETELEMENTVALUE, XMLPARSER::GETTEXT
	XMLPARSER::INIT, XMLPARSER::WALKTREE
 Examples    : IDL> a = obj_new('xmlparser')                                                           
               IDL> dom = xmlparser->dom(xmlstring)                                                    
               IDL> print, xmlparser->getText(dom)                                                     
                                                                                                       
 History     : Version 1,   08-Nov-2005, J A Hourcle. Released                                         
               Version 1.1, 18-Nov-2005, Hourcle.  fixed memory leaks                                  
               Version 1.2, 2-Dec-2005, Zarro, made FOR loop variables LONG
               Version 1.3, 27-Dec-2005, Hourcle.  more robust 'walktree'                                                                                                      
 Contact     : oneiros@grace.nascom.nasa.gov                                                           


XMOVIE [1] $SSW/gen/idl/image/xmovie.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	XMOVIE
 Purpose     : 
	Animates a series of images under widget control.
 Explanation : 
	BSCALE is used to scale the images, and XINTERANIMATE is called to
	animate them.
 Use         : 
	XMOVIE, IMAGES  [, RATE ]
 Inputs      : 
	IMAGES	= Three dimensional array of images, in the format
		  (X-dim,Y-dim,Frame).
 Opt. Inputs : 
	RATE	= Optional rate of display.  The rate is a value between 0 and
		  100 that gives the speed that the animation is displayed.
		  The fastest animation is with a value of 100 and the slowest
		  is with a value of 0.  The default value is 100 if not
		  specified.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	NOSCALE  = If set, then the images are not scaled.
	MISSING	 = Value flagging missing pixels.  These points are scaled to
		   zero.
	MAX	 = The maximum value to be considered in scaling the
		   images, as used by BYTSCL.  The default is the maximum value
		   of IMAGES.
	MIN	 = The minimum value of IMAGES to be considered in scaling the
		   image, as used by BYTSCL.  The default is the minimum value
		   of IMAGES.
	TOP	 = The maximum value of the scaled image array, as used by
		   BYTSCL.  The default is !D.N_COLORS-1.
	BOTTOM	 = The minimum value of the scaled image array, as used by
		   BYTSCL.  The default is 0.
	VELOCITY = If set, then the image is scaled using FORM_VEL as a
		   velocity image.  Can be used in conjunction with COMBINED
		   keyword.  Ignored if NOSCALE is set.
	COMBINED = Signals that the image is to be displayed in one of two
		   combined color tables.  Can be used by itself, or in
		   conjunction with the VELOCITY or LOWER keywords.
	LOWER	 = If set, then the image is placed in the lower part of the
		   color table, rather than the upper.  Used in conjunction
		   with COMBINED keyword.
	RESIZE	 = If set, then the image will be resized up or down by integer
		   factors to best fit within the display.  Unless RESIZE or
		   one of the other size related keywords are set, then the
		   image is displayed at its true pixel size.
	NOEXACT	 = If set, then non-integer factors are allowed.
	SIZE	 = If passed and positive, then used to determine the scale of
		   the image.  Returned as the value of the image scale.
	SMOOTH	 = If set, then the image is expanded with bilinear
		   interpolation.
	RELATIVE = Size of area to be used for displaying the image, relative
		   to the total size available.  Must be between 0 and 1.
		   Default is 1.  Ignored unless RESIZE or NOEXACT is set.
	TITLE	 = Widget title for movie display.
	SUBSCRIPTS = The subscripts of the images to display.  The default is
		   to display them all.
 Calls       : ***
	CONGRID [1], CONGRID [2], CONGRID [3], XINTERANIMATE
 CALLED BY:
	DSP_MOVIE, FF_DEMO, XBLINK, show_pix [1], show_pix [2], show_pix_event [1]
	show_pix_event [2], show_pix_event [3]
 Common      : 
	None.
 Restrictions: 
	In general, the SERTS image display routines use several non-standard
	system variables.  These system variables are defined in the procedure
	IMAGELIB.  It is suggested that the command IMAGELIB be placed in the
	user's IDL_STARTUP file.

	Some routines also require the SERTS graphics devices software,
	generally found in a parallel directory at the site where this software
	was obtained.  Those routines have their own special system variables.

 Side effects: 
	A temporary window is created to display the images as they are loaded.
	A widget controlled window is created to display the images.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, May 1992.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
	William Thompson, September 1992, use COMBINED keyword in place of
					  INTENSITY.
 Written     : 
	William Thompson, GSFC, May 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 4 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 6 July 1993.
		Fixed bug with RATE variable.
	Version 3, William Thompson, GSFC, 28 December 1993.
		Modified to call WDISPLAY and EXPTV to display images as they
		are being loaded.  Added keywords RESIZE, NOEXACT, SIZE,
		SMOOTH, RELATIVE.
	Version 4, William Thompson, GSFC, 20 May 1994
		Modified to add XALIGN=0 to EXPTV call, and to temporarily set
		!QUIET=1 during loading of additional images after the first.
	Version 5, William Thompson, GSFC, 8 June 1994
		Modified so that movie widget will have correct width even if
		Motif would otherwise force the window to be wider.
	Version 6, William Thompson, GSFC, 20 June 1995
		Added keywords TITLE and SUBSCRIPTS.
	Version 7, William Thompson, GSFC, 17 October 1996
		Fixed bug where missing pixels were not handled correctly.
	Version 8, William Thompson, GSFC, 12 August 1997
		Don't calculate MIN and MAX if /NOSCALE is set.
       Version 9, William Thompson, GSFC, 3-Jan-2006
               Added keyword BOTTOM
 Version     : 
	Version 9, 3-Jan-2006


xpickfile $SSW/gen/idl/widgets/xpickfile.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       xpickfile

 PURPOSE:
       Compound widget program for file selection

 CATEGORY:
       Utility, widget

 EXPLANATION:

 SYNTAX:
       xpickfile, parent, child

 EXAMPLE:
       xpickfile, parent, child, filter = '*.gif *.fits'

 INPUTS:
       PARENT - ID of the parent base widget on which the pickfile
                widget is built

 OUTPUTS:
       CHILD  - ID of the child widget (i.e, the application)

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       GET_PATH- Set to a named variable. Returns the path at the
                 time of selection.

       PATH    - The initial path to select files from.  If this keyword is
                 not set, the current directory is used.

       FILTER  - A string value for filtering the files in the file
                 list.  This keyword is used to reduce the number of
                 files to choose from. The user can modify the
                 filter. Example filter values might be "*.pro" or "*.dat".

       FONT    - Name of font to be used in the widget

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], CHKLOG [1], CHKLOG [2], FILE_BREAK, IS_DIR, IS_STRING
	LIST_DIR, LIST_FILE, MK_DFONT, TRIM, WIDGET_MBASE, XACK, XHOUR, XKILL, XMANAGER
	XPF_GETDIRS, XPF_GETFILES, XPICKFILE_EVENT, XREGISTERED, curdir [1], curdir [2]
 RESTRICTIONS:
       Does not recognize symbolic links to other files in UNIX.
       Multiple filter patterns are not recognized in VMS system

 HISTORY:
       Version 1, November 1, 1995, Liyun Wang, NASA/GSFC
          Modified from PICKFILE v 1.7 1994/05/02 19:25:51
       Version 2, February 23, 1996, Liyun Wang, NASA/GSFC
          Modified such that the side effect of current IDL working
             directory being changed via the PATH widget is removed
       Version 3, February 26, 1996, Liyun Wang, NASA/GSFC
          Directory for personal data is default to the one pointed to
             PERSONAL_DATA if this env variable is defined
       Version 4, September 5, 1996, Liyun Wang, NASA/GSFC
          Fixed a bug that returns files not necessarily in displayed
             path when changing filter field
       Version 5, September 9, 1997, Liyun Wang, NASA/GSFC
          Allowed pathname to contain tilde in 1st character
       Version 6, October 28, 1998, Zarro, NASA/GSFC
          Stored last path/filter selection in memory
	Version 7, 18-Apr-2000, William Thompson, GSFC
		Made loop long integer
	Version 8, 23-Apr-2004, Zarro (L-3Com/GSFC) - replaced SPAWN,'ls' 
               by LIST_DIR & LIST_FILE; improved widget handling

 CONTACT:
       Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)


xpickfile2 $SSW/gen/idl/widgets/xpickfile2.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       xpickfile2

 PURPOSE:
       Compound widget program for file selection

 CATEGORY:
       Utility, widget

 EXPLANATION:

 SYNTAX:
       xpickfile2, parent, child

 EXAMPLE:
       xpickfile2, parent, child, filter = '*.gif *.fits'

 INPUTS:
       PARENT - ID of the parent base widget on which the pickfile
                widget is built

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       CHILD  - ID of the child widget (i.e, the application)

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       GET_PATH- Set to a named variable. Returns the path at the
                 time of selection.

       PATH    - The initial path to select files from.  If this keyword is
                 not set, the current directory is used.

       FILTER  - A string value for filtering the files in the file
                 list.  This keyword is used to reduce the number of
                 files to choose from. The user can modify the
                 filter. Example filter values might be "*.pro" or "*.dat".

       FONT    - Name of font to be used in the widget

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], CHK_DIR [1], CHK_DIR [2], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], CUTOFF_HEAD, EXIST, EXPAND_TILDE [1], EXPAND_TILDE [2], MK_DFONT
	OS_FAMILY, XACK, XHOUR, XKILL, XMANAGER, XPF2_GETDIRS, XPF2_GETFILES, XPF2_VALID_DIR
	XPICKFILE2_EVENT, concat_dir [4]
 COMMON:
       xpickfile2

 RESTRICTIONS:
       Does not recognize symbolic links to other files in UNIX.
       Multiple filter patterns are not recognized in VMS system

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, November 1, 1995, Liyun Wang, NASA/GSFC
          Modified from PICKFILE v 1.7 1994/05/02 19:25:51
       Version 2, February 23, 1996, Liyun Wang, NASA/GSFC
          Modified such that the side effect of current IDL working
             directory being changed via the PATH widget is removed
       Version 3, February 26, 1996, Liyun Wang, NASA/GSFC
          Directory for personal data is default to the one pointed to
             PERSONAL_DATA if this env variable is defined
       Version 4, September 5, 1996, Liyun Wang, NASA/GSFC
          Fixed a bug that returns files not necessarily in displayed
             path when changing filter field
       Version 5, September 9, 1997, Liyun Wang, NASA/GSFC
          Allowed pathname to contain tilde in 1st character
       Version 6, October 28, 1998, Zarro, NASA/GSFC
          Stored last path/filter selection in memory
	Version 7, 18-Apr-2000, William Thompson, GSFC
		Made loop long integer
	Version 8, 6-May-2004, Zarro (L-3Com/GSFC) - deprecated and renamed from XPICKFILE


FUNCTION cutoff_head, str, substr


XPL_STRUCT $SSW/gen/idl/widgets/xpl_struct.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XPL_STRUCT
               
 Purpose     : Explain STRUCTURE tags by browsing help files
               
 Explanation : A pulldown menu is created representing all the
		levels of "introspection" of a structure variable.

		If a tag in a structure is an array, it's "expanded"
		if it's less than SIZE, which by default is set to 30.

		The tags of the structure are linked to their tag names
		and their parent structure names, i.e.,
		
			STC.TAG     ; Tag named "TAG" in structure "STC"
		or      .TAG        ; Tag named "TAG" in anonymous structure.

		These combinations are used to look up help texts via
		WIDG_HELP, and display them on the screen.

 Use         : XPL_STRUCT, DATA_STRUCTURE
    
 Inputs      : DATA_STRUCTURE: Any IDL structure.
               
 Opt. Inputs : None.
               
 Outputs     : None.
               
 Opt. Outputs: None.
               
 Keywords    : ON_BASE : The widget base to put the pulldown button on.
		SIZE    : The maximum size of "expanded" arrays
		FILE    : The data file to inspect for help texts.
			  Default "struct_tags.hlp"
		TITLE   : The title to be associated with the pulldown button
		NOHELP  : Turn off the help facility (behaves like DSP_STRUCT)

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], NTRIM, TRIM, WIDG_HELP, XMANAGER, XPDMENU
	XPL_ARRAY, XPL_CATCH_EVENT
 CALLED BY:
	DSP_STRUCT, dsp_menu
 Common      : None.
               
 Restrictions: None.
               
 Side effects: During development, XDOC suddenly wouldn't work.
		Could not reproduce it...
               
 Category    : CDS, UTILITY, STRUCTURE
               
 Prev. Hist. : Based on DSP_STRUCT
		Added some more "intelligent" handling of arrays

 Written     : SVHH, 16-May-1995
               
 Modified    : Version 2, SVHH, UiO, 27 February 1996
                         Using NTRIM to avoid BYTE->STRING
                         conversion.
               Version 3, SVHH, UiO, 28 February 1996
                         Using the /hierarchy flag in calling widg_help
               Version 4, SVHH, UiO, 1 March 1996
                         Using fixed font for widg_help topics
               Version 5, SVHH, UiO, 2 October 1996
                         Splitting long lists of tags into sub-lists.
                         
 Version     : 5, 2 October 1996


XPLOTSCALE $SSW/gen/idl/display/xplotscale.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XPLOTSCALE
               
 Purpose     : A widget interface to control plot scaling methods
               
 Explanation : An XPLOTSCALE object contains a description of how the
               plotting range (normally, the YRANGE) is selected, given the
               arrays of abscissa/ordinate values, and the abscissa range
               (normally the XRANGE). It also contains a switch to control
               the plot TYPE (i.e., 1 for logarithmic, 0 for linear).

               Creating an XPLOTSCALE object is done by calling XPLOTSCALE
               without any parameters. The XPLOTSCALE ID is returned.

               In order to retrieve the proper user-determined plotting
               range, call XPLOTSCALE with two parameters: the XPLOTSCALE ID
               and an Nx2 array; [[abscissa],[ordinate]]. You may also supply
               an abscissa range (like e.g., XRANGE). The ordinate range is
               returned as an array with two elements (to be used e.g., like
               YRANGE).

               The XPLOTSCALE object may or may not be visible on the screen.
               You can always force an XPLOTSCALE object to become visible by
               using
               
                   dummy = xplotscale(xplotscale_id,/map,/show,iconify=0)

               Making the XPLOTSCALE object invisible is done by e.g.,

                   dummy = xplotscale(xplotscale_id,map=0) 

               (or by setting /iconify, or setting show=0).
               
               If the XPLOTSCALE object is visible, the user may alter the
               method used to decide the plot range.  The next time the
               display program uses XPLOTSCALE to determine the plotting
               range, the new status will be reflected in the scaling of the
               plot. If the display program wishes to be informed about any
               change in the scaling object right away, it should inform
               xplotscale about it the following way:

               1. Create a (usually unmapped) widget_base somewhere in the
               display program widget hierarchy.

               2. Supply the widget ID of this base to XPLOTSCALE through the
               keyword SIGNAL, either when creating XPLOTSCALE, or at some
               later time. If you're supplying it after the creation, you'll
               need to specify the xplotscale ID as a parameter, e.g.,

                     dummy = xplotscale(xplotscale_id,signal=base)

               3. When the XPLOTSCALE object is altered by the user, an event
               is generated and sent to the widget id's that have been hooked
               up through the SIGNAL keyword. The event structure,
               {XPLOTSCALE_EVENT}, contains the following tags:

               ID         : The ID of the SIGNAL base (NOT the xplotscale ID).
               HANDLER    : The ID of the event handling base.
               TOP        : The ID of the topmost base in the hierarchy.
               XPLOTSCALE_ID: The XPLOTSCALE ID

               
 Use         : XPLOTSCALE_ID = XPLOTSCALE()
    
 Inputs      : None reqired.
               
 Opt. Inputs : XPLOTSCALE_ID : The ID of the XPLOTSCALE object be
               used/modified.

               VALUES : (Only as parameter number 2, after XPLOTSCALE_ID) The
                        abscissa/ordinate values to be plotted, as an Nx2
                        array, [[abscissa],[ordinate]].

               RANGE : (Only as parameter number 3, after XPLOTSCALE_ID and
                       VALUES). The actual abscissa range to be plotted.
                       The user may select whether the values are to be based
                       on the entire array of VALUES, or on just the portion
                       inside the given RANGE.
                       
 Outputs     : Returns the XPLOTSCALE_ID of the new scaling object when called
               without any parameters.

               Returns the ordinate range and TYPE if called with
               XPLOTSCALE_ID and VALUES (and optionally (abscissa) RANGE).
               The returned values are [MIN,MAX,TYPE]. MIN may be larger than
               MAX, if the user prefers an inverted plot.

 Opt. Outputs: None.
               
 Keywords    : TITLE : A title string to be displayed above the scaling
                       program.

               MISSING : The value of missing data.

               COMP_MISSING : Comparison method for missing data:
               
                   -1 : Values less than/equal to MISSING treated as missing
                    0 : Values exactly matching MISSING treated as missing
                    1 : Values greater than or equal to MISSING treated as
                        missing.
               
               SIGNAL : The widget ID(s) of those to be informed about
                        changes to the scaling object.

               DESTROY : Set this keyword to destroy the scaling object.

               XOFFSET,
               YOFFSET : The x/y offset of the widget showing the
                         status of the scaling object.

               GROUP_LEADER : The widget ID of the group leader.

               ICONIFY : Set to 1 to make the widget showing the status
                         become iconified. Set to 0 to de-iconify.

               MAP : Set to 1 to make the widget visible. Set to 0 to make it
                     invisible

               SHOW : Set to 1 to raise the widget on top of any other
                      window. Set to 0 to hide it behind all other windows.

 Calls       : ***
	CW_ENTERB, CW_FLIPSWITCH, DEFAULT, HANDLE_KILLER_HOOKUP, PARCHECK
	SINCE_VERSION [1], SINCE_VERSION [2], TRIM, TYP, XALIVE, XMANAGER, XPLOTSCALE_EVENT
	XPLOTSCALE_HELP, XPLOTSCALE_MAKEBASE, XPLOTSCALE_NONLIN, XPLOTSCALE_SCALE, XTEXT
 CALLED BY:
	CW_CUBEVEIW, CW_PLOTZ [1], XCFIT, cw_plotz [2]
 Common      : None.
               
 Restrictions: The user has to press enter to make program changes effective.
               
 Side effects: None known.
               
 Category    : Utility, Image
               
 Prev. Hist. : Based on analogous XTVSCALE routine.

 Written     : Stein Vidar H. Haugan, UiO, 14 November 1996
               (s.v.h.haugan@astro.uio.no)
               
 Modified    : Not yet.

 Version     : 6, 22 August 1996


XPOPUP $SSW/gen/idl/widgets/xpopup.pro
[Previous] [Next]
 Project     : HESSI

 Name        : XPOPUP

 Purpose     : widget popup window

 Category    : utility widgets

 Syntax      : IDL> xpopup,instruct

 Inputs      : INSTRUCT = string to popup

 Keywords    : WBASE = widget ID of main base. If passed in, text
                       window is updated.
               XSIZE,YSIZE = text box dimensions (def = 3 x 10 characters)
               TFONT,BFONT = text and button fonts
               GROUP = widget ID of group leader
               TITLE = title for main base

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, TRIM, WIDGET_MBASE, XALIVE, XKILL
	XMANAGER, XPOPUP_EVENT, XREALIZE, XSHOW, data_chk [1], data_chk [2], is_number [1]
	is_number [2]
 CALLED BY:
	RATIO_PLOTTER [1], SHOW_SYNOP__DEFINE, ch_ss, ratio_plotter [2]
 History     : Written 14 Aug 2000, D. Zarro, EIT/GSFC

 Contact     : dzarro@solar.stanford.edu


XPRINT [1] $SSW/gen/idl/fund_lib/jhuapl/timeaxis.pro
[Previous] [Next]
 NAME:
       XPRINT
 PURPOSE:
       Print text on graphics device.  After initializing use just like print.
 CATEGORY:
 CALLING SEQUENCE:
       xprint, item1, [item2, ..., item10]
 INPUTS:
       txt = text string to print.     in
 KEYWORD PARAMETERS:
       Keywords:
         COLOR=c set text color.
         ALIGNMENT=a set text alignment.
         /INIT to initialize xprint.
           xprint,/INIT,x,y
             x,y = coord. of upper-left corner of first line of text.    in
         /DATA use data coordinates (def). Only needed on /INIT.
         /DEVICE use device coordinates. Only needed on /INIT.
         /NORM use normalized coordinates. Only needed on /INIT.
         /NWIN use normalized window coordinates. Only needed
           on /INIT.  NWIN coordinates are linear 0 to 1
           inside plot window (inside axes box).
         CHARSIZE=sz  Text size to use. On /INIT only.
         CHARTHICK=thk  Text thickness to use. On /INIT only.
           Text is thickened by shifting and overplotting.
           Thk is total number of overplots wanted. To shift by
           > 1 pixel per plot do CHARTHICK=[thk,step]
           where step is in pixels (def=1).
         DY=factor.  Adjust auto line space by this factor. On /INIT only
           Try DY=1.5 for PS plots with the printer fonts (not PSINIT,/VECT).
         YSPACE=out return line spacing in Y.
         x0=x0 return graphics x-position of text in normalized coordinates.
         y0=y0 return graphics y-position of text in normalized coordinates.
 OUTPUTS:
 CALLS: ***
	GETWRD [1], GETWRD [2], JD2MDAYS, MAKEX [1], MAKEX [2], MAKEX [3], NWIN, TIMEAXIS [1]
	TIMEAXIS [2], TIMEAXIS [3], TIME_LABEL [1], TIME_LABEL [2], TIME_LABEL [3]
	TNAXES [1], TNAXES [2], TNAXES [3], VER
 CALLED BY:
	FIND_DURATION, LIST_DURATION, MK_CDS_PLAN, MK_STUDY, PLAN_XCAT_SUMM, SCANPATH
	TIMEAXIS [1], TIMEAXIS [2], TIMEAXIS [3], X2PS, XCAMP, XCAT, XCPT, XREPORT, XREPORT_EDIT
	XTEXT
 COMMON BLOCKS:
       xprint_com
 NOTES:
       Notes: Initialization sets text starting location and text size.
         All following xprint calls work just like print normally does except
         text is output on the graphics device.
 MODIFICATION HISTORY:
       R. Sterner, 9 Oct, 1989.
       H. Cohl, 19 Jun, 1991.  (x0, y0)
       R. Sterner, 25 Sep, 1991 --- fixed a bug that made line spacing
       wrong when the window Y size varied from the normal value. The
       bug showed up for psinit,/full with !p.multi=[0,1,2,0,0] where
       the line spacing appeared to be 2 times too much.  Was using
       xyouts to print a dummy letter to get its size.  Now just use
       the value !d.y_ch_size (dev coord) as a good guess.
       R. Sterner, 10 Mar, 1992 --- added CHARTHICK.
       R. Sterner, 18 Mar, 1992 --- Modified CHARTHICK to do shifted
       overplots and added shift size in pixels.
       R. Sterner, 27 Mar, 1992 --- fixed a bug added with the modified
       CHARTHICK.
       R. Sterner, 20 May, 1993 --- Allowed CHARSIZE.
       R. Sterner, 30 Jul, 1993 --- coordinate system used only to set
       initial point, not needed for each print.
       Handle log axes.

 Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.


XPRINT [2] $SSW/gen/idl/widgets/xprint.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XPRINT

 Purpose     : print an array or file

 Category    : OS, Widgets

 Explanation : retrieves a printer queue name from a selection
               obtained from PRINTCAPS file

 Syntax      : IDL> xprint,file

 Inputs      : FILE = filename to print

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : STATUS = 0/1 if selection aborted/continued
               ARRAY = alternative string array to print
               NOSEL = skip printer selection
               PRINTER = return printer name
               CONFIRM = prompt for file deletion

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], RM_FILE, SEND_PRINT, SET_X [1], SET_X [2]
	TRIM, XACK, XANSWER, XSEL_PRINTER, XTEXT
 CALLED BY:
	FIND_DURATION, LIST_DURATION, MK_CDS_PLAN, MK_STUDY, PLAN_XCAT_SUMM, SCANPATH
	TIMEAXIS [1], TIMEAXIS [2], TIMEAXIS [3], X2PS, XCAMP, XCAT, XCPT, XREPORT, XREPORT_EDIT
	XTEXT
 Common      : None

 Restrictions: currently works best for UNIX

 Side effects: None

 History     : Version 1,  1-Sep-1995,  D.M. Zarro.  Written
               Modified, 1-May-2000, Zarro (SM&A/GSFC) - added check
               for windows

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XPS_SETUP $SSW/gen/idl/widgets/xps_setup.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       XPS_SETUP

 PURPOSE:
       Widget interface to PS

 CATEGORY:
       Utitlity, widget

 EXPLANATION:

 SYNTAX:
       xps_setup,ps_setup

 INPUTS:
       None required.

 OPTIONAL INPUTS:
       PS_SETUP - PS parameter structure for setting up the PS device. If it
                is not defined when the routine is called, it will 
                be defined by the routine. It may be modified upon exiting
                from the program. It should have the following tags:

                FILENAME     - Name of PS file. Default: idl.ps
                PORTRAIT     - 1 for portrait, 0 for landscape
                COLOR        - 0/1 indicating if color plot is needed
                ENCAPSULATED - 0/1 indicating if EPS file is needed
                COPY         - 0/1 indicating whether to copy the current
                               color table to the PostScript device
                INTERPOLATE  - 0/1 indicating whether to interpolate the
                               current color table to the PostScript device

 CALLED BY:
	DSPEXP, DSP_AUX, DSP_WAV, EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2]
	IMAGE_TOOL_EVENT, MK_CDS_PLAN, MK_SOHO, NDSPSPEC, SUMER_DISPLAY_IMA
	SUMER_DISPLAY_SPECTRUM, SUMER_DISPLAY_W, SUMER_HARCOPY_SPECTRUM
	SUMER_HARDCOPY_IMA, WIN_DUMP, XCDS_SNAPSHOT, XGAUSSFIT
                Note: COPY and INTERPOLATE are only meaningful when
                      COLOR is set. Both cannot be set.

 OUTPUTS:
       PS_SETUP - PS parameter structure
 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       INITIAL - Create the PS_SETUP structure without popping up the
                 widget if set
       GROUP   - ID of the widget who serves as a group leader
       FONT    - optional font for labels
       STATUS - 0/1 for Cancel/Accept option
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], COPY_STRUCT [1], COPY_STRUCT [2], COPY_STRUCT [3], DATATYPE [1]
	DATATYPE [2], DATATYPE [3], FREE_POINTER, GET_DEF_PRINTER, GET_POINTER
	MAKE_POINTER, MATCH_STRUCT, MK_DFONT, OS_FAMILY, PS_FORM [1], PS_FORM [2]
	REM_TAG [1], REM_TAG [2], SET_POINTER, TEST_OPEN, TIMER_VERSION, TRIM, XACK, XALIVE
	XINPUT, XKILL, XMANAGER, XMENU2, XPS_SETUP_EVENT, XREALIZE, XSEL_PRINTER, XSHOW
	XTEXT_RESET, break_file [4], concat_dir [4]
 COMMON:
       XPS_SETUP: contains most recent setup structure

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, October 6, 1995, Liyun Wang, GSFC/ARC. Written
       Version 2, November 13, 1996, Liyun Wang, NASA/GSFC
          Modified such that copied color table is the default
             selection when choosing to print in COLOR
       Version 3, July 17, 1999, Zarro (SM&A/GSFC)
          Added call to PS_FORM to configure DEVICE
       Version 4, Oct 17, 1999, Zarro (SM&A/GSFC)
          Made IDL versions 4 and 5 compatible

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


XREALIZE $SSW/gen/idl/widgets/xrealize.pro
[Previous] [Next]
 Project     :	SOHO CDS/SUMER

 Name        : XREALIZE

 Purpose     : control placement of realized widgets

 Use         : XREALIZE,WBASE

 Inputs      : WBASE = widget base id

 Opt. Inputs : None.

 Outputs     : None.

 Opt. Outputs: None.

 Keywords    : XOFF, YOFF = user specified or computed offsets
               GROUP = ID of group widget relative to which the
                       offset values are calculated
               SCREEN = center relative to main screen
               CENTER = center relative to GROUP (if alive)

 CALLS: ***
	EXIST, GET_CENT_OFF, XALIVE
 CALLED BY:
	CFIT_BLOCK, CHAN_DEFINE, CH_SYNTHETIC, ITOOL_PICKFILE, MK_PLAN_CUSTOM
	MK_SOHO_CUSTOM, OVSA_LTC_DEFINE, PROGMETER, SYNOP_DEFINE, WINDMETER, XACK, XANSWER
	XCALENDAR, XCAMP, XCAT, XCDS_ANALYSIS, XCHOICE, XCLONE_PLAN, XCPT, XCR_REMOVE, XIAP
	XINPUT, XLIST, XPOPUP, XPORT, XPROGRAM, XPROGRAM_ADD, XPS_SETUP, XREPORT, XREPORT_EDIT
	XSEL_LIST [1], XSEL_LIST [2], XSET_VALUE, XTEXT, ethz_XCHOICE
 Common      : None.

 Restrictions: None.

 Side effects: WBASE is realized at specified or computed offsets

 Category    : Widgets

 Prev. Hist. : None.

 Written     :	Zarro (ARC/GSFC) 17 September 1996


XRECORDER $SSW/gen/idl/widgets/xrecorder.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XRECORDER
               
 Purpose     : Tool for recording/replaying user events.
               
 Explanation : XRECORDER is designed to record and replay demonstration
               sessions showing the abilities of various widget programs on
               screen, without supervision.

               BASIC USE

               Make sure you have compiled the modified version of XMANAGER
               (type ".run ymanager").

               Start XRECORDER (which will just register with XMANAGER and
               then return to the prompt).

               Start any event-driven widget program. Press the "Record"
               button and start using your widget program. Press the "Stop"
               button to stop the recording.

               Now, make sure that the same widget(s) are present as when you
               started the recording. Press "Replay" and watch your moves
               being copied - the cursor is moved around on the screen and
               the widget program receives the same events as during the
               recording session.

               You can also exit the XRECORDER widget, and then restart it
               again in another IDL session (make sure it can find the
               recorded script file). Simply start XRECORDER, start your
               widget program, and press "Replay".

               When you press the "Record" button, all events recorded will
               be *appended* to the current recording file. Press "Reset" to
               delete the file and start over. Press "Select new file" to
               change to another recording/replay file.
               
               MODIFYING THE SCRIPT
               
               The recorded "script" files may be edited. For example, two
               kinds of text comments to the viewer may be inserted:

               Script lines starting with a double quote will be inserted
               into the message area of the XRECORDER widget.

               Sequences of script lines starting with a single quote will be
               displayed by an XTEXT widget, and then killed when the next
               event is processed.

               Each script line consists of five fields:

               1. The time delay (since the last event)
               2. The XMANAGER registered name of the top level base
               3. An identification number (for multiple instances)
               4. A line number identifying the widget who created the event
               5. A text describing the event structure

               Note that the separator between the various fields is NOT a
               blank character, but a string(255b)!

               You may wish to edit the *first* field to modify the time
               delay before an event goes off. The time delay is measured
               from the time of the execution of the previous event.
               
               LIMITATIONS

               XRECORDER works with *almost* all event-driven programs,
               without modification, and in such a way that the programs have
               no idea what's going on.

               It will *not* work properly with programs using the CURSOR
               procedure to receive user input.

               In addition, there are at least three known problem areas:

               1. Widget programs that dynamically alter their widget
               hierarchy to create new widgets after being realized (this
               *may* be fixed in later versions).

               2. Widget programs that (re)set the event functions/procedures
               of their "leaf" widgets (all widgets except bases).

               3. Widget programs using EV = WIDGET_EVENT(ID) to catch events
               straight after the widget hierarchy has been created,
               *without* first allowing the main event loop in XMANAGER
               process pending events.

 Use         : XRECORDER [,FILENAME] [,/START] [,/PLAY_ONLY]
    
 Inputs      : None.
 
 Opt. Inputs : FILENAME : The name of the recording/playback file.
               
 Outputs     : None.
               
 Opt. Outputs: None.
               
 Keywords    : START : Set to make XRECORDER start the playback as soon as
                       event processing is started (usually when the next
                       widget program is started from the IDL prompt).

               PLAY_ONLY : Set to desensitize the recording/reset buttons.

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CW_INFILTRATE, DEFAULT
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], NTRIM, PICKFILE, RD_ASCII [1]
	RD_ASCII [2], RM_FILE, SINCE_VERSION [1], SINCE_VERSION [2], STR_SEP, TRIM, XKILL
	XMANAGER, XRECORDER_AGENT, XRECORDER_CACHE, XRECORDER_CALIBRATE_MBAR
	XRECORDER_CLEANUP, XRECORDER_CLOSE, XRECORDER_DO_EVENT, XRECORDER_EVENT
	XRECORDER_EVENT_TEXT, XRECORDER_FINDPOS, XRECORDER_FLICK_BUTTON
	XRECORDER_FLICK_MBAR, XRECORDER_MAKE, XRECORDER_MINIMIZE, XRECORDER_MOVETO
	XRECORDER_OPEN, XRECORDER_PLAYLINE, XRECORDER_REGISTER, XRECORDER_START
	XRECORDER_TREAT, XRECORDER_WAVE, XREGISTERED, XTEXT, XUNREGISTER, XWIDUMP
	break_file [4], delvarx [5]
 CALLED BY:
	XSPECT
 Common      : Uses the MANAGED common block from XMANAGER. 
               
 Restrictions: Will not work in IDL 5.0 or later without modification.
               Relies on the ability of having widgets that are immune to
               modalization, so using WIDGET_BASE(/MODAL) could be a problem.
               
 Side effects: Not too many, I hope. (None known, actually..)
               
 Category    : Widgets
               
 Prev. Hist. : Requested by Dave Pike.

 Written     : Stein Vidar Haugan, UiO, March & May 1997
               
 Modified    : Yes.

 Version     : 1, 25 May 1997


XREGISTERED2 $SSW/gen/idl/widgets/xregistered2.pro
[Previous] [Next]
 NAME: 
	XREGISTERED2

 PURPOSE:
	This function returns non-zero if the widget named as its argument 
	is currently registered with the XMANAGER as an exclusive widget, 
	otherwise this routine returns false.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	Result = XREGISTERED(Name)

 INPUTS:
	Name:	A string containing the name of the widget in question.

 KEYWORD PARAMETERS:
	NOSHOW:	If the widget in question is registered, it is brought
		to the front of all the other windows by default.  Set this
		keyword to keep the widget from being brought to the front.

 OUTPUTS:
	If the named widget is registered, XREGISTERED returns the number
	of instances of that name in the list maintained by XMANAGER.  
	Otherwise, XREGISTERED returns 0.

 CALLED BY:
	EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], IMAGE_TOOL, WRUNMOVIE4, XREGISTERED
 COMMON BLOCKS:
	MANAGED

 SIDE EFFECTS:
	Brings the widget to the front of the desktop if it finds one.

 RESTRICTIONS:
	None.

 PROCEDURE:
	Searches the list of exclusive widget names and if a match is found
	with the one in question, the return value is modified.

 MODIFICATION HISTORY:
	Written by Steve Richards, November, 1990
	Jan, 92 - SMR	Fixed a bug where an invalid widget
			was being referenced with 
			WIDGET_CONTROL and the /SHOW keyword.
	17 November 1993 - AB and SMR. Added ID validity checking to
			fix a bug where already dead widgets were being
			accessed.
	Apr, 96 - DJE	Rewrite for asynchronous widget event handling.
	6-Nov-99, Zarro (SM&A/GSFC) - added case check, renamed to
                       XREGISTERED2


XSEL_ITEM $SSW/gen/idl/widgets/xsel_item.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       XSEL_ITEM()

 PURPOSE:
       Select an item from a given string list (similar to XSEL_LIST)

 EXPLANATION:

 CALLING SEQUENCE:
       Result = xsel_item(str_array)

 INPUTS:
       STR_ARRAY -- A string vector that contains the given list

 OPTIONAL INPUTS:
       TITLE -- A title above the displayed item, default to: "Selected Item"
       FONT  -- name of font to be used. Default: 9x15bold

 OUTPUTS:
       Result -- Index of the chosen list. If the operation is canceled, 
                 a -1 is returned.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       None.

 CALLS: ***
	CW_DROPLIST, DATATYPE [1], DATATYPE [2], DATATYPE [3], FREE_POINTER, GET_POINTER
	MAKE_POINTER, SET_POINTER, XALIVE, XKILL, XMANAGER, XSEL_ITEM_EVENT
 CALLED BY:
	ITOOL_RD_FITS, RD_IMAGE_FITS
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:

 PREVIOUS HISTORY:
       Written February 27, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, February 27, 1995
       Version 2, Liyun Wang, GSFC/ARC, May 24, 1995
          Got rid of common block;
          Used CW_DROPLIST compound widget program
       Version 3, Zarro, GSFC, 12 August 1996
          Converted to using HANDLES
 VERSION:
       Version 3, May 24, 1995


XSEL_LIST [1] $SSW/gen/idl/widgets/xsel_list.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       XSEL_LIST()

 PURPOSE:
       To select one item from a list.

 EXPLANATION:

 CALLING SEQUENCE:
       Result = XSEL_LIST(options)

 INPUTS:
       OPTIONS -- String array that contains the lists.

 OPTIONAL INPUTS:
       TITLE=TITLE, Title of the widget. Default: 'XSET_LIST'

 OUTPUTS:
       RESULT -- Selected item (one of elements from the LISTS
                 array). A null string is returned if no selection is
                 made.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       INDEX   - Return index of the selected item
                 otherwise the content of the selected item.
       UPDATE  - Set this keyword to make selection widget editable and any
                 new entries will be added to the given OPTIONS upon exit
       INITIAL - Initial selection
       STATUS  - 1/0 if Accept/Cancel is chosen
       SENSITIVECASE - Set this keyword to treat the list case sensitive
       NO_REMOVE - Set this keyword will prevent the "Remove" button
                   from showing
       LFONT   - Name of font to be used in the list widget
       NO_SORT - If set, don't sort options list.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FREE_POINTER, GET_CALLER, GET_POINTER
	GREP, MAKE_POINTER, MK_DFONT, POPUP_MSG, REP_TAG_VALUE, SET_POINTER, STRPAD, TRIM
	UNIQ [1], UNIQ [2], UNIQ [3], XALIVE, XKILL, XMANAGER, XMANAGER_RESET, XREALIZE
	XSEL_GET_SELECT, XSEL_LIST_EVENT, XTEXT_RESET
 CALLED BY:
	EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], FILE_SEARCHER [1], FILE_SEARCHER [2]
	IMAGE_TOOL, MK_CDS_PLAN, MK_SOHO, XSEL_PRINTER, XSPECT, hsi_ui_flarecat
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       The given input parameter OPTIONS may be changed if UPDATE keyword is
       set

 CATEGORY:
       Utility, widget

 PREVIOUS HISTORY:
       Written September 20, 1994, by Liyun Wang, NASA/GSFC

 MODIFICATION HISTORY:
       Version 1, Liyun Wang, NASA/GSFC, September 20, 1994
       Version 2, Liyun Wang, NASA/GSFC, May 19, 1995
          Added UPDATE, INITIAL, and STATUS keywords
          Added a "Remove" button
          Got rid of common block
       Version 3, November 20, 1995, Liyun Wang, NASA/GSFC
          Fixed a bug that did not update the selected item to the list
       Version 4, December 5, 1995, Liyun Wang, NASA/GSFC
          Added SENSITIVECASE keyword
       Version 5, January 25, 1996, Liyun Wang, NASA/GSFC
          Added NO_REMOVE keyword
       Version 6, February 15, 1996, Liyun Wang, NASA/GSFC
          Xresource option disabled for IDL version 3.5 and earlier
       Version 7, February 22, 1996, Zarro, NASA/GSFC
          Changed to use of pointers
       Version 8, April 4, 1996, Liyun Wang, NASA/GSFC
          Added LFONT keyword
       Version 9, June 13, 1996, Liyun Wang, NASA/GSFC
          Fixed a bug caused by grepping string arrays
       Version 10, Jan 13, 1997, Zarro, NASA/GSFC
          Fixed a bug in which LFONT was not being passed
       Version 11, May 23, 1997, Liyun Wang, NASA/GSFC
          Fixed a bug which, when INDEX keyword is set and Cancel is
             selected, returns a string instead of a numerical -1
       Version 12, June 13, 1997, Zarro, NASA/GSFC
          Trimmed and sorted options list
       Version 13, Dec 3, 2000, Kim Tolbert, added no_sort keyword
       Feb 4, 2001, Kim, explicitly set xsize on selection text widget
          (required for Windows)
       Nov 12, 2001, Kim, added ysize keyword for initial ysize of widget
 VERSION:
       Version 12


xsel_list_multi $SSW/gen/idl/widgets/xsel_list_multi.pro
[Previous] [Next]
 Name: xsel_list_multi

 Purpose: Function to select one or more item(s) from a list widget.  User can use
   shift and control keys to select multiple items from the list.

 Calling sequence:  list = xsel_list_multi (items)

 Input arguments:
   items - string array of items for selection

 Keywords:
   initial - index into items of initial selection
   index - if set, return index of selection(s), otherwise return string
   title - title of widget
   label - label above list widget
   group - widget id of calling widget
   cancel - set to 1 if user pressed cancel button

 Output:
   Function returns item selected (as index if index keyword set).

 Written:  Kim Tolbert, 18-Jul-2002
 Modifications:
   1-Aug-2002, Kim.  Added xoffset, yoffset keywords
 CALLS:
 CALLED BY
	hsi_ui_flarecat, widget_kill


XSEL_PRINTER $SSW/gen/idl/widgets/xsel_printer.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XSEL_PRINTER

 Purpose     : select printer 

 Category    : Device, Widgets

 Explanation : retrieves a printer name from a selection
               obtained from PRINTCAPS file

 Syntax      : IDL> xsel_printer,printer,err=err,status=status

 Inputs      : None

 Opt. Inputs : None

 Outputs     : printer = selected printer name

 Opt. Outputs: None

 Keywords    : GROUP = widget ID of calling widget
               STATUS = 0/1 if selection aborted/completed
               INSTRUCT = instructions for user
               DEFAULT = default printer selection

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_DEF_PRINTER, LIST_PRINTER, OS_FAMILY
	XSEL_LIST [1], XSEL_LIST [2]
 CALLED BY:
	CHIANTI_NE, CHIANTI_TE, RATIO_PLOTTER [1], XPRINT [2], XPRINT [5], XPS_SETUP, ch_ss
	ratio_plotter [2]
 Common      : XSEL_PRINTER: holds last selected printer name

 Restrictions: currently works best for UNIX

 Side effects: None

 History     : Version 1, 7-Sep-1995,  D.M. Zarro.  Written
               Version 2, 25-Feb-1997, Zarro, added printer environmentals

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XSELECT $SSW/gen/idl/widgets/xselect.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XSELECT
               
 Purpose     : Force the user to select from a list or abort.
               
 Explanation : A menu with the supplied options is generated, as
		well as a DONE-button (to signal completion of the selection)
		and a QUIT-button (to signal abortion of the selection).
               
		Menus can be either nonexclusive or exclusive.
		A default selection can be supplied.

 Use         : XSELECT,OPTIONS,STATUS,ABORT (all 3 parameters needed)
    
 Inputs      : OPTIONS:
			A text array containing the possible selections.

		STATUS:	An integer array containing the default selection,
			STATUS( i ) eq 1 signifies that OPTION( i ) is
			selected by default. Must have same dimensions as
                       OPTIONS parameter.
               
 Opt. Inputs : None.
               
 Outputs     : STATUS:	The resulting selection array. OPTION( i ) eq 1
			signifies selection of option no. i.

		ABORT:	Set to 1 if the user aborted the selection.
               
 Opt. Outputs: None.
               
 Keywords    : TITLE:	String with the title of the window with the menu.
			(default: 'Select options below')
		
		QUIT:	String with the text to go on the QUIT button.
			(default: 'Quit')

		DONE:	String with the text to go on the DONE button.
			(default: 'Done')

		GROUP_LEADER:
			Standard Xmanager/Widget meaning.

		X/YOFFSET: The position of the upper left corner of the
			new base.

		EXCLUSIVE/
		NONEXCLUSIVE:
			The type of base showing the selection buttons.
			Default: NONEXCLUSIVE

		MODAL:	Set to make the selection widget modal. 
			See Side effects.

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], XMANAGER, XMENU [1], XMENU [2]
	XSELECT_EVENT
 CALLED BY:
	DSPEXP, SUMER_GIF_IMA, SUMER_GIF_SPECTRUM, SUMER_HARCOPY_SPECTRUM
	SUMER_HARDCOPY_IMA, SUMER_SPECTROGRAM_SAVE, SUMER_TOOL_PD_EVENT
 Common      : XSELECT
               
 Restrictions: None.
               
 Side effects: The use of the MODAL keyword causes all widget
		DRAW windows to be blanked out.... Might be fixed
		in later versions of IDL...? (Depending on whether
		they see it as a bug or a feature :-)
               
 Category    : CDS, QuickLook, General
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, 18 November 1993
               
 Modified    : SVHH, Version 1.5, 3 June 1994
			Added MODAL and X/YOFFSET keywords.
		PB,   Version 1.6, 24 Aug 1994  
		        Changed button 'Done' to 'Continue'
               CDP,  Upgraded header info and set default xoffset 
                     and yoffset.  14-Feb-95

 Version     : Version 2, 14-Feb-95


XSET_COLOR $SSW/gen/idl/widgets/xset_color.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       XSET_COLOR

 PURPOSE:
       Change color index interactively

 EXPLANATION:

 CALLING SEQUENCE:
       xset_color, color_var [, min = min, max = max]

 INPUTS:
       COLOR_VAR - Integer, original color index

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       COLOR_VAR - New color index value

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       MIN   -- Minimum value of the range, default: 0
       MAX   -- Maximum value of the range, default: !d.n_colors-1
       TITLE -- Title of the widget; default: "Set Color"
       INSTRUCT -- A brief instruction to the user for running the program
       GROUP -- Group ID of an upper widget which would be desensitized if
                GROUP is set upon calling this routine

 CALLS: ***
	CW_FIELD, DATATYPE [1], DATATYPE [2], DATATYPE [3], FREE_POINTER, GET_CENT_OFF
	GET_POINTER, MAKE_POINTER, SET_POINTER, VALID_NUM [1], VALID_NUM [2]
	VALID_NUM [3], XALIVE, XKILL, XMANAGER, XSET_COLOR_EVENT
 CALLED BY:
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL_EVENT
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Utility, widget

 PREVIOUS HISTORY:
       Written August 18, 1994, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, August 18, 1994
       Version 2, Liyun Wang, GSFC/ARC, May 2, 1995
          Get rid of common block
       Version 3, November 9, 1995, Liyun Wang, GSFC/ARC
          Added check to guarentee the input value is a numerical one
             and within the allowed range
          Positioned the widget in the center of the screen
          Added INSTRUCT keyword
       Version 4, February 15, 1996, Liyun Wang, GSFC/ARC
          Xresource option disabled for IDL version 3.5 and earlier
       Version 5, 12 August 1996, Zarro, GSFC
          Converted to use HANDLES
	Version 6, William Thompson, GSFC, 8 April 1998
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays

 VERSION:
	Version 6, 8 April 1998


XSET_STRUCT $SSW/gen/idl/widgets/xset_struct.pro
[Previous] [Next]
 Name: XSET_STRUCT

 Purpose: Set up the structure for control parameter display.

 Category: OSPEX

 Written: 09-Aug-2004, Kim Tolbert/Sandhia Bansal
 Modifications:
   5-Nov-2004, Kim.  status return value wasn't set if answer was not 'yes'
 CALLS:
 CALLED BY
	SPEX__DEFINE, hsi_ui_img, hsi_ui_lc, hsi_ui_spec


XSET_VALUE $SSW/gen/idl/widgets/xset_value.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       XSET_VALUE

 PURPOSE:
       Set the value of a variable interactively with a slider.

 EXPLANATION:

 CALLING SEQUENCE:
       xset_value, value [, min = min] [, max = max]

 INPUTS:
       VALUE - Current default value; may be changed upon exit

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       VALUE - Updated value

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       MIN   -- Minimum value of the range (Default: 0)
       MAX   -- Maximum value of the range (Default: 100)
       TITLE -- Title of the widget; default: "Number Picker"
       INSTRUCT -- A brief instruction to the user for running the program
       GROUP -- Group ID of an upper widget on which this one depends
       FONT  -- Button FONT 
       STATUS -- returned as 0 is user hit CANCEL, otherwise 1

 CALLS: ***
	CW_FIELD, CW_FSLIDER, DATATYPE [1], DATATYPE [2], DATATYPE [3], FREE_POINTER
	GET_CALLER, GET_POINTER, MAKE_POINTER, SET_POINTER, TRIM, VALID_NUM [1]
	VALID_NUM [2], VALID_NUM [3], XALIVE, XKILL, XMANAGER, XREALIZE, XSET_CHECK
	XSET_VALUE_EVENT
 CALLED BY:
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL_EVENT
	MK_CDS_PLAN, XRASTER [1], XRASTER [2]
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Utilities, Widget

 PREVIOUS HISTORY:
       Written August 18, 1994, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, August 18, 1994
       Version 2, Liyun Wang, GSFC/ARC, May 2, 1995
          Gewt rid of common block
       Version 3, November 9, 1995, Liyun Wang, GSFC/ARC
          Added check to guarentee the input value is a numerical one
             and within the allowed range
          Positioned the widget in the center of the screen
          Added INSTRUCT keyword
       Version 4, 12 August 1996, Zarro, GSFC
          Converted to use HANDLES, added FONT and STATUS keywords, and
          removed restriction to exit when value is not changed.
       Version 5, December 5, 1996, Liyun Wang, NASA/GSFC
          Fixed problem with floating point number

 VERSION:
       Version 5


XSHOW $SSW/gen/idl/widgets/xshow.pro
[Previous] [Next]
 Project     :	SDAC

 Name        :	XSHOW

 Purpose     :	To show (unmap) an X widget

 Explanation :	So obvious, that explaining it will take more
               lines than the code.

 Category    : widgets

 Use         :	XSHOW,ID
              
 Inputs      :	ID = widget ids to show

 Opt. Inputs : None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	NAME = set if input ID is a an event handler name
               ALL  = set to show all instances of NAME
                              
 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 18 September 1993
               Version 2.0, 17 November 1999 -- added /all, /name
                
 CALLS:
 CALLED BY
	EIS_CAT [1], EIS_CAT [2], EIS_ITOOL_PTOOL [1], EIS_ITOOL_PTOOL [2]
	GE_WINDOW_SIM, HESSI, ITOOL_PTOOL, MK_CDS_PLAN, MK_PLAN_CUSTOM, MK_SOHO
	MK_SOHO_CUSTOM, MK_STUDY, PROGMETER, SCANPATH, WINDMETER, XACK, XANSWER, XCALENDAR
	XCAMP, XCAT, XCHOICE, XCLONE_PLAN, XCPT, XIAP, XINPUT, XLIST, XMANAGER_RESET, XMESSAGE
	XPOPUP, XPORT, XPROGRAM_ADD, XPS_SETUP, XREPORT, XREPORT_EDIT, XSTRUCT, XSTUDY, XTEXT
	XZOOM_PLAN, ethz_XCHOICE, hsi_ui_flarecat, hsi_ui_img, hsi_ui_lc, hsi_ui_mon
	hsi_ui_obs, hsi_ui_ql, hsi_ui_qlimage, hsi_ui_spec, plotman


XSHOW_HELP $SSW/gen/idl/widgets/xshow_help.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       XSHOW_HELP

 PURPOSE: 
       Show help text in a text widget based on its topic

 EXPLANATION:
       
 CALLING SEQUENCE: 
       xshow_help, help_stc, topic [, tbase]

 INPUTS:
       HELP_STC - Help structure created by MK_HELP_STC
       TOPIC    - A string scalar, the tag name in HELP_STC whose
                  value is the corresponding help text
     
 OPTIONAL INPUTS: 
       tbase    - ID of the text widget on which the help text appears

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS: 
       None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GREP, XTEXT
 CALLED BY:
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], EIS_ITOOL_PTOOL [1]
	EIS_ITOOL_PTOOL [2], IMAGE_TOOL_EVENT, IMAGE_TOOL_HLP, ITOOL_LIMBFITTER
	ITOOL_PTOOL, MAKE_AUTO_FIT, MAKE_MANUAL_FIT, MK_LIMBFIT_BS, MK_POINT_BASE
	UPDATE_FITLIMB
 COMMON BLOCKS:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       
 PREVIOUS HISTORY:
       Written May 12, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, May 12, 1995

 VERSION:
       Version 1, May 12, 1995


xstep_uevent [1] $SSW/gen/idl/genutil/xstep_uevent.pro
[Previous] [Next]
   Name: xstep_uevent
   
   Purpose: handle events in xstepper utility window 

   History: slf - 30-April-92

 CALLS: ***
	EVENT_NAME, GET_WUVALUE, mapx [1], mapx [2]
   Common Blocks:
      xstepper_blk


xstepper [1] $SSW/gen/idl/genutil/xstepper.pro
[Previous] [Next]
 NAME:  xstepper

 PURPOSE: Widget interface/ X-Windows data cube reviewer  

 INPUT PARAMETERS (positional):
     	cube - image or image cube
	info - strarray of image information         

 OPTIONAL INPUT PARAMETERS (keyword):
	title 	    - widget title (default=XSTEPPER)
	xsize/ysize - if present, rebin will be done  
       noscale     - if set, turns off tvscl 
	subscripts   - indices of images to display (default=all)
	interp      - if set, rebin uses interp (default=sample)
	start       - Index of starting image	
	info_array  - strarray of image info (for stepper compatibility)
		      may be passed as optional 2nd positional param
       ssout       - SubScripts (SS) defined via IMG->SSW

 Calling Sequence:
   xstepper,data [,info_array , xsize=xsize, ysize=ysize, /interp ,
		   ,start=start, /noscale]

 Button Layout:

 ------------------------------------------------------------------------
| QUIT | FWRD>> | <<BWRD | Movie | Freeze | AZoom-OFF | Wrap | XLOADCT   | 
 ------------------------------------------------------------------------
| HELP | IMG->SS | IMG->PIX | DATA->PIX | SS->PIX | RST-SS | RST-PIX     |   
 ------------------------------------------------------------------------
| Display:  <>DATA  <>DATA(SS)  <>PIXMAP    Title-Image: <> OFF          | 
 ------------------------------------------------------------------------

Button Description:

   --------------------------------------------------------------------------
   QUIT 	- exits xstepper
   FWRD>>	- steps forward 1 image (sets movie direction to forward)
   <<BWRD	- steps backward 1 image (sets movie direction to backward)
   Movie	- starts movie mode 
   Freeze	- stops movie mode
   AZoom-OFF   - toggles between Auto Zoom Off and Auto Zoom On modes
   Wrap        - toggles between wrap around and auto reverse modes 
   XLOADCT 	- runs XLOADCT
   --------------------------------------------------------------------------
   HELP	- displays text information about currently selected images
   IMG->SS	- places current image into SS vector and advances display
   IMG->PIX	- places current image in a pixmap 
   DATA->PIX   - places entire data array into pixmap array (memory caution)
   SS->PIX     - places DATA(SS) into pixmap array
   RST-SS	- Reset (initialize) SS vector
   RST-PIX     - Reset (initialize) PIXMAP array
   --------------------------------------------------------------------------
   Display:      (select from three categories of image display)
      DATA	- Original data cube
      DATA(SS) _ Subset of data cube ( Data(*,*,ss))
      PIXMAP   - Offscreen Pixmaps (allows fast frame rates on most machines)
   Title-Image:- Toggles On/Off information written to window area
   --------------------------------------------------------------------------

   Other Features:
      clicking on image automatically opens a second window and displays
      a zoomed copy of the current image - this second window allows selection
      of zoom factors - clicking on zoom window will hide it.  If the display
      selection is DATA or DATA(SS), then the zoom window may automatically 
      track (single step or movie mode) and auto zoom if AZoom-ON is chosen
      (auto zoom does not work while in PIXMAP display mode)
      Image information is displayed to the text portion of the widget
   

 CALLED BY:
	SDC_VERIFY, eit_fulldisk, lasteit
 Side Effects: widget(s) is displayed to X terminal

 CALLS: ***
	MAKE_STR [1], MAKE_STR [2], XMANAGER, XMENU2, XREGISTERED, def_font [1]
	def_font [2], mapx [1], mapx [2], update_image
 Common Blocks: 
      xstepper_blk     - (xstepper parameters, direction,rebin,etc)
      sda_draw_private - (utility window info (zoom, etc)


 Restrictions: - only one instance may be run at a time due to common

 HISTORY: S.L.Freeland -  30-Apr-92 (based on stepper/multi_draw (browse)
	   slf  5-Jun-92  (PIXMAP / SS features)
	   slf 18-Jun-92  (interface , wrap/autoreverse) 
	   slf 19-Oct-92  (documentation) 
          slf 22-Feb-93  (Version 3.0 mods, added backopt to common, cleanup)
	   slf 12-sep-93  (added curwind to common - xspr compatible)
	   slf 25-oct-93  (made internal slecected SS relative to input subscripts)
          slf 27-feb-97  (User Timer events instead of 'xbackregister'
                         (REQUIRED FOR IDL VERSION > 5.)
                         Combined several routines in "package"
          DMZ 20-Nov-97  Fixed XSIZE/YSIZE and removed a TEMPORARY
          SLF 15-Oct-98  - Clean up some documentation typos/format probs
                           Add Category list
          SLF 23-Oct-98  - Add SSOUT (return SS vector defined in xstepper)
          SLF  6-Nov-98  - made window scrollable and moved speed slider
                           above image (wont disappear on small displays)

 Category: 3D, DISPLAY, Image Cube, Widget , Movie, X Windows


XSTRUCT $SSW/gen/idl/widgets/xstruct.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XSTRUCT

 Purpose     : widget display of fields within an arbitrary structure

 Explanation :
               Arranges structures in a matrix format with the tag
               name in label widget and the tag value in a text widget.
               If wbase and wtags exist, then widget is just updated
               with input field values.

 Use         : xstruct,stc

 Inputs      : STC = structure name

 Opt. Inputs : None.

 Outputs     : None.

 Opt. Outputs: None.

 Keywords    :
               NX = # of columns by which to arrange widgets (def=2)
               WTAGS = text widget id's for each tag
               WBASE = parent widget base into which place structure
               GROUP = event id of widget that calls XSTRUCT
               JUST_REG = if set, then just register widget
               TITLE = optional widget title
               XOFF, YOFF = offset of structure base relative to calling widget
               EDITABLE = make fields editable
               ALL = generate events without return key
               XSIZE= text widget width [def = 10]
               RECUR = signals that XSTRUCT is being called recursively
               CENTER = center main base in screen (not relative to parent)
               NOFF = do not offset main base
               ACCEPT = name for accept button [def = commit]
               RETURN = force hitting return key to accept edits
               C_TAGS = array storing index of changed tags in structure

 Calls       : ***
	BOOST_ARRAY [1], BOOST_ARRAY [2], BOOST_ARRAY [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, GET_CALLER
	GET_CENT_OFF, GET_IJ, HAVE_WIDGETS [1], HAVE_WIDGETS [2], MK_DFONT, SAME_DATA [1]
	SAME_DATA [2], SELECT_WINDOWS, STR2ARR [1], STR2ARR [2], XALIVE, XKILL, XMANAGER
	XMANAGER_RESET, XMATRIX, XSHOW, XSTRUCT_EVENT, XTEXT_RESET, delvarx [5]
	rem_elem [1], rem_elem [2]
 CALLED BY:
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2]
	FRAME ABSTRACT CLASS DEFINITION, FRAMEWORK ABSTRACT CLASS DEFINITION
	GE_WINDOW [1], IMAGE_TOOL_EVENT, MK_CDS_PLAN, MK_STUDY, SHOW_RES_STC, ST_SUMER
	SUMER_GIF_IMA, SUMER_GIF_SPECTRUM, SUMER_HARCOPY_SPECTRUM, SUMER_TOOL_PD_EVENT
	XCAT, XLIST, XMATRIX, XSET_STRUCT, XSHOW_RASTER, XSTUDY
 Common      : XSTRUCT_COM

 Restrictions:
     Input must be a structure.
     Cannot yet safely handle arrays of structures or nested structures

 Side effects: None.

 Category    : Widgets

 Prev. Hist. : None.

 Written     : Zarro (ARC/GSFC) 20 August 1994

 Modified    :
   28-Jan-2001, Kim Tolbert, fixed bug  (modified line with j=ij(1) to j=ij(1)-1)
   21-Oct-2002, mimster@stars.gsfc.nasa.gov, String array modification and returns array of
     index of changed tags
   05-Aug-2004, Kim Tolbert, Sandhia Bansal, Two modifications:
                - alphabetize the list of parameter tags
                - use scroll bars when list is too long to fit the widget
 Version     : 3


XSTRUCT_BUTTONS $SSW/gen/idl/widgets/xstruct_buttons.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XSTRUCT_BUTTONS

 Purpose     : Create buttons and title for xstruct program

 Explanation : Creates "Cancel" and "Commit" buttons.  Also, places the
               title received as one of the arguments.

 Use         : xstruct_buttons, wbase

 Inputs      : WBASE = widget base to place the buttons in

 Opt. Inputs : None.

 Outputs     : None.

 Opt. Outputs: None.

 Keywords    :
               EDITABLE = make fields editable
               ACCEPT = name for accept button [def = commit]
               TITLE = optional widget title

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], TRIM
 CALLED BY:
	XMATRIX
 Common      : --

 Restrictions: --

 Side effects: None.

 Category    : Widgets

 Prev. Hist. : None.

 Written     : Zarro (ARC/GSFC) 20 August 1994

 Modified    :
   06-Aug-2004, Sandhia Bansal, Took this piece of code out of xstruct and made it into
                                a separate procedure.
     index of changed tags
 Version     : 1


XTEXT $SSW/gen/idl/widgets/xtext.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       XTEXT

 PURPOSE:
       Text display widget with searching capability

 CATEGORY:
       Utility, Widgets

 SYNTAX:
       xtext, array

 CALLS: ***
	ALLOW_WINDOWS, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1]
	DATATYPE [2], DATATYPE [3], DETABIFY [1], DETABIFY [2], DETABIFY [3], DPRINT, EXIST
	FREE_POINTER, GET_CALLER, GET_HANDLER_ID, GET_POINTER, IDL_RELEASE, MAKE_POINTER
	MK_DFONT, NUM_CHK, REP_TAG_VALUE, SET_POINTER, STR2FILE, XACK, XALIVE, XHOUR, XINPUT
	XKILL, XMANAGER_RESET, XMENU [1], XMENU [2], XPRINT [1], XPRINT [2], XPRINT [3]
	XPRINT [4], XPRINT [5], XREALIZE, XSHOW, XTEXT_CLEANUP, XTEXT_EVENT, XTEXT_RESET
	concat_dir [4]
 CALLED BY:
	CDS_PLAN_BRIEF, EIS_CAT [1], EIS_CAT [2], EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], FREEZE_RAS_DUR, FTP__DEFINE, HESSI, IMAGE_TOOL_EVENT
	MK_CDS_PLAN, MK_SOHO, MK_STUDY, RDWRT_BUFF, SCANPATH, SHOW_SYNOP__DEFINE, ST_SUMER
	XCAMP, XCAT, XCDS_ANALYSIS, XCDS_COSMIC, XCPT, XCROP_CUBE, XCR_REMOVE, XDIFF
	XGET_SYNOPTIC, XIAP, XMAIL, XPLOTSCALE, XPORT, XPRINT [2], XPRINT [5], XRECORDER
	XREPORT_EDIT, XSHOW_HELP, XSTUDY, XTKI, plotman
 EXAMPleS:
       Useful as a pop up text widget.

           xtext,'some text',/just_reg, wbase=wbase, group=event.top
             ...some processing..
           xkill, wbase

       This example will pop a text window that will exist during
       processing, after which it is destroyed by kill

 INPUTS:
       ARRAY - string array to display

 KEYWORDS:
       GROUP       - group leader of text widget parent
       FONT        - font for text widget
       TITLE       - title for text widget parent
       SPACE       - number of lines to space text
       JUST_REG    - just_reg
       WBASE       - base widget id
       XOFF,YOFF   - pixel offset relative to caller
       WAIT        - secs to wait before killing widget
       INSTRUCT    - instruction label for exit button [def = Dismiss]
       XSIZE,YSIZE - X-Y sizes for text widget
       APPEND      - append to existing text
       NO_PRINT, NO_SAVE, NO_FIND - inhibit SAVE, PRINT, and FIND buttons
       SCREEN      - center wrt to screen
       CENTER      - center wrt to GROUP (if alive)
       HOUR        - present hourglass
       NEXT        - set to present a "NEXT" button (useful for
                     running XTEXT multiple times in a loop
       STATUS      - returned as 1 if NEXT button was pressed

 HISTORY:
       Version 1, August 20, 1994, D. M. Zarro,  GSFC/ARC. Written
       Version 2, August 25, 1995, Liyun Wang, GSFC/ARC
          Added the capability of search string
       Version 3, September 1, 1995, Liyun Wang, GSFC/ARC
          Added buttons to go top, bottom, or a specific line
          Fixed the bug that caused X windows protocol error for bad font
       Version 4, April 12, 1996, Liyun Wang, GSFC/ARC
          Set scrolling properly based on the array passed in
       Version 5, April 19, 1996, Liyun Wang, GSFC/ARC
          Added "Save to File" option to allow saving displayed
             string array into a file
       Version 6, February 4, 1997, Liyun Wang, NASA/GSFC
          Highlight the line been reached via GoTo Line option
       Modified, 27-Aug-05, Zarro (L-3Com/GSFC) - added XHOUR call

 CONTACT:
       Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)


XTEXT_RESET $SSW/gen/idl/widgets/xtext_reset.pro
[Previous] [Next]
 Name        : XTEXT_RESET

 Purpose     : Reset widget text fields

 Category    : widgets

 Explanation : initializes cursor position in a text widget

 Syntax      : IDL> xtext_reset,info

 Inputs      : INFO = text widget ID or structure with ID as tags

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], XTEXT_RESET_ID
 CALLED BY:
	GE_WINDOW_SIM, IMAGE_TOOL_EVENT, MK_STUDY, SCANPATH, SHOW_SYNOP__DEFINE, XCAMP, XCAT
	XCPT, XGET_UTC, XIAP, XINPUT, XPORT, XPROGRAM_ADD, XPS_SETUP, XREPORT, XREPORT_EDIT
	XSEL_LIST [1], XSEL_LIST [2], XSTRUCT, XSTUDY, XTEXT, XZOOM_PLAN
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Version 1,  12 Feb 1997,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XTEXT_RESET_ID $SSW/gen/idl/widgets/xtext_reset_id.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XTEXT_RESET_ID

 Purpose     : Reset widget text fields

 Category    : widgets

 Explanation : initializes cursor position in a text widget

 Syntax      : IDL> xtext_reset_id,id

 Inputs      : ID = text widget id 

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, WIDG_TYPE, XALIVE
 CALLED BY:
	XTEXT_RESET
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Version 1,  12 Feb 1997,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XTEXTEDIT $SSW/gen/idl/widgets/xtextedit.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XTEXTEDIT

 Purpose     : Simple widget text editor

 Explanation : Simple editing of multi-line texts in widget programs

               May also be used to send the text to any widget at the press
               of a button (through the WIDGET_CONTROL,SET_VALUE mechanism)
               by supplying the widget ID through the keyword SETV_ID. In
               that case, you should also supply SETV_TEXT, which is the text
               to be used on the "send" button.

 Use         : XTEXTEDIT,TEXT

 Inputs      : TEXT : The original text, may be modified by the user.

 Opt. Inputs : None.

 Outputs     : TEXT : Modified by user

 Opt. Outputs: None

 Keywords    : GROUP : Group leader
               XSIZE,YSIZE : Size of text window, in characters

               EXPLANATION : Text explaining the user what goes on..

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DEFAULT, GET_DFONT [1], GET_DFONT [2]
	XALIVE, XMANAGER, XTEXTEDIT_EVENT
 CALLED BY:
	XCFIT_BLOCK
 Common      : None

 Restrictions: ...

 Side effects: ...

 Category    : Widgets, text

 Prev. Hist. : Needed it for XCFIT_BLOCK

 Written     : SVH Haugan, UiO, 10 October 1997

 Modified    : Not yet.

 Version     : 1,  10 October 1997
   14-Nov-2006, Kim Tolbert. Modal is obsolete on xmanager now.  Call
     widget_base with /modal instead.  This requires a group leader, so if
     none is passed in, create a dummy group leader, and then destroy it at end.
     (Side effect of the way it was, is that any desensitized widgets are
     resensitized when this exits, which shouldn't happen.)


XTV $SSW/gen/idl/display/xtv.pro
[Previous] [Next]
 NAME:
	XTV
 PURPOSE:
	This application is designed to display IDL arrays as images. XTV
	allows the user to view the image at any resolution and read off
	x and y coordinates. It is hoped that this will be very useful for
	studying morphology and enabling precise coalignment of astronomical
	images. Special effort has been made to accommodate large images
	efficiently and without relying on the server or IDL for backing store.
	A region of interest can be selected and passed to another program
	by pressing the ROI button (coordinates are passed through the 
	XTV_ENVIRONMENT common block).
 CATEGORY:
	Widgets
 CALLING SEQUENCE:
	XTV, image_raw [, /D]
 INPUTS:
	image_raw = an IDL 2d array of almost any size. May be of type byte,
		integer, longword, floating, or double.
 OPTIONAL INPUT PARAMETERS:
	none.
 KEYWORD PARAMETERS:
	GROUP = The widget ID of the widget that calls XTV.  When this
		ID is specified, a death of the caller results in a death of
		XTV.
	D = 	Deallocate. If D is defined, then the image_raw 
		array will be destroyed in order to conserve memory. When XTV
		exits, image_raw will be replaced by a copy from the 
		XTV_ENVIRONMENT common block.
	screenwidth = width of display widget, in pixels.
	screenheight = height of display widget, in pixels.
 OUTPUTS:
	none
 OPTIONAL OUTPUT PARAMETERS:
	none
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], SELECT_BOX, TVLASER, XLOADCT [1], XLOADCT [2]
	XLOADCT [3], XMANAGER, XMANAGERTOOL, XPALETTE, XPDMENU, XREGISTERED, XTV_CURSOR
	XTV_EV, XTV_REDRAW
 CALLED BY:
	TRACE_AECSIM, trace_knoise
 COMMON BLOCKS:
   COMMON XTV_ENVIRONMENT, image, $	;a copy of the image
	i_width, i_height,	$	;size of image
	d_width, d_height,	$	;size of draw widget
	xsp, ysp, 		$	;position of scoll bars
	draw_index,		$	;window index of draw widget
	x_scroll, y_scroll,	$	;scroll bars
	xylabel,		$	;cursor position label
	new_d_width,		$	;magnification = d_width/new_d_width
	roi				;region of interest coord's [x1,x2,y1,y2]
	This common block allows me to handle redraws.
 SIDE EFFECTS:
	Initiates the XManager if it is not already running.
 RESTRICTIONS:
	Only one copy of XTV is allowed to run at a time, because otherwise the
	common blocks would intersect. In a future version, I plan to cleverly
	get around this problem.
 PROCEDURE:
	Create and register the widget, draw the image, and manually hook up
	sliders to act as scroll bars, with redraws provided by the event
	handler. Neither the server nor IDL is capable of providing backing
	store, so redraws are handled explicitly. Woof.
 MODIFICATION HISTORY:
	Created by Charles Kankelborg, October 1993.
	Modified to keep full image depth and tvscl with each display, so
	  that the pixel value can be displayed with the coordinates. cck 5/97
	Added region of interest selection. cck 6/9/97


XTVSCALE $SSW/gen/idl/display/xtvscale.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XTVSCALE
               
 Purpose     : A widget interface to control image scaling methods
               
 Explanation : An XTVSCALE object contains a description of how intensities
               in an image are to be converted into color values for TV'ing.

               Creating an XTVSCALE object is done by calling XTVSCALE
               without any parameters. The XTVSCALE ID is returned.

               In order to scale an image according to the current status of
               the scaling object, call XTVSCALE with two parameters: the ID
               and the image to be scaled. The scaled image (a byte array)
               will be returned.

               The XTVSCALE object may or may not be visible on the screen.
               You can always force an XTVSCALE object to become visible
               by using
               
                   dummy = xtvscale(xtvscale_id,/map,/show,iconify=0)

               Making the XTVSCALE object invisible is done by e.g.,

                   dummy = xtvscale(xtvscale_id,map=0) 

               (or by setting /iconify, or setting show=0).
               
               If the XTVSCALE object is visible, the user may alter the
               method used to scale images. The next time the display program
               uses XTVSCALE, the new status will be reflected in the scaling
               of the image. If the display program wishes to be informed
               about a change in the scaling object right away, it should
               inform xtvscale about it the following  way:

               1. Create a (usually unmapped) widget_base somewhere in the
               display program widget hierarchy.

               2. Supply the widget ID of this base to XTVSCALE through the
               keyword SIGNAL, either when creating XTVSCALE, or at some
               later time. If you're supplying it after the creation, you'll
               need to specify the xtvscale ID as a parameter, e.g.,

                     dummy = xtvscale(xtvscale_id,signal=base)

               3. When the XTVSCALE object is altered by the user, an event
               is generated and sent to the widget id's that have been hooked
               up through the SIGNAL keyword. The event structure,
               {XTVSCALE_EVENT}, contains the following tags:

               ID         : The ID of the SIGNAL base (NOT the xtvscale ID).
               HANDLER    : The ID of the event handling base.
               TOP        : The ID of the topmost base in the hierarchy.
               XTVSCALE_ID: The XTVSCALE ID

               
 Use         : XTVSCALE_ID = XTVSCALE()
    
 Inputs      : None reqired.
               
 Opt. Inputs : XTVSCALE_ID : The ID of the XTVSCALE object be used/modified.

               IMAGE : (Only as parameter number 2, after XTVSCALE_ID)
                       The image to be scaled into TV values.
                       
 Outputs     : Returns the XTVSCALE_ID of the new scaling object when called
               without any parameters.

               Returns the scaled image if called with XTVSCALE_ID and IMAGE.

               Returns 0 on successful completion, nonzero on failure in
               other cases.
               
 Opt. Outputs: None.
               
 Keywords    : TITLE : A title string to be displayed above the scaling
                       program.

               EXPERT : Set to 1 to start XTVSCALE in expert mode.
               
               MISSING : The value of missing data.

               COMP_MISSING : Comparison method for missing data:
               
                   -1 : Values less than/equal to MISSING treated as missing
                    0 : Values exactly matching MISSING treated as missing
                    1 : Values greater than or equal to MISSING treated as
                        missing.
               
               COLOR_MISSING : The color to give missing pixels.

               AUTO_MISSING : 1 means pass only good pixels to the the
                              scaling program.

               PROGRAM : An array of strings that make up the scaling
                         program. No multi-line statements or blocks.
                         The program should convert the array DATA from
                         intensity values to color values (byte).

               SIGNAL : The widget ID(s) of those to be informed about
                        changes to the scaling object.

               DESTROY : Set this keyword to destroy the scaling object.

               XOFFSET,
               YOFFSET : The x/y offset of the widget showing the
                         status of the scaling object.

               GROUP_LEADER : The widget ID of the group leader.

               ICONIFY : Set to 1 to make the widget showing the status
                         become iconified. Set to 0 to de-iconify.

               MAP : Set to 1 to make the widget visible. Set to 0 to make it
                     invisible

               SHOW : Set to 1 to raise the widget on top of any other
                      window. Set to 0 to hide it behind all other windows.

 Calls       : ***
	AVERAGE, BSCALE, CDS_CLEAN_IMAGE, CW_FIELD, CW_LOADCT, CW_PSELECT, DEFAULT
	HANDLE_KILLER_HOOKUP, PARCHECK, SIGRANGE [1], SIGRANGE [2], TRIM, TYP, XALIVE, XLOAD
	XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER, XPALETTE, XTVSCALE_EVENT
	XTVSCALE_NOVICE, XTVSCALE_NOVICEBASE, XTVSCALE_SCALE, XTVSCALE_SCALE_CAPSULE
	XTVSCALE_TEXT, XTVSCALE_XPERTBASE
 CALLED BY:
	CWQ_DSPWAV [1], CW_CUBEVEIW, CW_PZOOM [1], DSP_WAV, XCR_REMOVE, cw_pzoom [2]
	cwq_dspwav [2]
 Common      : None.
               
 Restrictions: The user has to press enter to make program changes effective.
               
 Side effects: None known.
               
 Category    : Utility, Image
               
 Prev. Hist. : None.

 Written     : Stein Vidar H. Haugan, UiO, 13 June 1996
               (s.v.h.haugan@astro.uio.no)
               
 Modified    : Version 2, SVHH, 14 June 1996
                       Added NOVICE mode, made it default.
               Version 3, SVHH, 16 June 1996
                       Made send_event structure become named.
               Version 4, SVHH, 20 June 1996
                       Fixed a bug in handling the Exponential/Logarithmic
                       buttons.
               Version 5. SVHH, 2 August 1996
                       Started using HANDLE_KILLER_HOOKUP for automatic
                       handle freeing.
               Version 6, SVHH, 22 August 1996
                       Fixed logarithmic scaling problem with min/max values.
                       Added a CW_LOADCT widget.
               Version 7, SVHH, 4 December 1996
                       Allowing color_missing <> 0 in novice mode.
                       Negative/zero values are no longer marked missing in
                       logarithmic scaling, but replaced with min(data gt 0)
               Version 8, SVHH, 11 March 1998
                       Fixed fatal bug when NMIN == NMAX in BSCALE call
		Version 9, William Thompson, GSFC, 8 April 1998
			Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays

 Version     : Version 9, 8 April 1998


XUPDATE $SSW/gen/idl/widgets/xupdate.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XUPDATE
               
 Purpose     : Hassle-free (hopefully) widget_control,id,update=0/1 
               
 Explanation : IDL v 5.0 (and 5.0.2) has some weird idea about how to handle
               update on/off on widgets, causing e.g., bases to "blank out"
               parts that have been added to them after they were first
               realized (as in e.g. XCFIT).

               This is an attempt to rectify that behaviour.

               The intended mode of use is e.g.,


               XUPDATE, ID, 0

               <Do updates, and call routines that may modify children of ID>

               XUPDATE, ID, 1

               The idea is that whenever a *parent* widget has been frozen,
               xupdate will have no effect, hopefully avoiding any clashes.

               This is achieved by checking the status of the widget at the
               time of the FREEZE operation. If UPDATE is 0 for the widget
               that's being frozen, *nothing* will happen during the freeze
               operation, and the widget ID is noted, so that the subsequent
               THAW operation is also nulled (leaving the UPDATE status to be
               controlled by the parent hierarchy).

               And of course, if it's before IDL v 4.0.1, no action will ever
               be taken....
               
 Use         : See above.
    
 Inputs      : Widget ID.
 
 Opt. Inputs : None.
               
 Outputs     : None.
               
 Opt. Outputs: None.
               
 Keywords    : None.
 
 Calls       : ***
	SINCE_VERSION [1], SINCE_VERSION [2]
 CALLED BY:
	CWF_COMPONENT, CWF_FIT, CW_FLIPSWITCH, XCDS_ANALYSIS, XCFIT
 Common      : XUPDATE_STATUS_COMMON
               
 Restrictions: ...
               
 Side effects: ...who knows, probably several when the next IDL version comes
               out :-( ...
               
 Category    : Widgets
               
 Prev. Hist. : Lots of wasted time.

 Written     : Stein V. H. Haugan, 15 September 1997
               
 Modified    : Not yet.

 Version     : 1, 15 September 1997


XVALID $SSW/gen/idl/widgets/xvalid.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       XVALID()

 PURPOSE:
       Determine if a named widget is registered with XMANAGER

 CATEGORY:
       Utility

 EXPLANATION:
       This is a widget utility program similar to xregistered (it is
       actually modified from xregistered). It does one more thing
       than xregistered: it returns the ID of the named widget as an
       optional output keyword parameter. XREGISTERED should have had
       this ID keyword (suggestion has been sent to RSI by LYW).

 SYNTAX:
       Result = xvalid(name)

 CALLED BY:
	MK_PLAN_SEND, ST_MK_UDP_STC
 EXAMPLES:
       IF xvalid('image_tool', id=parent) THEN ...

 INPUTS:
       NAME - String, name of the widget program

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       RESULT - Integer with a value of 1 or 0, indicating if the
                named widget is registered with XMANAGER

 OPTIONAL OUTPUTS:
       ID     - ID of the top level widget which is registered with
                XMANAGER. If the named widget is not registered with
                XMANAGER, a -1 will be returned.

 KEYWORDS:
	NOSHOW - If the widget in question is registered, it is brought
		 to the front of all the other windows by default.  Set this
		 keyword to keep the widget from being brought to the front.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], XMANAGER_COM
 COMMON:
       MANAGED (defined in XMANAGER and XREGISTERED)

 RESTRICTIONS:
       XMANAGER and/or XREGISTERED must be called prior to calling
       this routine to establish the MANAGED common block.

 SIDE EFFECTS:
       The named widget is brought to foreground id NOSHOW keyword is
       not set.

 HISTORY:
       Version 1, January 4, 1996, Liyun Wang, GSFC/ARC. Modified
          from XREGISTERED
       Version 2, August 14, 1996, Zarro, GSFC -- added XMANAGER call

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


XVALIDATE $SSW/gen/idl/widgets/xvalidate.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XVALIDATE

 Purpose     : validates widget time strings

 Category    : operations, widgets

 Explanation :

 Syntax      : IDL> good=xvalidate(info,event)

 Inputs      : EVENT = event id of widget program calling XVALIDATE
               INFO = structure with tags:
               .WOPS1 - id of start time text widget
               .WOPS2 - id of end time text widget
               .OPS1  - current value of start time
               .OPS2  - current value of end time


 Opt. Inputs : None

 Outputs     : GOOD = 1 if input times are valid (i.e, no weird
               characters, and START time before END time)

 Opt. Outputs: None

 Keywords    : TRIM = # of characters to trim time string by
             : TIME_CHANGE = 1 if time changed in either widget
             : BYTAG = look for hardwired tagnames, otherwise assume
                WOPS1, WOPS, OPS1, and OPS2 occupy tags 0,1,2,3
             : DIFF = check that start/stop times are different
             : DATE = print date only

 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], EXIST, ROUND_TIME, XACK
 CALLED BY:
	XCAMP, XCAT, XCPT, XIAP, XPORT, XREPORT, XZOOM_PLAN
 History     : Version 1,  21-Feb-1995,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


XWIDUMP $SSW/gen/idl/widgets/xwidump.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : XWIDUMP
               
 Purpose     : Dump (or return) full contents of a widget hierarchy 
               
 Explanation : Produces a recursive listing of the contents of a widget
               hierarchy.
               
 Use         : XWIDUMP,BASE [,TEXT,ID]
    
 Inputs      : BASE : The base of the widget hierarchy to be examined.
 
 Opt. Inputs : None. 
               
 Outputs     : TEXT : Text array containing a description of the widget
                      hierarchy.

               ID : Array of the widget IDs corresponding to TEXT
               
 Opt. Outputs: None.
               
 Keywords    : NO_TEXT : Set to skip text generation..

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DEFAULT, TRIM, XWIDUMP_TEXT
 CALLED BY:
	CW_INFILTRATE, XRECORDER, plotman
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Widget tools
               
 Prev. Hist. : None.

 Written     : Stein Vidar Haugan, UiO, March 1997
               
 Modified    : Not yet.

 Version     : 1, 13 May 1997


XWIN [1] $SSW/gen/idl/display/xwin.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : XWIN

 Purpose     : Switch to X-windows mode.

 Explanation : SETPLOT is called to save and set the system variables.

 Use         : XWIN

 Inputs      : None.

 Opt. Inputs : None.

 Outputs     : A message is printed to the screen.

 Opt. Outputs: None.

 Keywords    : None.

 Calls       : ***
	SETPLOT [1], SETPLOT [2]
 CALLED BY:
	GET_OFF2, RIG_AL
 Common      : None.  But calls SETPLOT, which uses common block PLOTFILE.

 Restrictions: It is best if the routines TEK, REGIS, etc. (i.e.  those
		routines that use SETPLOT) are used to change the plotting
		device.

		In general, the SERTS graphics devices routines use the special
		system variables !BCOLOR and !ASPECT.  These system variables
		are defined in the procedure DEVICELIB.  It is suggested that
		the command DEVICELIB be placed in the user's IDL_STARTUP file.

 Side effects: If not the first time this routine is called, then system
		variables that affect plotting are reset to previous values.

 Category    : Utilities, Devices.

 Prev. Hist. : William Thompson

 Written     : William Thompson, GSFC.

 Modified    : Version 1, William Thompson, GSFC, 27 April 1993.
			Incorporated into CDS library.
		Version 2, William Thompson, GSFC, 21 October 1993.
			Renamed to XWIN.

 Version     : Version 2, 21 October 1993.


XY0 [1] $SSW/gen/idl/fund_lib/sdac/xy0.pro
[Previous] [Next]
 Project     : SDAC
                   
 Name        : XY0
               
 Purpose     : This procedure resets the x and y axes defaults.
               
 Category    : GRAPHICS
               
 Explanation : XY0 sets input x axis range and y axis range to [0,0] for autoscaling.

 Use         : XY0
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : 

 Calls       :
 Common      : None
               
 Restrictions: 
               
 Side effects: None.
               
 Prev. Hist  : akt, 1989

 Modified    : 
	richard.schwartz@gsfc.nasa.gov


XY2AD $SSW/gen/idl_libs/astron/astrom/xy2ad.pro
[Previous] [Next]
 NAME:
     XY2AD

 PURPOSE:
     Compute R.A. and Dec from X and Y and a FITS astrometry structure
 EXPLANATION:
     The astrometry structure must first be extracted by EXTAST from a FITS
     header.   The offset from the reference pixel is computed and the CD 
     matrix is applied.     Of distortion is present then this is corrected.
     If a WCS projection (Calabretta & Greisen 2002, A&A, 395, 1077) is 
     present, then the procedure WCSXY2SPH is used to compute astronomical
     coordinates.    Angles are returned in  degrees.
   
     XY2AD is meant to be used internal to other procedures.  
     For interactive purposes use XYAD.

 CALLING SEQUENCE:
     XY2AD, x, y, astr, a, d   

 INPUTS:
     X     - row position in pixels, scalar or vector
     Y     - column position in pixels, scalar or vector
           X and Y should be in the standard IDL convention (first pixel is
           0), and not the FITS convention (first pixel is 1). 
     ASTR - astrometry structure, output from EXTAST procedure containing:
        .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 reference pixel
        .CRPIX - 2 element vector giving X and Y coordinates of reference pixel
               (def = NAXIS/2)
        .CRVAL - 2 element vector giving R.A. and DEC of reference pixel 
               in DEGREES
        .CTYPE - 2 element vector giving projection types 
        .LONGPOLE - scalar longitude of north pole
        .LATPOLE - scalar giving native latitude of the celestial pole
        .PV2 - Vector of projection parameter associated with latitude axis
             PV2 will have up to 21 elements for the ZPN projection, up to 3
             for the SIN projection and no more than 2 for any other
             projection
        .DISTORT - Optional substructure specifying distortion parameters
                  

 OUTPUT:
     A - R.A. in DEGREES, same number of elements as X and Y
     D - Dec. in DEGREES, same number of elements as X and Y

 CALLS: ***
	TAG_EXIST [1], TAG_EXIST [2], WCSXY2SPH
 CALLED BY:
	ATV, CURVAL, HASTROM, IMCONTOUR, IMDBASE, XYXY
 RESTRICTIONS:
       Note that all angles are in degrees, including CD and CRVAL
       Also note that the CRPIX keyword assumes an FORTRAN type
       array beginning at (1,1), while X and Y give the IDL position
       beginning at (0,0).   No parameter checking is performed.

 NOTES:
      AD2XY tests for presence of WCS coordinates by the presence of a dash 
      in the 5th character position in the value of CTYPE (e.g 'DEC--SIN').       
 PROCEDURES USED:
       TAG_EXIST(), WCSXY2SPH
 REVISION HISTORY:
       Written by R. Cornett, SASC Tech., 4/7/86
       Converted to IDL by B. Boothman, SASC Tech., 4/21/86
       Perform CD  multiplication in degrees  W. Landsman   Dec 1994
       Converted to IDL V5.0   W. Landsman   September 1997
       Understand reversed X,Y (X-Dec, Y-RA) axes,   W. Landsman  October 1998
       Consistent conversion between CROTA and CD matrix W. Landsman Oct. 2000
       No special case for tangent projection W. Landsman June 2003
       Work for non-WCS coordinate transformations W. Landsman Oct 2004


XY2HEL $SSW/gen/idl/solar/xy2hel.pro
[Previous] [Next]
 Project     : HESSI

 Name        : XY2HEL

 Purpose     : convert heliocentric to heliographic coords 

 Category    : synoptic

 Syntax      : IDL> coords=xy2hel(value,date=date)

 Inputs      : XCEN,YCEN (arcsecs)

 Outputs     : COORDS, e.g. S21, W21

 Keywords    : DATE = pertinent date

 CALLS: ***
	ARCMIN2HEL
 CALLED BY:
	TRACE_GBO
 History     : 19-Apr-2003, D.M. Zarro (EER/GSFC),  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


xy2lonlat $SSW/gen/idl/solar/xy2lonlat.pro
[Previous] [Next]
FUNCTION xy2lonlat, ang, date0, arcmin=arcmin, b0=b0in, radius=sunrin
 NAME:
        xy2lonlat
 PURPOSE:
          Converts arcsec-from-suncenter coordinates to heliographic
	   coordinates (inverse of latlon2xy).
 METHOD:  
 CALLING SEQUENCE:  
 INPUT:
	ang	- is a vector of angles from sun center in default units of
		  arcseconds.  It should be 2xN.
			(0,*) = angle in E/W direction with W positive
			(1,*) = angle in N/S direction with N positive
	date	- Unless the date is supplied, today's date is used.
		  This will affect the Solar axial tilt, B0.  If the B0 
                 and radius keywords are set, then date is ignored and 
                 need not be passed in.
 OUTPUT:
	lonlat  - Heliographic coordinates in decimal degrees.
                       (0,*) = longitude (degrees) W positive
                       (1,*) = latitude (degrees) N positive
		  If the input coordinates are off the solar limb, 
		  the output is the radial projection back to the nearest 
		  point on the limb.
		  Output is DOUBLE)
 CALLS: ***
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], get_rb0p [1]
	get_rb0p [2]
 CALLED BY:
	MK_MDI_MAP_EARTH, MK_SOHO_MAP_EARTH, TRACE_ALIGN_CUBE, TRACE_CUBE_POINTING
	TRACE_MDI_ALIGN
 OPTIONAL KEYWORD INPUT:
       b0 = the B0 angle in radians
       radius = the solar radius in arc seconds.
	arcmin	- when set the input is in arcminutes.
 OPTIONAL KEYWORD OUTPUT:
 CAUTIONS:    - Points off the limb are projected back to the limb.
              - The x and y are in solar coordinates (solar W and solar N).
                There is no P-angle here.
 HISTORY:
     T. Metcalf 2001-Oct-17  This is an exact replacement for conv_a2h which
                             is only approximate.
     T. Metcalf 2001-Oct-18  Use atan to find the longitude
     T. Metcalf 2002-Apr-03  Added B0 and radius keywords.
     T. Metcalf 2002-Apr-08  Added test for asin out of range.  Changed
                             anytim2ints call to anytim call to avoid
                             time format confusions.
     T. Metcalf 2005-Mar-11  When date is to be ignored, never use it.


xy_dist $SSW/gen/idl/util/xy_dist.pro
[Previous] [Next]
 Name: xy_dist

 Purpose: Calculate distance between points

 Project:  HESSI

 Calling Sequence:
	result = xy_dist (p0, p)

 Input arguments:
	p0 - x,y coordinates of starting point
	p - x, y values of points to find distance from p0.  Can be (2) or (2,n)

 Output:
	Result is distance between p0 and p (scalar or vector depending on p)

 Written: Kim Tolbert, 19-Mar-2002
 Modifications:

 CALLED BY
	FIND_EDGE_INTERCEPT


xy_raster [1] $SSW/gen/idl/display/xy_raster.pro
[Previous] [Next]
 NAME: xy_raster

 PURPOSE: Generate a raster pattern of time series images

 CALLING SEQUENCE:
	xy_raster, index, data
	xy_raster, index, data, 3, ss=ss, /individual_scale
	xy_raster, index, data, 0.5, /notimes, /noscale

 INPUTS:
	index	- The index structure (containg Yohkoh or SSW style times)
	data	- The data array      

 OPTIONAL INPUTS:
	factor	- The rebin factor (factor = 2 to double the size).  The
		  default is same size (=1)

 OPTIONAL KEYWORD INPUTS:
	noscale	- If set, do not scale the data cube (use TV 
		  instead of TVSCL)
		  Default is to auto scale on the whole cube, so that
		  the intensities relative to each image is maintained.
	individual_scale - If set, then use TVSCL on each individual image.
		  Default is to auto scale on the whole cube, so that
		  the intensities relative to each image is maintained.
	ss	- A list of the subscripts of the images to display
	notimes	- If set, then do not display the times
	xsiz	- The xsize of the window (default = 800).  This is only
		  used if the data cube requires multiple pages
	ysiz	- The ysize of the window (default = 800).  This is only
		  used if the data cube requires multiple pages.  If 
		  xsiz is specified, and ysiz is not, then xsiz is used.
	charsize- The character size for the time label

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], data_type [1], data_type [2], gt_time [1]
	gt_time [2]
 HISTORY:
	HSH, written some time in early 1992
	HSH, May 3, 1992, modified to handle odd-size images and 
	  to trap obese windows
	MDM,  3-Sep-93, Modified to calculate number of panels properly
	MDM, 20-Dec-93	- Modified significantly, more robust
			- Reverse data,index calling sequence
	MDM,  2-Sep-94  - Added conditional on when to print statement
			  "XY_RASTER: Cube will not fit on one page...."
	MDM,  6-Sep-94  - Corrected error which would not all "SS"
			  option to work.
       SLF,  2-may-97  - remove SXT references (any SSW index,data ok)
	William Thompson, GSFC, 8 April 1998
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays


xycrange [1] $SSW/gen/idl/display/xycrange.pro
[Previous] [Next]
 NAME:
       xycrange
 PURPOSE:
       get x and y ranges using cursors
 CALLING SEQUENCE:
       xycrange,xrange,yrange
 OUTPUTS:
       xrange= [x1,x2] = first and second x-values selected
       yrange= [y1,y2] = first and second y-values selected
 PROCEDURE:
       uses CURSOR
 HISTORY:
       Written Mar'93 (DMZ,ARC)


XYCURSOR $SSW/gen/idl/display/xycursor.pro
[Previous] [Next]
 Name:

      XYCURSOR

 Purpose:

      Full-sized cross-hair cursor in a plot window

 Category:

      Plot

 Calling sequence:

      XYCURSOR, X, Y [ , BUTTON=button , ALT_CURSOR=alt_cursor , 
                       /DATA , /NORMAL , /DEVICE , /PRINT , /NO_LF , 
                       ... other PLOTS keywords ... ]

 Input:

      None

 Keyword parameters:

      BUTTON: 1=left button; 2=middle button; 4=right button
      DATA:    (0/1=def) set this keyword to get data coordinates (default)
      NORMAL:  (0=def/1) set this keyword to get normalized coordinates 
      DEVICE:  (0=def/1) set this keyword to get device coordinates 
      ALT_CURSOR: controls appearance of cursor
      PRINT:   (0=def/1) print current coordinates?
      NO_LF:   (0=def/1) Line feed before returning? (Only if kwd PRINT is set)
      In addition: 
        all keyword accepted by PLOTS

 Output:

      X : cursor's latest abscissa
      Y : cursor's latest ordinate

 CALLED BY:
	PLOT_ZOOM
 Common blocks:

      None

 Calls:
	- All keywords valid for PLOTS are also accepted.
	- By default (X Windows only)
	- Exits when any mouse button is pressed; returns to caller as soon
	- If requested
	- Plots a cross-hair cursor spanning the entire X- and Y-range of an
	- Returns the coordinates of the cursor at the time the button was
	CONVERT_COORD, CURSOR, Description:
	Initial position is at center of plot window., PLOTS
	Setting keyword ALT_CURSOR explicitly to 0 can prevent that; non-zero
	TVCRS, as the button is released., as well as an integer
	current cursor shape is masked out., device
	existing plot (with /NOCLIP: cross-hair spans the full screen).
	from !MOUSE.BUTTON). Coordinates can be data (the default), or normalized.
	pressed (not at the time it was released)
	prints the current cursor coordinates.
	specifying which button was pressed (keyword BUTTON, taken directly
	values specify other cursor shapes (device dependent).
 Side effects:

      This routine temporarily changes some device settings using the 
      following DEVICE keywords:

        GET_GRAPHICS_FUNCTION
        SET_GRAPHICS_FUNCTION
        CURSOR_IMAGE (X-windows only and if ALT_CURSOR is undefined)
        CURSOR_STANDARD (if ALT_CURSOR is defined and NE 0)
        CURSOR_CROSSHAIR (unless ALT_CURSOR is defined and EQ 0)

      Before exiting, this routine resets the device to its initial graphic 
      function and (unless ALT_CURSOR EQ 0) to the default cross-hair cursor. 
      Should an unexpected error occur, the routine also tries to return the 
      device to its original state. In case that too would fail, reset 
      the device as follow:

         DEVICE,SET_GRAPHICS_FUNCTION=3 ; or whatever it was before
         DEVICE,/CURSOR_CROSSHAIR       ; usually the default for X Windows
      or
         DEVICE,CURSOR_STANDARD=n       ; n=predefined index of cursor image

      The latter might be necessary if a non-standard cursor was defined 
      before calling XYCURSOR. 
      See also IDL documentation on 'Keywords for DEVICE Procedure'.

 Restrictions and notes:

      - Do not use within draw widgets (see documentation of routine CURSOR).
      - Uses current coordinate system, which might not be the right one  
      for the current window (e.g., after a call to WSET).
      - Tested on X windows only. However, if ALT_CURSOR is not set  
      (either 0 or undefined), it will probably work with most graphical 
      interfaces. 

 Modification history:

 v1:  V. Andretta, 23/Feb/1998 - Created
      V. Andretta, 25/Feb/1998 - Modified: returns the button index
 v2:  V. Andretta, 12/Mar/1998 - Largely rewritten (taking also a few tips 
        from similar routine CURFULL of IDL Astronomy User's Library): 
        - improved error handling (trying to restore the state of the device);
        - changed cycle to make redrawing of lines as close as possible in 
          time and reducing the number of calls to DEVICE (now safer because 
          of the better error handling);
        - made PLOTS inherit _EXTRA keywords (NOCLIP, LINESTYLE and such);
        - changed printout format: added specification of coordinate type;
        - added ALT_CURSOR keyword.

 Contact:

      andretta@gsfc.nasa.gov


xyesno $SSW/gen/idl/genutil/xyesno.pro
[Previous] [Next]
NAME:
	xyesno
PURPOSE:
	Provide a yes/no question in widget form
	A widget replacement for YESNOX
SAMPLE CALLING SEQEUENCE:
	xyesno,'Please answer this question',ans
	xyesno, question, ans
INPUT:
	question - string array with the text of the question
OUTPUT:
	ans	- 0=no, 1=yes
 CALLS: ***
	XMENU_GEN_BUT [1], XMENU_GEN_BUT [2]
HISTORY:
	Written 28-Jan-97 by M.Morrison


xyouts2 [1] $SSW/gen/idl/display/xyouts2.pro
[Previous] [Next]
NAME:
  xyouts2
PURPOSE:
  Wrapper for xyouts -- use pseudo pixel coordinates when writing to PostScript file.
  Must "set up" the coordinates with a previous call to tv2,/init,xsize,ysize first.

  If !d.name is not set to 'PS', the xyouts2 simply calls xyouts,/device

CALLING SEQUENCE:
  xyouts2, x0, y0, str

INPUTS:
  x0		- In PostScript mode, this the xvalue in pseudo pixel space
  y0   	- In PostScript mode, this the yvalue in pseudo pixel space
  str		- The string to write;
OPTIONAL INPUT KEYWORDS:
  size		- The size of the text  (default = 1.0)
  charsize 	- Same as size.  If both size and charsize are present, size orrides.
  charthick	- Thickness of the text (default = 1.0)
  orientation	- Desired angle in degress counter-clockwise.
  alignment	- 0 for left-justified, 0.5 for centered, 1.0 for right-justified.
  font		- 0 for hardware fonts or -1 for vector drawn fonts.
  color	- Color of the text.
  device	- /device does not mean anything 
			- xyouts2 units are always in window pixel device units

  /norm and /data switches are not allowed.  In that case, simply call xyouts.
METHOD:
 xyouts2 requires the PostScript plotting size to be set by a previous call
 to tv2.  The necessary information is stored in the named common block: tv2_blk.

 See also the following routines:    tv2, ocontour, draw_grid (sxt_grid), plots2

 CALLED BY:
	ROLL_PLOT, disp1focus [2], disp1focus_flt, disp_dt_genx, disp_focus, disp_gen [1]
	disp_gen [2], disp_sci160k [1], disp_sci160k [2], disp_sci5k, fig_summary
	img_summary [1], img_summary [2], isas_ps_print, jitter_gif_xyimg
	lcur_plotr [1], lcur_plotr [2], mdidust, mk_refbar [1], mk_refbar [2]
	mk_sun_mosaic, mon_health [1], mon_health [2], msu_tekprint2, new_disp_sci5k [1]
	new_disp_sci5k [2], new_mon_health [1], new_mon_health [2], timeline
	wrt_sci160k_img, xdisp_sci5k
HISTORY:
  25-apr-1995, M. D. Morrison (LPARL), Written
  19-jan-1996, J. R. Lemen (LPARL), Added document header and various keywords.
  18-Dec-2002, William Thompson, GSFC, Changed !COLOR to !P.COLOR


XYOUTS_NORM $SSW/gen/idl/display/xyouts_norm.pro
[Previous] [Next]
 NAME:        	XYOUTS_NORM

 Purpose   
		modified function of xyouts with normalized coordinates xnorm,ynorm with
		respect to current plot frame

 Syntax        xyouts_norm,xnorm,ynorm,string,size,orientation,color

 CALLED BY:
	FWD_DISPLAY
 Examples    : xyouts_norm,0.1,0.1,'Here is graph 1'

 Inputs      : xnorm	= normalized x-coordinate (0<x<1) with respect to plot frame
  		ynorm	= normalized y-coordinate (0<x<1) with respect to plot frame
		string	= text string

 Opt. Inputs : size	= character size
		orientation = angle of text line with respect to x-axis
		color	= color of text

 History     : 1989, written, 
		1999, contributed to SSW, aschwanden@lmsal.com 


XYPLOT__DEFINE $SSW/gen/idl/objects/xyplot__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : XYPLOT__DEFINE

 Purpose     : Define a general X vs Y plot class

 Category    : objects

 Syntax      : IDL> new=obj_new('xyplot')

 Inputs:
 xdata - array of x data.  Either 1-D or (2,n) for low/high edges
 ydata - array of y data.  (nx,ny)

 Keywords:
 any IDL plot keyword
 (Note: here the term channels is used to refer to the second index
 in the ydata array)
 id - title of plot
 data_unit - units of y dimension (e.g. 'keV')
 dim1_ids - array of label id's for individual channels
 dim1_use - array of indices of channels to plot
 dim1_vals - array of values for channels (1 or 2-D) (for weighted sum)
       if dim1 dimension is time, dim1_vals should be ASCII times
 dim1_sum - if set, then sum channels
 dim1_unit - channel units (e.g. 'frequency')
 dim1_colors - array of colors to use for channel plots
 dim1_linestyles - array of linestyles to use for plots
 weighted_sum - if set, compute weighted sum instead of total
 legend_loc - 0/1/2/3/4/5/6 =
       no legend/ topleft/topright/ bottomleft/bottomright/outside left/ outside right
       if legend_loc is 5 or 6, plot will be smaller to make room for label
 label - additional info to put in legend
 addplot_name - string name of an additional plotting procedure to run after
   primary plot is drawn.  Uses addplot_arg.  Set to blank string for none (default).
 addplot_arg - Structure containing argument(s) to addplot_name procedure.  Passed via
   _extra to addplot_name, so addplot_name should have keyword arguments.

 CALLS: ***
	ADD_METHOD, ADD_TAG [1], ADD_TAG [2], APPEND_ARR, CH_SCALE, DATATYPE [1]
	DATATYPE [2], DATATYPE [3], DATPLOT, DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], DERIV, DPRINT, ERR_STATE, EXIST, HAVE_TAG, IS_BLANK, IS_CLASS, IS_STRING
	JOIN_STRUCT [1], JOIN_STRUCT [2], OBJ_STRUCT, OPLOTERR, REM_TAG [1], REM_TAG [2]
	REP_TAG_VALUE, TIMESTAMP, TRIM, VALID_RANGE, WHERE2, WSHOW2, XYPLOT::ALLOW_SUM
	XYPLOT::CHECK_DATA, XYPLOT::CHECK_XDATA, XYPLOT::CHECK_YDATA, XYPLOT::CLEANUP
	XYPLOT::DERIVATIVE, XYPLOT::DIM1_WIDTHS, XYPLOT::EMPTY, XYPLOT::EMPTY_PLOT
	XYPLOT::GET, XYPLOT::GETAXIS, XYPLOT::GETDATA, XYPLOT::GET_CHANNELS
	XYPLOT::GET_DEF_XRANGE, XYPLOT::GET_DEF_YRANGE, XYPLOT::GET_DX
	XYPLOT::GET_MARGIN, XYPLOT::GET_SUM_LABEL, XYPLOT::GET_SUM_YDATA
	XYPLOT::GET_XDATA, XYPLOT::GET_YDATA, XYPLOT::HAS_DATA, XYPLOT::HAS_EDATA
	XYPLOT::HAS_XDATA, XYPLOT::HAS_YDATA, XYPLOT::INIT, XYPLOT::INIT_PTR
	XYPLOT::INTEGRAL, XYPLOT::OPERATE, XYPLOT::OPERATION, XYPLOT::PLOT
	XYPLOT::PLOT_CMD, XYPLOT::PLOT_ERR, XYPLOT::PLOT_HIST_CMD, XYPLOT::RESCALE
	XYPLOT::SET, XYPLOT::SET_CHANNELS, XYPLOT::SET_CHAN_IDS, XYPLOT::SET_COLORS
	XYPLOT::SET_DATA, XYPLOT::SET_DIM1_VALS, XYPLOT::SET_LINESTYLES
	XYPLOT::SET_PLOT, XYPLOT::SET_XRANGE, XYPLOT::SET_YRANGE, XYPLOT::SHOW
	XYPLOT::USE_COLORS, XYPLOT::VALID_CHAN, XYPLOT::VALID_CHANNELS
	XYPLOT::WHERE_DATA, XYPLOT::WHERE_XDATA, XYPLOT::WRITE_LEGEND, XYPLOT::YSCALE
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1]
	data_chk [2], delvarx [5], find_contig_ranges, get_edge_products, get_uniq
	is_number [1], is_number [2], is_struct
 History     : Written 3 April 2001
               D. Zarro (EIT/GSFC)
               K. Tolbert (RITSS/GSFC)
               (Based on LTC__DEFINE)
 Modifications:
               2-Apr-2001 - Kim Tolbert.
               Allow 2-D X array input (2,n)
               where  x(0,*) are low edges, x(1,*) are high edges.
               13-Apr-2001 - Kim Tolbert.  Added weighted_sum option, get_y method,
                  and dim1_vals property.  Propagate status and err_msg through all calls.
               1-May-2001 - Kim Tolbert.  Changed label for summed data to use dim1_vals,
                  added get_sum_label method.
               1-Sept-2001 Zarro (EITI/GSFC) - sped up PLOT by extracting
               sub-region prior to plotting
               5-Sep-2001, Kim Tolbert.  Added yscale,yoffset
               13-Dec-2001, Kim.  Previously label size was .7*charsize, now 1*charsize
               6-Jan-2002, Zarro - fixed YRANGE bug when /YLOG
               14-Jan-2002, Kim.  If y min equals y max, set yrange to small interval around that value
               17-Jan-2002, Kim.  Take care of NaN's in the data.
               18-Feb-2002, Kim.  In get_sum_label, use dim1_vals if only 2 elements
               10-May-2002, Zarro (L-3Com/GSFC) - added derivative plot property
               27-May-2002, Kim.  Add 'derivative' to y axis label.  For 2-D
                  y arrays, take deriv of each channel separately
               08-Aug-2002, Kim.  In set_colors method, check what background color is
                  before replacing black with white.  Also change white to black if necessary.
               20-Aug-2002, Kim.  Added options for placing legend to left or right of plot,
                  and added get_margin method
               9-Sep-2002, Zarro (LAC/GSFC)
                 - added INTEGRAL property/method and centralized use of
                   FINITE in SET method
                 - restore initial plot settings when calling ->plot
                 - added /positive property/keyword.
               16-Sep-2002, Zarro (LAC/GSFC)
                 - fixed anytim calls and allowed plotting even when
                   no data in plot window.
               17-Oct-2002, Paul Bilodeau, fixed bug -when x array is 2-D but don't
                 want to plot histogram style, was using wrong x values on zoom
               16-Nov-2002, Zarro (EER/GSFC) - added GETDATA, HEADER pointer
               26-Jan-2003, Zarro (EER/GSFC) - removed redundant:
                add_method,'gen',self (since handled in CHAN__DEFINE)
               13-Mar-2003, Kim, added getaxis method
                5-May-2003, Zarro (EER/GSFC) - enhanced to allow channels
                            with different XDATA axes.
                23-Jun-2003, Zarro (EER/GSFC)
                  - fixed bug with plotting over missing data
                  - added /XLOG
                  - added /HISTOGRAM
                  - added ERROR bar plotting
                17-Jul-2003, Kim. in where_xdata, return ind for finite(x) only
                29-Jul-2003, Kim.  In get_sum_label, call find_contig_ranges with epsilon
                30-Jul-2003, Kim.  Store dim1_vals as numbers.  Set dim1_is_time flag if they
                   were originally strings.  Otherwise takes long time each time it gets converted
                   which happens in multiple calls.
                8-Sep-2003, Kim.  Added overlay_obj property.  If overlay_obj is set to an xyplot or utplot
                   object, then after plotting current plot,  self.overlay_obj->plot,/overlay will be called.
                21-Oct-03, Zarro (GSI/GSFC) - fixed FILENAME/FILEID conflict
                23-Jan-04, Zarro (L-3Com/GSFC) - modified so that XDATA/YDATA
                           could be entered separately
                26-Feb-2004, Kim.  Make sure psym=10 isn't set when plotting error bars.
                07-Mar-2004, Kim. Fixed bug in check for 2-d error data, and previously didn't write legend if
                           label defined, but dim1_ids not set
                17-Apr-2004, Zarro (L-3Com/GSFC) - replaced WHERE by
                                                   WHERE2
                20-Apr-2004,  Csillaghy added possibility of setting
                               data without resetting the plot
                               parameters.(NO_DEFAULTS kwd)
                               Also added a keyword to prevent the
                               timestamp on plots.
                22-Apr-2004,  Zarro (L-3Com/GSFC) - modified ->EMPTY
                1-April-2005, Zarro (L-3Com/GSFC) - use _REF_EXTRA
                              to pass keyword values back to caller.
                11-April-2005, Kim.  Added addplot_name and addplot_arg properties and call to
                              run addplot_name routine after plotting.
                24-May-2005, Sandhia. Modified set method to reset self.addplot_name when the
                              incoming addplot_name keyword contains a string or a blank/null
                              value. This is so that we can toggle overplotting.
                24-Aug-05, Zarro (L-3Com/GSFC) - added XHOUR
                21-Nov-2005, Kim.  When calling addplot_name procedure, combine the xyplot
                              property structure with the addplot_arg structure, so the called
                              procedure can use the current selections for plotting if needed.
                17-Jan-2006, Zarro. Made err and err_msg self consistent.
                15-Sep-2006, Kim. Allow dim1_color = '' to signify b/w plot.
                             If b/w, set color to ' ' in overlay_obj so linestyles used
                             In use_colors, only check for blank string, not >1 unique color -
                             needed in case of single trace, with overlay plot.
                             In set_colors, added test for blank strings
                27-Sep-2006, Kim. Add psym to set_plot args, and use
                to set self.histogram
                30-Oct-2006, Zarro (ADNET/GSFC)
                              - removed an EXECUTE call
                              - removed XHOUR


 Contact     : dzarro@solar.stanford.edu


XYPRO $SSW/gen/idl/fund_lib/sdac/xypro.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME: XYPRO

 PURPOSE: compute spherical from cartestian coordinates (3-d) 

 CATEGORY: util, math, geometry

 CALLING SEQUENCE: XYPRO, Xyz, Az_el
 
 CALLED BY:
	XYRADEC
 EXAMPLES:
	xypro, xyz, az_el

 INPUTS:
       Xyz, array of n 3 vectors (unit measure), n x 3
 OUTPUTS:
       Az_el - azimuth and elevation in degrees, n x 2
 HISTORY:
	 richard.schwartz@gsfc.nasa.gov


XYRADEC $SSW/gen/idl/fund_lib/sdac/xyradec.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME: XYRADEC

 PURPOSE: This function returns spherical from cartesian coordinates (3-d). 

 CATEGORY: util, math, geometry, 3-d

 CALLING SEQUENCE: Az_el = XYRADEC(Xyz)

 CALLED BY:
	BATSE_POINTING
 EXAMPLES:

        sun_in_gro = xyradec( sunxyz # x2fov )
        earth_in_gro = xyradec(-sc#x2fov) ;n x 2, Phi and Theta

 INPUTS:
       xyz, array of n 3 vectors (unit measure), n x 3
 OUTPUTS:
       Function returns azimuth and elevation in degrees, n x 2
 CALLS: ***
	XYPRO


XYXY $SSW/gen/idl_libs/astron/astrom/xyxy.pro
[Previous] [Next]
 NAME:
	XYXY
 PURPOSE:
	To use a pair of headers to convert X/Y positions from one frame
	to another.
 CALLING SEQUENCE:
	XYXY, hdra, hdrb, xa, ya, [ xb, yb ]
 INPUTS:
	hdra - The header containing the plate solution describing the
	       frame of reference being converted FROM.
	hdra - The header containing the plate solution describing the
	       frame of reference being converted TO.
	xa   - A scalar or vector containing the x coordinate(s) to convert.
	ya   - A scalar or vector containing the y coordinate(s) to convert.
	       Must have the same number of elements as 'xa'.
 OUTPUTS:
	xb   - The converted x coordinate(s).  If this parameter is not
	       specified, it is returned through 'xa'.
	yb   - The converted y coordinate(s).  If this parameter is not
	       specified, it is returned through 'ya'.
 CALLS: ***
	AD2XY, EXTAST, GET_EQUINOX, GSSSADXY, GSSSXYAD, HEULER, PRECESS, XY2AD
 PROCEDURE:
	The procedures 'xyad' and 'adxy' are used to perform the 
       conversion.     The equinoxes of each header are checked with
       "get_equinox" to make sure that they are identical, and "precess"
       is used if they are not.   HEULER used if the headers have a different
       coordinate system (e.g. Celestial, Galactic, Ecliptic)

       Note that all X,Y coordinates are in the IDL convention (starting with
       0,0) and not the FITS convention (first pixel is 1,1)
 PROCEDURES USED:
	GET_EQUINOX(), EXTAST, XYAD, ADXY, PRECESS, HEULER
 MODIFICATION HISTORY:
	Written by Michael R. Greason, Hughes-STX, 13 April 1992.
	Updated to use ASTROMETRY structures.  J.D.Offenberg, HSTX, Jan 1993
	Converted to IDL V5.0   W. Landsman   September 1997
       Check coordinate system   J. Ballet/ W. Landsman  April 2004


XYZ $SSW/gen/idl_libs/astron/astro/xyz.pro
[Previous] [Next]
 NAME:
       XYZ
 PURPOSE:
       Calculate geocentric X,Y, and Z  and velocity coordinates of the Sun
 EXPLANATION:
       Calculates geocentric X,Y, and Z vectors and velocity coordinates 
       (dx, dy and dz) of the Sun.   (The positive X axis is directed towards 
       the equinox, the y-axis, towards the point on the equator at right 
       ascension 6h, and the z axis toward the north pole of the equator).
       Typical position accuracy is <1e-4 AU (15000 km).

 CALLING SEQUENCE:
       XYZ, date, x, y, z, [ xvel, yvel, zvel, EQUINOX = ]

 INPUT:
       date: reduced julian date (=JD - 2400000), scalar or vector

 OUTPUT:
       x,y,z: scalars or vectors giving heliocentric rectangular coordinates
                 (in A.U) for each date supplied.    Note that sqrt(x^2 + y^2
                 + z^2) gives the Earth-Sun distance for the given date.
       xvel, yvel, zvel: velocity vectors corresponding to X, Y and Z.

 CALLS: ***
	PRECESS_XYZ
 CALLED BY:
	HELIO_JD
 OPTIONAL KEYWORD INPUT:
       EQUINOX: equinox of output. Default is 1950.

 EXAMPLE:
       What were the rectangular coordinates and velocities of the Sun on 
       Jan 22, 1999 0h UT (= JD 2451200.5) in J2000 coords? NOTE:
       Astronomical Almanac (AA) is in TDT, so add 64 seconds to 
       UT to convert.

       IDL> xyz,51200.5+64.d/86400.d,x,y,z,xv,yv,zv,equinox = 2000

       Compare to Astronomical Almanac (1999 page C20)
                   X  (AU)        Y  (AU)     Z (AU)
       XYZ:      0.51456871   -0.76963263  -0.33376880
       AA:       0.51453130   -0.7697110   -0.3337152
       abs(err): 0.00003739    0.00007839   0.00005360
       abs(err)
           (km):   5609          11759         8040 

       NOTE: Velocities in AA are for Earth/Moon barycenter
             (a very minor offset) see AA 1999 page E3
                  X VEL (AU/DAY) YVEL (AU/DAY)   Z VEL (AU/DAY)
       XYZ:      -0.014947268   -0.0083148382    -0.0036068577
       AA:       -0.01494574    -0.00831185      -0.00360365
       abs(err):  0.000001583    0.0000029886     0.0000032077
       abs(err)
        (km/sec): 0.00265        0.00519          0.00557

 PROCEDURE CALLS:
       PRECESS_XYZ
 REVISION HISTORY
       Original algorithm from Almanac for Computers, Doggett et al. USNO 1978
       Adapted from the book Astronomical Photometry by A. Henden
       Written  W. Landsman   STX       June 1989
       Correct error in X coefficient   W. Landsman HSTX  January 1995
       Added velocities, more terms to positions and EQUINOX keyword,
          some minor adjustments to calculations 
          P. Plait/ACC March 24, 1999


XZOOM $SSW/gen/idl/display/xzoom.pro
[Previous] [Next]
 NAME:
       XZOOM

 PURPOSE:
	The purpose of xzoom is to display a zoomed image of some 
	portion of an original image. The zoomed in area is selected 
	using the mouse to draw a box on the original image. The area 
	inside the box is displayed in a new window, using a zoom factor
	of two.

 CATEGORY:
       Hansteen/Wikstol Data analysis SW

 CALLING SEQUENCE:
       xzoom, image, xscale, yscale, xtitle = xtitle, $
                 ytitle = ytitle, group_leader = groupleader

 INPUTS:
       image: The selected area to zoom in on
       xscale: the xrange of the zoomed image
       yscale: the yrange of the zoomed image

 KEYWORD PARAMETERS:
	xtitle: The xtitle of the zoomed image display
	ytitle: The ytitle of the zoomed image display
       group_leader: Widget parent (if any).

 OUTPUTS:
       None

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], GET_SCREEN_SIZE, INTERPOL, TVIMAGE [1]
	TVIMAGE [2], TVIMAGE [3], TVIMAGE [4], XMANAGER, XZOOM_CLEANUP, XZOOM_DESTROY
	XZOOM_DRAW_EVENTS, XZOOM_JPEG, XZOOM_PS, XZOOM_RESIZE
 CALLED BY:
	XDETECTOR [1], XMAP [1], XMAP [2], xwhisker [1], xwhisker [2]
 COMMON BLOCKS:


 PROCEDURE:
	Opens a new widget with a draw area where the zoomed image is 
	displayed. It is possible also to zoom in on the zoomed image. 
	The zoomed image may be output to postscript or jpeg files. 

 RESTRICTIONS:


 MODIFICATION HISTORY:
       March 2001: Oivind Wikstol. Based on method by David Fanning/
	26-Nov-2002: Oivind Wikstol - Added documentation.