XPAR2 Name
XPAR2 Purpose
Execute IDL code using interactively varied parameters.
Category
Calling Sequence
xpar, file Inputs
file = xpar file or text array. in
Keyword Parameters
Keywords
P1=var1, P2=var2, ... P5=var5 Up to 5 variables.
may be passed into the program using these keywords.
To use in the code reference as _s.p1, _s.p2, ...
/WAIT means wait until the routine is exited instead
returning right after startup.
PARVALS=pv Structure with parameter names and values.
Must be used with /WAIT or pv will be undefined.
EXITCODE=excd 0=normal, 1=cancel. Must use with /WAIT.
/DEMO runs a default demo, an interactive globe.
/DEM2 runs a non-graphical demo, prime factors.
TOP=top Returns widget ID of top level base.
Use widget_control to retrieve or store info structure.
OK=wid ID of widget to notify when OK button pressed.
If not given no OK button is displayed.
Useful to allow a higher level widget routine to call
EQV3. The OK button then sends an event to the higher
level widget which can then destroy the eqv3 widget.
WID_OK=wid Returned widget ID of the OK button.
Can use to set /input_focus.
GROUP_LEADER=grp Set group leader.
XOFFSET=xoff, YOFFSET=yoff Widget position.
Outputs
Common Blocks
Notes
Notes: This routine will not work in an IDL Virtual Machine.
Use the Help button for more details.
Xpar file format: This text file defines the IDL code,
and range of each adjustable parameter.
Null and comment lines (* or ; in first column) are allowed.
The tags are shown by a simple example:
init: window,/free
title: Parabola
code: x=maken(-10,10,100) & plot,x,a + b*x + $
c*x^2,xr=[-10,10],yr=[-100,100]
sliders: 3
par: a, -50, 50, 0
par: b, -50, 50, 0
par: c, -10, 10, 1
The parameter tags are followed by 4 items:
Parameter name (as in the equation),
min value, max value, initial value. Optional items are
/INT to force an integer value, COLOR=clr for slider
color, FRAME=fr for button frame.
Use the Help button menu for more complete details.
Modification History
R. Sterner, 2006 Oct 17
R. Sterner, 2008 Oct 07 --- Added list input source under file menu.
R. Sterner, 2008 Oct 09 --- Drop-down lists should be working.
R. Sterner, 2008 Oct 16 --- Color patches should be working.
R. Sterner, 2008 Oct 22 --- Converted xpar help to add_helpmenu form.
R. Sterner, 2008 Oct 22 --- No longer drops through on error.
R. Sterner, 2008 Oct 23 --- Changed variable input to INPUT=struct.
Copyright (C) 2006, 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.