From MdsWiki
Extended IDL Help
The following list of IDL routines and corresponding documentation headers have been extracted from the .pro files in mds$root:[idl].
This page was created by the IDL library routine mk_html_help
. For more information on this routine, refer to the IDL Online Help Navigator or type:
? mk_html_help
at the IDL command line prompt.
Last modified: Wed Jul 19 16:18:25 1995.
List of Routines
- ARRGEN
- CAM$ASSIGN
- CAM$CSTATE
- CAM$DASSGN
- CAM$ERROR
- CAM$FSTOPW
- CAM$GET_STAT
- CAM$LAMWAIT
- CAM$PIOW
- CAM$Q
- CAM$QREPW
- CAM$QSCANW
- CAM$QSTOPW
- CAM$SHOW_STAT
- CAM$STOPW
- CAM$V2
- CAM$X
- CAM$XANDQ
- CMOD_LED
- CMOD_MANAGE
- CREATE_SLICE
- CS
- CSAKM
- CSD
- CSD2
- CSEV
- CSI
- CSITG
- CSVAL
- CW_FLOAT
- CW_FLOAT_CHECK
- CW_FLOAT_EMPTY
- CW_WVEDIT
- CW_WVEDIT_NIDS
- DSQL
- EDIT_MENU
- FATEST
- FILE_DATE
- GET_COLUMNS
- GET_SUMMARY
- GET_TABLES
- GET_TIME_SLICE
- H0_CONTROL
- INTEGERIZE
- INTERPOL
- ISQL
- JULDAYSHT
- LOADBIRA
- LOCATE
- LOGBOOK_EVENT
- LOGBOOK_RUN
- LOGBOOK_SHOT
- LOGSETSENSITIVE
- LOOKUPAKM
- LOOKUPLIN
- MAKE_RUN
- MAKE_SCOPE
- MDS$CLOSE
- MDS$CUR_SHOT
- MDS$DECOMPILE
- MDS$DECOMP_TREE
- MDS$DIRECTORY
- MDS$IDL_STARTUP
- MDS$MAKE_HELP
- MDS$OPEN
- MDS$PLAY_AUDIO
- MDS$PUT
- MDS$QEVENT
- MDS$SAY_NUMBER
- MDS$SETEVENT
- MDS$SET_DEF
- MDS$SHOT_LIST
- MDS$SKIM
- MDS$SKIM_MINE
- MDS$TCL
- MDS$VALUE
- MDS$VMS_ERROR
- MDS$WFEVENT
- MDSEVENT
- MDSPLUS
- RETRIEVE
- ROSQL
- RWSQL
- SELECT_FEWER
- SELECT_MORE
- SELECT_TABLE
- SET_DATABASE
- SHOTTREND
- SHOT_CHECKED
- SHOT_DATE
- SHOT_LENGTH
- SHOT_LOG
- SHOW_COLUMNS
- SHOW_TABLES
- SQL
- SQL_FINISH
- SQL_UPDATE
- SUMMARY_IDL
- TREE_ONLINE
- UPDATE_FIELD
- UPDATE_SLICE
- UPDATE_SUMMARY
- WAVEEDIT
- WAVEGEN_TIMES
- WAVE_EDIT
- WAVE_EDIT_ARR
- WLOGBOOK
- XERRPLOT
- XTMANAGECHILD
- XTPARENT
- XTUNMANAGECHILD
- XTVAGETVALUES
- XTVASETVALUES
- X_COMPLAIN
- X_LISTBOX
- X_MENU
- X_QUESTION
- X_TABLE
- X_WARNING
Routine Descriptions
ARRGEN
[Next Routine] [List of Routines]
NAME: ARRGEN PURPOSE: Generate an array of argument's shape CATEGORY: Utility CALL: Result = ARRGEN(Shape, Value) INPUTS: Shape a scalar/array of shape desired OPTIONAL INPUTS: Value data type and value filled, default 0 OUTPUTS: Result an array of array_ PROCEDURE: Test number of dimension and generate accordingly. EXAMPLE: long_array = ARRGEN(INDGEN(3,4), 0L) HISTORY: 9-Apr-1993 Ken Klare, LANL P-4 (c)1993
CAM$ASSIGN
[Previous Routine] [Next Routine] [List of Routines]
CAM$ASSIGN assigns a key to a module's logical name. No descriptors, so we just use string. Normally: key points to physical module address and is not changed by CTS. Caution: assignment does not imply exclusive use of logical name or physical address.
CAM$CSTATE
[Previous Routine] [Next Routine] [List of Routines]
CAM$CSTATE sets the default settings of the CAMAC Information Block.
CAM$DASSGN
[Previous Routine] [Next Routine] [List of Routines]
CAM$DASSGN release an assigned module.
CAM$ERROR
[Previous Routine] [Next Routine] [List of Routines]
CAM$ERROR test the X and Q states for an error, 1 is an error. XSTATE/QSTATE is 0 for off, 1 for on, other for untested.
CAM$FSTOPW
[Previous Routine] [Next Routine] [List of Routines]
CAM$FSTOPW does a stop on word count
CAM$GET_STAT
[Previous Routine] [Next Routine] [List of Routines]
CAM$GET_STAT retrieves status of latest operation. This is for all operations, IDLCAM was latest non-IOSB only.
CAM$LAMWAIT
[Previous Routine] [Next Routine] [List of Routines]
CAM$LAMWAIT Wait for Look-At-Me (LAM) Request. Default timeout is 32767 seconds or about 9 hours.
CAM$PIOW
[Previous Routine] [Next Routine] [List of Routines]
CAM$PIOW does single programmed input/output.
CAM$Q
[Previous Routine] [Next Routine] [List of Routines]
CAM$Q tests latest or a specific status block for Q response.
CAM$QREPW
[Previous Routine] [Next Routine] [List of Routines]
CAM$QREPW does a Q-repeat stop on word count, repeated Q=0, or any X=0.
CAM$QSCANW
[Previous Routine] [Next Routine] [List of Routines]
CAM$QSCANW does a Q-scan stop on word count or X=0 with subaddress or station increment.
CAM$QSTOPW
[Previous Routine] [Next Routine] [List of Routines]
CAM$QSTOPW does a stop on word count, Q=0, or X=0.
CAM$SHOW_STAT
[Previous Routine] [Next Routine] [List of Routines]
CAM$SHOW_STAT displays the status block.
CAM$STOPW
[Previous Routine] [Next Routine] [List of Routines]
CAM$QSTOPW does a stop on word count or X=0.
CAM$V2
[Previous Routine] [Next Routine] [List of Routines]
CAM$V2 defines the system variables used by IDL version 2 for CAMAC.
MODULE read scalar logical name or key (unsupported) A read scalar subaddress 0-15 F read scalar function 0-31 TC read scalar transfer count 1-16383 longs or 1-32767 words optional for defined data array in block mode DATA write f(0-7) new read values, optional read f(16-23) written values scalar for PIO, vector for block. IOSB read/write 4-word vector status KEY read/write scalar quick module name (unsupported) XSTATE read scalar tested X: 1=yes 0=no else=undefined QSTATE read scalar tested Q: 1=yes 0=no else=undefined Fortran CAM$CSTATE wants CAM$QDC/QNE/QE/XI/XE CCL's SET XANDQ defaults to ANY TIMEOUT read scalar seconds to wait for LAM 1-32767 MEM read scalar Ken Klare, LANL CTR-7 (c)1990 Limitation: KEY would require descriptor of long Limitation: EFN requires by-value. Event Flags useful only for overlap I/O. It needs LIB$GET_EF/FREE_EF interface. LAM waits using AST routines cannot be supported by IDL CANLAMW LAMASTW and routines without W-wait List commands are not supported: DCLST EXECUTEW LPIO LQSCAN LRTQ LSTATE LSTOP RDATA WDATA
CAM$X
[Previous Routine] [Next Routine] [List of Routines]
CAM$X tests latest or a specific status block for X response.
CAM$XANDQ
[Previous Routine] [Next Routine] [List of Routines]
CAM$XANDQ tests latest or a specific status block for X and Q response.
CMOD_LED
[Previous Routine] [Next Routine] [List of Routines]
NAME: CMOD_LED PURPOSE: Send characters to Mimic Board leds CATEGORY: CMOD CALLING SEQUENCE: CMOD_LED,digits=digits,address=addr,lun=lun, [value,] [mds_expression = expr,] [format=format,] [blank=blank,] [help=help,] [bad=bad] OPTIONAL INPUT PARAMETERS: value = value to output. Must be numeric scalar. Keywords: DIGITS = specifies number of digits in LED display. REQUIRED and must match hardware. ADDRESS = specifies LED display (numeric from 1-33). REQUIRED LUN = specifies LUN of file to use. REQUIRED MDS_EXPRESSION = specifies an MDS expression to evaluate and use as the value. FORMAT = specifies a format to use when converting value to ascii. OPTIONAL BLANK = specifies a blank field HELP = specifies the string HELP BAD = specifies a bad field -.-.-.-. OUTPUTS: Encoded string is output to specified lun COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Converts address and value to encoded string to control LED displays. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, October 23,1992 VERSION 1.1, JAS - added MDS$VALUE November 20, 1992
CMOD_MANAGE
[Previous Routine] [Next Routine] [List of Routines]
NAME: CMOD_MANAGE PURPOSE: An application to manage CMOD Data Acquisition CATEGORY: CMOD CALLING SEQUENCE: idl> CMOD_MANAGE INPUT PARAMETERS: NONE OPTIONAL INPUT PARAMETERS: NONE KEYWORDS: NONE OUTPUTS: NONE COMMON BLOCKS: None. SIDE EFFECTS: Turns on and off nodes in the CMOD tree and sets the subtrees /INCLUDE /NOINCLUDE RESTRICTIONS: Must have write access to all of the CMOD subtrees (CMOD$MAIN) MODIFICATION HISTORY: Josh Stillerman 11/3/93
CREATE_SLICE
[Previous Routine] [Next Routine] [List of Routines]
NAME: CREATE_SLICE.PRO PURPOSE: Creates an empty time slice entry in the logbook database. CATEGORY: MDSplus CALLING SEQUENCE: create_slice, table, shot, slice, comment INPUTS: table - the name of the time slice table (CORE) shot - shot to update time - shot to update comment - short comment describing request OUTPUTS: -- NONE COMMON BLOCKS: -- NONE SIDE EFFECTS: Creates / Updates a record in the summary/logbook database. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. SQL$DATABASE must point to the logbook database or a SET_DATABASE,"LOGBOOK" must be done before using this routine. MODIFICATION HISTORY: 9/14/93 JAS - created 3/1/94 JAS - added table argument ------------------------------------------------------------------------------------- EXAMPLES create_slice, 'CORE', 910901001, .01, "Full analysis for some regession or other"
CS
[Previous Routine] [Next Routine] [List of Routines]
NAME: CS PURPOSE: Evaluate cubic spline values from CSEV coefficients. CALL: yy = CS(xx, xn, coef) INPUTS: xx the axis points to be evaluated xn the nodes of the spline coef the output of CSEV(x, y, ey, mv, xv, yv), where x,y are the input points with error ey xv,yv are the constraints of mode mv. OUTPUT: yy the points along the fitted curve HISTORY: 2-Oct-1992 From a Fortran program by Ken Klare, LANL (~1984)
CSAKM
[Previous Routine] [Next Routine] [List of Routines]
NAME: CSAKM.PRO PURPOSE: Compute Spline interpolation coefficents. CATEGORY: Interpolation/extrapolation CALAKMG SEQUENCE: CSAKM, xdata, fdata, break, coeff INPUTS: xdata the vector of abscisae. fdata the vector of ordinates. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: break ordered set of breakpoints coeff (4,n) coefficients OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: -- RESTRICTIONS: Requires at least 2 points for xdata and fdata. PROCEDURE: Create (4,nxx) coefficient array for CSVAL using AKIMA method. MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)23-Jun-1992 Initial coding.
CSD
[Previous Routine] [Next Routine] [List of Routines]
NAME: CSD PURPOSE: Evaluate cubic spline derivatives from CSEV coefficients. CALL: yy = CSD(xx, xn, coef) INPUTS: xx the axis points to be evaluated xn the nodes of the spline coef the output of CSEV(x, y, ey, mv, xv, yv), where x,y are the input points with error ey xv,yv are the constraints of mode mv. OUTPUT: yy the points along the fitted curve HISTORY: 2-Oct-1992 From a Fortran program by Ken Klare, LANL (~1984)
CSD2
[Previous Routine] [Next Routine] [List of Routines]
NAME: CSD2 PURPOSE: Evaluate cubic spline second derivatives from CSEV coefficients. CALL: yy = CSD2(xx, xn, coef) INPUTS: xx the axis points to be evaluated xn the nodes of the spline coef the output of CSEV(x, y, ey, mv, xv, yv), where x,y are the input points with error ey xv,yv are the constraints of mode mv. OUTPUT: yy the points along the fitted curve HISTORY: 2-Oct-1992 From a Fortran program by Ken Klare, LANL (~1984)
CSEV
[Previous Routine] [Next Routine] [List of Routines]
------------------------------------------------------------------ NAME: CSEV Least-squares Cubic Spline 1-D Evaluation with optional constraints. CALL: A = CSEV(Xn, X, Y, Ey, Mv [,Xv, Yv [,B]]) f(X) = A(0) + A(1)*X + A(2)*X*X + A(i)*abs(X-Xn(i))**3 Uses Lagrange mutipliers for constraints. Polynomial terms are needed for simple curves. Because this allows any order it uses full n-by-n matrix. INPUTS: Xn (n-3) node positions, n=number of coef including polynomial X (nx) data positions, any order Y (nx) data values Ey (nx or scalar) error-in-y values Mv (nv) mode of constraint, use -1 for no constraints 0=value, 1=slope, 2=acceleration, 3=f''', 4=f'/f, 5=f''/f, 6=f'''/f, 7=f''/f', 8=f'''/f', 9=f'''/f'' OPTIONAL INPUTS Xv (nv) positions of contraints, unused for Mv=-1 Yv (nv) values of constraints, unused for Mv=-1 OUTPUT: A (n) coefficients OPTIONAL OUTPUT: B (n,n) error matrix for coefficients RESTRICTIONS: NOTE: this is not an interpolation spline but it is a fit. It needs data plus constraints to cover nodes + 3 polynomial terms. Node locations are not optimized. Put nodes where the function bends. It will help to have the x origin near the centroid of weighted x's. Calculation is done in double precision to overcome ill condition. HISTORY: From a Fortran program by Ken Klare, LANL (~1984) KKLARE 2-Oct-1992 initial IDL code KKLARE 9-Apr-1993 correct constraint fill, replicate weight
CSI
[Previous Routine] [Next Routine] [List of Routines]
NAME: CSI PURPOSE: Evaluate cubic spline integral from CSEV coefficients. CALL: yy = CSI(xx0, xx1, xn, coef) INPUTS: xx1, xx2 are endpoints of the integrals, scalar or vector xn the nodes of the spline coef the output of CSEV(x, y, ey, mv, xv, yv), where x,y are the input points with error ey xv,yv are the constraints of mode mv. OUTPUT: yy the integrals along the fitted curve
CSITG
[Previous Routine] [Next Routine] [List of Routines]
NAME: CSITG.PRO PURPOSE: Spline interpolate along a uniform/nonuniform axis. CATEGORY: Interpolation/extrapolation CALAKMG SEQUENCE: y = CSITG(a, b, break, coeff) INPUTS: a begining of interval (scalar/vector) b end of interval (scalar/vector) break the vector of breakpoints. coeff the (4,n) array of coefficients. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: axis The appropriate axis (a, b, or average) for the result. COMMON BLOCKS: -- SIDE EFFECTS: -- RESTRICTIONS: -- PROCEDURE: Use a vector Cubic Spline. (This has search and interpolate.) MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)23-Jun-1992 Initial coding.
CSVAL
[Previous Routine] [Next Routine] [List of Routines]
NAME: CSVAL.PRO PURPOSE: Spline interpolate along a uniform/nonuniform axis. CATEGORY: Interpolation/extrapolation CALAKMG SEQUENCE: y = CSVAL(x, break, coeff) INPUTS: x the evaluation points. break the vector of breakpoints. coeff the (4,n) array of coefficients. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: -- RESTRICTIONS: -- PROCEDURE: Use a vector Cubic Spline. (This has search and interpolate.) MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)23-Jun-1992 Initial coding.
CW_FLOAT
[Previous Routine] [Next Routine] [List of Routines]
NAME: CW_FLOAT PURPOSE: Compound widget which reads a floating point value from the user. CATEGORY: Compound widgets. CALLING SEQUENCE: widget = CW_FLOAT(parent) CW_FLOAT_CLEAR, id - clear the field status = CW_FLOAT_CHECK(id) - see if it is valid status = CW_FLOAT_EMPTY(id) - see if it is empty INPUTS: PARENT - The ID of the parent widget. KEYWORD PARAMETERS: UVALUE - Supplies the user value for the widget. OUTPUTS: The ID of the created widget is returned. COMMON BLOCKS: None. SIDE EFFECTS: PROCEDURE: MODIFICATION HISTORY:
CW_FLOAT_CHECK
[Previous Routine] [Next Routine] [List of Routines]
NAME: CW_FLOAT_CHECK PURPOSE: User query function for Compound widget which reads a floating point value from the user. CATEGORY: Compound widgets. CALLING SEQUENCE: widget = CW_FLOAT(parent) CW_FLOAT_CLEAR, id - clear the field status = CW_FLOAT_CHECK(id) - see if it is valid status = CW_FLOAT_EMPTY(id) - see if it is empty INPUTS: PARENT - The ID of the parent widget. KEYWORD PARAMETERS: UVALUE - Supplies the user value for the widget. OUTPUTS: The ID of the created widget is returned. COMMON BLOCKS: None. SIDE EFFECTS: PROCEDURE: MODIFICATION HISTORY:
CW_FLOAT_EMPTY
[Previous Routine] [Next Routine] [List of Routines]
NAME: CW_FLOAT_EMPTY PURPOSE: User query function for Compound widget which reads a floating point value from the user. CATEGORY: Compound widgets. CALLING SEQUENCE: widget = CW_FLOAT(parent) CW_FLOAT_CLEAR, id - clear the field status = CW_FLOAT_CHECK(id) - see if it is valid status = CW_FLOAT_EMPTY(id) - see if it is empty INPUTS: PARENT - The ID of the parent widget. KEYWORD PARAMETERS: UVALUE - Supplies the user value for the widget. OUTPUTS: The ID of the created widget is returned. COMMON BLOCKS: None. SIDE EFFECTS: PROCEDURE: MODIFICATION HISTORY:
CW_WVEDIT
[Previous Routine] [Next Routine] [List of Routines]
NAME: PURPOSE: CATEGORY: Compound widgets. CALLING SEQUENCE: widget = cw_wvedit([parent],ROWS = rows, [UVALUE = uval,] [TITLE = title,] $ [EVENT_PROC=eproc,] [USER_BUTTONS=ubuttons,] [XSIZE = xsize,] $ [YSIZE = ysize,] [XOFFSET = xoffset,] [YOFFSET = yoffset,] $ [/EDITABLE] [/BUTTON_IDS], $ [KILL_NOTIFY=kill_proc][/TLB_SIZE_EVENTS,] $ [MENU_BUTTONS=menu_buttons]) INPUTS: None KEYWORD PARAMETERS: ROWS - Scalar or vector containing the number of rows of waveforms oer column. A column is created for each element of the rows vector. UVALUE - Supplies the user value for the widget. TITLE - Supplies a title for the cw_wvedit window and its corresponding control window. Default is no title. EVENT_PROC - Supplies a procedure to receive pointer events. USER_BUTTONS - Array of button labels to be created across the bottom of the control window. XSIZE - Specifies the width of the cw_wvedit window YSIZE - Specifies the height of the cw_wvedit window XOFFSET - Specifies the offset from the left of the screen in pixels. YOFFSET - Specifies the offset from the top of the screen in pixels. EDITABLE - Controls whether the wave edit pointer modes will be enabled or not (select,add,control,slide/stretch). BUTTON_IDS - Returns array of user button id's KILL_NOTIFY - Kill notify proc MENU_BUTTONS - array of string labels for extra menu buttons. Generates a CB_USER event with a field 'label' containing the first 16 characters of the menu item selected. OUTPUTS: The ID of the created widget is returned. COMMON BLOCKS: SIDE EFFECTS: PROCEDURE: widget_control, id, SET_VALUE=value can be used to change the characteristics of a wave or all waves Pass a structure containing the items you want to change in a wave or all waves. To change a single wave, include the tag IDX to specify the wave number you want to modify. To apply the changes to all waves, ommit the IDX tag. The following are a list of TAG that can be specified: Value related tags: X:flt_array - X axis values Y:flt_array - Y axis values SELECTIONS:byte_array - Selections used in drawing PEN:byt_array - Indicate whether to draw line segment AUTOSCALE:1 or 0 - Force autoscale of axes (default) Note: X,Y,SELECTIONS, and PEN must be ALL be specified or none. AUTOSCALE is optional and only operates when the above tags are specified Boolean resources (value set to zero or one): XINCREASING - Enforce increasing x values when drawing. Effects spline behavior. YINCREASING - Enforce increasing y values when drawing. Effects spline behavior. XLABELS - Display labels on x grid lines YLABELS - Display labels on y grid lines ATTACHCROSSHAIRS - Attach crosshairs to curve when pointing CLOSED - Connect first and last point. Effects spline behavior. SHOWSELECTIONS - Show selected points. STEPPLOT - Draw curve as a step plot. Integer resources: POINTERMODE - Selects pointer behavior. Select one of: 1 - None 2 - Point 3 - Zoom 4 - Drag 5 - Edit 6 - Select 7 - Add 8 - Pen Control 9 - Slide/Stretch SHOWMODE - Selects mode of display. Select one of: 0 - Show lines only 1 - Show points only 2 - Show both XGRIDLINES - Selects number of gridlines on x axis YGRIDLINES - Selects number of gridlines on y axis Floating point resources: LOWX:flt - Minimum x value a point can dragged. NOLOWX:1 - No minumum x value LOWY:flt - Minimum y value a point can dragged. NOLOWY:1 - No minumum y value HIGHX:flt - Maximum x value a point can dragged. NOHIGHX:1 - No maxumum x value HIGHY:flt - Maximum y value a point can dragged. NOHIGHY:1 - No maxumum y value XMIN:flt - Minimum x axis value NOXMIN:1 - No minumum x axis value (autoscale) YMIN:flt - Minimum y axis value NOYMIN:1 - No minumum y axis value (autoscale) XMAX:flt - Maximum x axis value NOXMAX:1 - No maxumum x axis value (autoscale) YMAX:flt - Maximum y axis value NOYMAX:1 - No maxumum y axis value (autoscale) XMINDISTANCE:flt - Minimum x distance between two adjacent points NOXMINDISTANCE:1 - No Minimum distance YMINDISTANCE:flt - Minimum y distance between two adjacent points NOYMINDISTANCE:1 - No Minimum distance XCROSSHAIR - Location of x crosshair YCROSSHAIR - Location of y crosshair XGRIDSNAP:flt - Snap grid of x axis NOXGRIDSNAP:1 - No snap grid on x axis YGRIDSNAP:flt - Snap grid of y axis NOYGRIDSNAP:1 - No snap grid on y axis Floating point array resources: XCHOICES:flt_array - List of valid x values when drawing YCHOICES:flt_array - List of valid y choices when drawing Text resources: TITLE:string - Title to be displayed above wave Pixmap resources: BITMAP:filename - Bitmap to use to paint background of waveform. Specify an X11 bitmap file. Callback resources: The following callbacks can be set: NOTE: THESE ARE ADVANCED FEATURES AND SHOULD ONLY BE USED BY EXPERTS FAMILIAR WITH THE XMDSWAVEDRAW MOTIF BASED WIDGET. tHE VALUE OF THE CALLBACK SHOULD BE THE ADDRESS OF A ROUTINE FOUND BY USING LIB$FIND_IMAGE_SYMBOL: CROSSHAIRSCALLBACK:proc_address ALIGNCALLBACK:proc_address LIMITSCALLBACK:proc_address UNDERLAYCALLBACK:proc_address OVERLAYCALLBACK:proc_address CUTCALLBACK:proc_address PASTECALLBACK:proc_address MOVECALLBACK:proc_address SELECTCALLBACK:proc_address DESELECTCALLBACK:proc_address ADDPOINTCALLBACK:proc_address DELETEPOINTCALLBACK:proc_address FITCALLBACK:proc_address widget_control, id, GET_VALUE=var can be used to obtain the current contents of the waves or return the number of waves To obtain number of waves: widget_control, id, SET_VALUE={IDX:-1} widget_control, id, GET_VALUE=global_data numwaves=global_data.numwaves event_proc=global_data.event_proc To optain wave content: widget_control, id, SET_VALUE={IDX:wave_number} widget_control, id, GET_VALUE=data x=data.x y=data.y pen=data.pen selections=data.selections Note: Wave indexes begin at 0 MODIFICATION HISTORY: Initial creation: T.W.Fredian 10/16/92 Added MENU_BUTTONS argument Josh Stillerman 3/14/95
CW_WVEDIT_NIDS
[Previous Routine] [Next Routine] [List of Routines]
NAME: PURPOSE: CATEGORY: Compound widgets. CALLING SEQUENCE: widget = cw_wvedit_nids, nids, $ [ROWS=rows, $] [XOFFSET=xoffset, YOFFSET=yoffset, $] [XSIZE=xsize, YSIZE=ysize, $] [TITLE=title, $] [/EDITABLE,$] [XGRIDLINES = xgridlines,$] [XINCREASING = xincreasing,$] [lowX = lowx,$] [XMINDISTANCE = xmindistance,$] [XGRIDSNAP = xgridsnap, $] [YGRIDSNAP = ygridsnap, $] [GROUP = group, $] [UVALUE = uval, $] [EVENT_PROC = event_proc, $] [BUTTON_PROC = button_proc, $] [BUTTON_ARG = button_arg, $] [ADD_BUTTONS = add_buttons, $] [KILL_NOTIFY = kill_notify]) INPUTS: KEYWORD PARAMETERS: UVALUE - Supplies the user value for the widget. OUTPUTS: The ID of the created widget is returned. COMMON BLOCKS: SIDE EFFECTS: PROCEDURE: WV_MARK_DIRTY, id, idx MODIFICATION HISTORY: Created 10/27/92 Josh Stillerman
DSQL
[Previous Routine] [Next Routine] [List of Routines]
NAME: DSQL PURPOSE: Do dynamic SQL expression. CATEGORY: MDSPLUS CALLING SEQUENCE: ans = DSQL(expression [,arg1,...,argn] [,COUNT=count]$ ;number of selected items [,DATE=date]$ ;binary date format [,ERROR=error]$ ;VMS error code [,EXCESS=excess]$ ;allow excessive args (ignored on this pass) [,QUIET=quiet]$ ;suppress printing of error message [,STATUS=status]) ;VMS error code INPUT PARAMETERS: expression = character string with SQL operation OPTIONAL INPUT PARAMETERS: arg1,...,argn = values to substitute into the expression for "?" input parameters. KEYWORDS: See above. OUTPUTS: None except for SELECT operations where the remaining arg1,...argn variables receive the output. They may not be expressions or constants. COMMON BLOCKS: None. SIDE EFFECTS: SQL database opened or accessed. RESTRICTIONS: First operation must be "DECLARE SCHEMA FILENAME xx" or else SQL$DATABASE will be used and you are limited to 12 arguments. PROCEDURE: This dummy procedure will LINKIMAGE to the real function. Once done, this procedure will not be reinvoked. MODIFICATION HISTORY: Idea by T.W. Fredian, September 22, 1992
EDIT_MENU
[Previous Routine] [Next Routine] [List of Routines]
NAME: Edit_Menu PURPOSE: To allow cut and paste from a display table. CATEGORY: Widgets. CALLING SEQUENCE: See below. INPUTS: base0 the top widget. basex appropriate widget base. text a text widget ID. title the label for the event manager. KEYWORD PARAMETERS: None. OUTPUTS: None. OPTIONAL OUTPUT PARAMETERS: None. COMMON BLOCKS: EditCommon SIDE EFFECTS: Initiates the XManager if it is not already running. RESTRICTIONS: Can require X_Table to display the clipboard. PROCEDURE: Defines a widget, acts on events. MODIFICATION HISTORY: 17-Mar-92 KKLARE design 24-Mar-92 KKLARE add paste before 30-Apr-92 KKLARE add file in/out
FATEST
[Previous Routine] [Next Routine] [List of Routines]
NAME: FATEST PURPOSE: Display CAMAC module's response to all F's and A's CATEGORY: ? CALLING SEQUENCE: FATEST,module INPUTS: Module = string of module's name like '_SHA1:N23' or "TEST_SPY". OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: Will change module's settings. RESTRICTIONS: Must have ORNL CAMAC software. Must have set up IDLCAM with CAM$ procedure. PROCEDURE: Double loop, 18 lines of printout. MODIFICATION HISTORY: KAK written 15-Sep-1988. KAK 23-Oct-1990 V2 trnlog change, still doesn't match LNM_CAMAC table.
FILE_DATE
[Previous Routine] [Next Routine] [List of Routines]
NAME: FILE_DATE.PRO PURPOSE: Get file's date and time. CATEGORY: VMS-only File system CALLING SEQUENCE: date=FILE_DATE,filename[,/UNIX][,/BINARY][,/MODIFIED] INPUTS: filename The full file name (may not be remote) OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: (none) gives date form 18-Jun-1992 11:27:19. /BINARY gives number of 10^-7 seconds since 17-Nov-1858 00:00;00.00, i.e., tics since Julian day 3,000,000. It is quadword date in long(2) format. /UNIX gives Unix date form Sun Sep 16 01:03;52 1984\n. /JULIAN gives floating Julian date - 3 million. /BINARY /UNIX gives seconds since 1-Jan-1970 00:00:00. /MODIFIED uses modified date, otherwise the creation date. OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Links to VAXCRTL and LIBRTL. RESTRICTIONS: -- PROCEDURE: Straightforward with some magic. MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)18-Jun-1992 Initial coding with TWF help. KK 3-Aug-92 add Julian day
GET_COLUMNS
[Previous Routine] [Next Routine] [List of Routines]
NAME: GET_COLUMNS.PRO PURPOSE: Get column names of an Rdb table. CATEGORY: ?? CALLING SEQUENCE: rows = GET_COLUMNS('table'[,columns[,types[,lengths[,scales[,tables]]]]]) INPUTS: TABLE is the name of a table, can be wildcarded. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: MATCH=match a string to be matched using wildcards. Use % for any string, _ for any one character. Sybase is case-sensitive. /QUIET to suppress error messages. STATUS=status to get error code. OPTIONAL OUTPUT PARAMETERS: COLUMNS is the column names. TYPES is the VMS data type of Rdb or Sybase type number. type/VMS Fortran C IDL SQL Sybase 6 B byte char -- 514 TINYINT 48 SYBINT1 7 W integer*2 word integer 500 SMALLINT 52 SYBINT2 8 L integer*4 long long 496 INTEGER 56 SYBINT4 9 Q -- -- 504 QUADWORD -- 10 F real*4 float float 480 REAL FLOAT(len=4) 59 SYBREAL 14 T character char* string 452 CHAR 47 SYBCHAR 27 G real*8 double double 480 DOUBLE PRECISION 62 SYBFLT8 35 ADT -- -- -- 502 DATE 61 SYBDATETIME/111 SYBDATETIMN 37 VT -- -- string 448 VARCHAR 23 SYBVARCHAR 261 -- -- -- -- 508 SEGMENTED STRING ID 35 SYBTEXT/34 SYBIMAGE LENGTHS is the number of bytes per element. SCALES is the places after the decimal (integers). TABLES is the name of the table found. SIDE EFFECTS: Opens VMS SQL$DATABASE if no database defined. RESTRICTIONS: VAX dynamic SQL or Sun-Sybase Requires declared database VMS descriptor types. PROCEDURE: Join Rdb/Sybase tables to get info. MODIFICATION HISTORY: KKlare, LANL P-4 (c)07-May-1991 Initial coding KKlare, LANL P-4 (c)09-May-1991 Allow selection KKlare, LANL P-4 (c)26-Aug-1991 Add status, remove domains, add tables KKlare, LANL P-4 (c)22-Jul-1993 Add Sybase
GET_SUMMARY
[Previous Routine] [Next Routine] [List of Routines]
NAME: GET_SUMMARY.PRO PURPOSE: Returns values out of the time slice table. CATEGORY: LOGBOOK CALLING SEQUENCE: value = get_summary, shot, field [,/quiet] [,status=status] [,filled_in=filled_in] INPUTS: shot - shot to retrieve summary info from. field - name of the field to get (see list below) RETURNS value - value from the summary table KEYWORDS \QUIET - if set does not print out error messages STATUS = status - return the status of the command FILLED_IN = filled_in - returns whether or not this column has been filled in. CURRENT LIST OF FIELDS: Name Type Description ................................................................ Shot Shot number Gas1 Working Gas (majority species) Btor T maximum toroidal field Ipmax MA Maximum plasma current t_Ipmax S time of max current POH MW Ip times surface voltage at time of maximum plasma current Wtotmax_ffit MJ Maximum stored energy according to FFIT t_Wtot_max S time of max stored energy nemax_TCI /M^3 Maximum line average electron density from TCI t_nemax_TCI S time of max density Temax_ECE KeV Maximum central electron temperature from ECE nemax_Thomson /M^3 Maximum central electron density from TS Temax_Thomson KeV Maximum central electron temperature from TS Zeff Zeff at time of maximum density Prad MW Total radiated power at time of maximum density a_ffit M minor radius at time of maximum current according to FFIT R_ffit M major radius at time of maximum current " " kappa_ffit elongation according to FFIT at time of max current topology limited, single null, etc at time of maximum current Disruptivity did it disrupt? t_disrupt S time of disruption (if disruptivity = .true.) pulse_length S total time with Ip > .05 Ip_max OUTPUTS: -- NONE COMMON BLOCKS: -- NONE SIDE EFFECTS: None RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. SET_DATABASE,"LOGBOOK" must be done before using this routine. MODIFICATION HISTORY: 10/25/93 JAS ------------------------------------------------------------------------------------- EXAMPLES RF = GET_SUMMARY(931013001, "PULSE_LENGTH")
GET_TABLES
[Previous Routine] [Next Routine] [List of Routines]
NAME: GET_TABLES PURPOSE: Get user/system/all Rdb tables CATEGORY: MDSplus CALLING SEQUENCE: rows = GET_TABLES( INPUTS: -- OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: /ALL to all tables, default is the user tables /SYSTEM to get system tables MATCH=match a string to be matched using wildcards. Use % for any string, _ for any one character. /QUIET to suppress error messages. STATUS=status to get error code. OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: TABLES is trailing blank string name(s). ROWS is the number of rows in each table. Not avail. for Sybase. FLAGS is 1 for a view. COMMON BLOCKS: -- SIDE EFFECTS: Opens SQL$DATABASE if no database defined. RESTRICTIONS: VAX dynamic SQL. Requires declared database. Rdb only. PROCEDURE: Query the relations table. MODIFICATION HISTORY: KKlare, LANL P-4 (c)06-May-1991 Based on SHOW_TABLES KKlare, LANL P-4 (c)09-May-1991 Add table select KKlare, LANL P-4 (c)26-Aug-1991 Add status KKlare, LANL P-4 (c)22-Jul-1993 Add Sybase
GET_TIME_SLICE
[Previous Routine] [Next Routine] [List of Routines]
NAME: GET_TIME_SLICE.PRO PURPOSE: Returns values out of the time slice table. CATEGORY: LOGBOOK CALLING SEQUENCE: value = GET_TIME_SLICE(table, shot, time, field, window=window) INPUTS: table - table to retrieve slice from (CORE) shot - shot to retrieve slice from time - time of slice to retrieve field - name of the field to get (see list below) RETURNS value - value from the time_slice list is: CURRENT LIST OF FIELDS in core: Name Type Description ................................................................ REQUESTOR CHAR(14) USER_DOM SHOT INTEGER C-Mod shot number TIME_SLICE real sec time of time slice NAME CHAR(12) time slice specifier DESCRIPTION CHAR(132) comments + standard phrases/steady-state/H-model /L-H transition/disruptive TOPIC CHAR(132) keyword phrases eg Confinement/Density limit/ Pellet injection/etc... GAS_MAJ CHAR(4) majority species (H2, D2, etc.) GAS_MIN CHAR(4) minority species (H2, D2, etc.) MIN_FRAC REAL minority fraction GAS_IMP CHAR(8) puffed impurities (argon, etc) A REAL m minor radius R REAL m major radius (mag axis) Z REAL m Z position of Mag axis KAPPA REAL elongation DELTA_U REAL upper triangularity DELTA_L REAL lower triangularity TOPOLOGY CHAR(3) limited, upper/lower single, double null GAP_INNER REAL m inner gap GAP_OUTER REAL m outer gap (to RF limiter) BETAP_LI2 REAL plasma + mag term (where not separable) BETAP REAL beta poloidal from efit LI REAL internal inductance INDUCTANCE REAL H plasma inductance BETAT REAL beta toroidal from efit W_MHD REAL joule energy content from efit DWMHDDT REAL watt time derivative of stored energy from efit TAUE_MHD REAL sec global energy conf. from magnetics QPSI_95 REAL safety factor V_SURF REAL volt Surface voltage V_RES REAL volt Resistive component of surface voltage V_IND REAL volt inductive voltage V_AXIS REAL volt Central voltage POH REAL Watt Ohmic heating power VOLUME REAL m^3 total plasma volume AREA REAL m-2 plasma surface area POL_AREA REAL m_2 poloidal cross section area BT REAL tesla toroidal field at R = .66 m BTSIGN TINYINT sign of bt DTBDT REAL IP REAL MA plasma current IPSIGN TINYINT sign of IP BETAP_DIA REAL beta toroidal from diamagnetism W_DIA REAL Joule stored energy from diamagnetism TAUE_DIA REAL sec tauE from diamagnetism SAWTOOTH CHAR(1) (y/n) sawtoothing F_SAWTOOTH REAL sec-1 sawtooth period PHASE_SAWTOOTH REAL degree sawtooth phase at time slice A_SAWTOOTH REAL delta sawtooth/total signal R_SAWTOOTH REAL m sawtooth inversion radius ELMS CHAR(12) ELM description NE0_TCI REAL 10e20/m3 peak density from TCI NEBAR_TCI REAL 10e20/m3 line ave density (vert. through Ro) from TCI NE_VOL_TCI REAL 10e20/m3 volume av density N_TOT_TCI REAL 10e20 total particle inventory TAUP_GLOBAL REAL sec global particle confinement time NE0_YAG REAL 10^20/m3 peak density from YAG TE0_YAG REAL eV peak Te from YAG TE0_ECE REAL eV peak Te from ece TE0_ECE_GWID REAL m Te gauss profile width factor from ece TE0_ECE_TWID REAL m Te trapezoid profile width factor from ece TE0_VOL_ECE REAL eV volume averaged Te from ece TI0_HIREX REAL eV peak Ti from HIREX TE_PHA REAL eV Te from PHA RDD REAL sec^-1 DD neutron rate TI0_NEUT REAL eV Ti from neutron rate ZEFF_AV REAL single channel Zeff ETA_RATIO REAL eta/eta_classical MARFE CHAR(1) (y/n) marfe existing PRAD REAL watt total radiated power PRAD0 REAL watt/m^3 central radiated power density P0_MID REAL torr midplane neutral pressure P0_DIV REAL torr divertor neutral pressure X_HARD REAL AU Hard xray emission PICRF_1 REAL Watt Net RF power PICRF_2 REAL Watt Net RF power LAMDA REAL coulomb logrythm W_KIN REAL joule total energy content - from kinetic diag. WE_KIN REAL joule electron energy content - from kinetic diag. WI_KIN REAL joule ion energy content (thermal)- from kinetics WI_TAIL REAL joule ion tail energy content DW_DT_KIN REAL watt time derivative of stored energy from diag TAUE_KIN REAL sec global energy conf. from diagnostics NU_I REAL ion collisionality NU_E REAL electron collisionality RHOSTAR REAL rho(0)/a DPEL_TIME REAL sec Time of last pellet fired before time slice DPEL_SIZE REAL nominal pellet size (numbers of electrons) DPEL_DN INTEGER actual pellet delta n (n electrons) DPEL_VEL REAL m/sec pellet velocity DPEL_PEN REAL M major radius reached by pellet DPEL_SPECIES CHAR(2) species (H, D, Ne) of pellet LIPEL_TIME REAL sec Time of last pellet fired before time slice LIPEL_SIZE REAL nominal pellet size LIPEL_DN INTEGER actual pellet delta n (n electrons) LIPEL_VEL REAL m/sec pellet velocity LIPEL_PEN REAL M major radius reached by pellet LIPEL_SPECIES CHAR(2) species (Li, Carbon, Boron) of pellet IMPINJ_TIME REAL sec Time of impurity injection before time slice IMPINJ_SPECIES CHAR(2) Name of injected impurity OUTPUTS: -- NONE COMMON BLOCKS: -- NONE SIDE EFFECTS: None RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. SET_DATABASE,"LOGBOOK" must be done before using this routine. MODIFICATION HISTORY: 10/14/93 JAS 3/1/94 JAS - added table ------------------------------------------------------------------------------------- EXAMPLES RF = GET_TIME_SLICE('CORE', 931013001, .01, "RF")
H0_CONTROL
[Previous Routine] [Next Routine] [List of Routines]
NAME: H0_CONTROL PURPOSE: Provide push buttons to init,trigger and store H0 modules CATEGORY: MDSPLUS CALLING SEQUENCE: H0_CONTROL INPUTS: None. OUTPUTS: None. A widget interface is used to allow push buttons. COMMON BLOCKS: None. RESTRICTIONS: None. MODIFICATION HISTORY:
INTEGERIZE
[Previous Routine] [Next Routine] [List of Routines]
NAME: INTEGERIZE PURPOSE: Scales floating point numbers into integers and returns a coef and offset to scale them back. CATEGORY: MDSPLUS CALLING SEQUENCE: integerize,in_array, out_array, out_expr, coef, offset[, bits=bits] INPUT PARAMETERS: in_array - The array of values to be scaled Keywords: bits - number of bits to use int eh out_array. defaults to 16. OUTPUTS: out_array - The scaled integer values out_expr - The expression to use in MDS$PUT. '$VALUE*$+$ coef - The coefficent to use in out_expr to get back the input offset - the offset to use in out_expr to get bak the input COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Scale the input to the range -2^bits-1 .. 2^bits-1 and return this and the coef and offset used. MODIFICATION HISTORY: VERSION 1.0, CREATED BY Josh Stillerman, May 8, 1992
INTERPOL
[Previous Routine] [Next Routine] [List of Routines]
NAME: INTERPOL PURPOSE: Linearly interpolate vectors on an ordered grid. CATEGORY: E1 Interpolation CALL: Result = INTERPOL(V, N) Regular grid Result = INTERPOL(V, X, U) Irregular grid INPUTS: V Input VECTOR of NUMERIC type. For regular grid N Number of points in result. Grids are assumed regular (equispaced). Xout = FINDGEN(n)/N_ELEMENTS(v) For irregular grids X Absicissas of V. non-complex numeric type. Must have the same number of elements as V. MUST be strictly monotonic ascending or descending. U Absicissas of Result. May have any order. OUTPUTS: Result Floating-point values corresponding to the N input positions or of the same shape as U PROCEDURE: Adapted from IDL routine INTERPOL with speed inprovements. EXAMPLES: j = INTERPOL([1,2,3,4], 2) returns [1.,4.] j = INTERPOL([1,2,3,4], [3,2,1,0], 2.5) returns 1.5 HISTORY: 09-Apr-1993 Ken Klare, LANL P-4 (c)1993
ISQL
[Previous Routine] [Next Routine] [List of Routines]
NAME: ISQL PURPOSE: Do interactive SQL expression. CATEGORY: MDSPLUS CALLING SEQUENCE: count = ISQL(expression ;valid SQL operation [,COUNT=count]$ ;number of selected items [,ERROR=error]$ ;VMS error code [,HEAD=head]$ ;Output format for header 0,1,2 [,QUIET=quiet]$ ;suppress printing of error message [,STATUS=status]$ ;VMS error code [,TEXT=text]$ ;return as variable, not printed [,WIDTH=width]) ;nominal width of display text, default=term INPUT PARAMETERS: expression = character string with SQL operation OPTIONAL INPUT PARAMETERS: None. KEYWORDS: See above. OUTPUTS: None except for SELECT operations where the remaining arg1,...argn variables receive the output. They may not be expressions or constants. COMMON BLOCKS: None. SIDE EFFECTS: SQL database opened or accessed. Markers in expression (?) will prompt for input. RESTRICTIONS: First operation must be "DECLARE SCHEMA FILENAME xx" or else SQL$DATABASE will be used and you are limited to 12 arguments. PROCEDURE: This dummy procedure will LINKIMAGE to the real function. Once done, this procedure will not be reinvoked. MODIFICATION HISTORY: Idea by T.W. Fredian, September 22, 1992
JULDAYSHT
[Previous Routine] [Next Routine] [List of Routines]
NAME: JULDAYSHT PURPOSE: Convert array of CMOD shots to array of Julian days CATEGORY: CMOD CALLING SEQUENCE: ans = JULDAYSHT(shots) INPUT PARAMETERS: shots = array of CMOD shot numbers (date encoded as yymmddnnn) OPTIONAL INPUT PARAMETERS: none Keywords: none OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Call JULDAY with appropriate values from shot number. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, October 26,1993
LOADBIRA
[Previous Routine] [Next Routine] [List of Routines]
NAME: LOADBIRA PURPOSE: Loads waveform programming from another shot CATEGORY: MDSplus,CMOD CALLING SEQUENCE: LOADBIRA,shot,bira-node-name[,CHANNELS=channel-array] INPUTS: shot - shot number from which waveforms are to be fetched bira-node-name - node name of bira B5910A device KEYWORDS: CHANNELS - selects which channels to retrieve and load OUTPUTS: -- Data loaded into CHANNEL_n:PROGRAMMING. COMMON BLOCKS: -- None. SIDE EFFECTS: Links to IDLSQLSHR and MDSSQLSHR. RESTRICTIONS: None. MODIFICATION HISTORY: 1/27/95 - TWF EXAMPLES LOADBIRA,950127001,'/RF::TOP.TRANSMITTERS.CAMAC:B5910A',CHANNELS=[1,2] LOADBIRA,950127001,'/RF::TOP.TRANSMITTERS.CAMAC:B5910A'
LOCATE
[Previous Routine] [Next Routine] [List of Routines]
NAME: LOCATE PURPOSE: Do a binary search for the index(es) in a sorted table. Finds Index such that Value is between Table(Index) and Table(Index+1). If Table ascends then: Table(Index) LE Value LT Table(Index+1) Index is -1 only for Value LT Table(0) -- too low Index is n-1 only for Value GE Table(n-1) -- high or too high For a descending series, result is (n-1) - the_ascending_series. CATEGORY: Searching and sorting. CALL: Index = LOCATE(Table, Value) INPUTS: Table sorted list of number/text values (a vector) Value scalar/array of number/text to look up OPTIONAL INPUTS: KEYWORDS: OUTPUTS: Index the index(es) of Value in Table, from 0 to n. Long integer of same shape as Value. OPTIONAL OUTPUTS: RESTRICTIONS: Must compare text with text, numbers with numbers PROCEDURE: Adapted and vectorized from Numerical Recipes. Approx. worst timing: (Ceiling(Log2(N_ELEMENTS*(Table))+1) * vector(divide, 2*add, 4*compare, 2*WHERE) on Value EXAMPLES: j = LOCATE([1,2,3,4], 3.5) returns 2L. j = LOCATE([4,3,2,1], [.5,1,4,4.5]) is [3L,3L,0L,-1] NOTE: Should be useful in constructing reverse lookup like arbitrary axis subscripting. HISTORY: 09-Apr-1993 Ken Klare, LANL P-4 (c)1993 5-Apr-1993 KAK use MAKE_ARRAY 7-Sep-1993 KAK logic for descending. (Labombard@edge1.psfc.mit) 7-Sep-1993 KAK allow scalar lookup
LOGBOOK_EVENT
[Previous Routine] [Next Routine] [List of Routines]
NAME: Logbook_Event PURPOSE: To handle WLogbook events and query further. CATEGORY: MDSplus CALLING SEQUENCE: (indirect) INPUTS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: LogCom. (EditCommon from Edit_Menu.) LogWdg. SIDE EFFECTS: -- RESTRICTIONS: See SQL.PRO. PROCEDURE: Handles events and creates new widgets, allow queries, and exit.
LOGBOOK_RUN
[Previous Routine] [Next Routine] [List of Routines]
NAME: Logbook_Run.PRO PURPOSE: Create a new Logbook run. CATEGORY: MDSplus CALLING SEQUENCE: Logbook_Run, run, brief INPUTS: run integer run number, -1 uses maximum run brief text brief description of the shot OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Links to IDLSQLSHR and MDSSQLSHR. RESTRICTIONS: Uses VAX dynamic SQL. Logbook logical must be defined and point to an Rdb Logbook. PROCEDURE: Use IDLSQL image to link to SQL_DYNAMIC with IDL or USER routines. MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)12-Jun-1992 Initial coding.
LOGBOOK_SHOT
[Previous Routine] [Next Routine] [List of Routines]
NAME: Logbook_Shot.PRO PURPOSE: Create a new Logbook shot. CATEGORY: MDSplus CALLING SEQUENCE: Logbook_shot, expt, run, shot, brief INPUTS: expt text experiment name only used if shot=0. run integer run number, -1 uses maximum run shot integer shot number, 0 uses "Current shot" brief text brief description of the shot OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Links to IDLSQLSHR and MDSSQLSHR and possibly MDSSHR. RESTRICTIONS: Uses VAX dynamic SQL. Logbook logical must be defined and point to an Rdb Logbook. PROCEDURE: Use IDLSQL image to link to SQL_DYNAMIC with IDL or USER routines. MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)12-Jun-1992 Initial coding.
LOGSETSENSITIVE
[Previous Routine] [Next Routine] [List of Routines]
NAME: LogSetTable.PRO PURPOSE: Setup for WLogbook and Logbook_Event. CATEGORY: MDSplus CALLING SEQUENCE: (indirect) INPUTS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: LogCom widgets LogSensitive internal static EditCommon from Edit_Menu DB_TYPES data types in order SIDE EFFECTS: several. RESTRICTIONS: See SQL.PRO. PROCEDURE: --
LOOKUPAKM
[Previous Routine] [Next Routine] [List of Routines]
NAME: LOOKUPAKM.PRO PURPOSE: Spline interpolate along a uniform/nonuniform axis. CATEGORY: Interpolation/extrapolation CALAKMG SEQUENCE: y = LOOKUPAKM(x, xx, yy) INPUTS: x the evaluation points. xx the vector of abscisae. yy the vector of ordinates. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: -- RESTRICTIONS: Requires at least 2 points for xx and yy. PROCEDURE: Create (4,nxx) coefficient array for CSVAL using AKIMA method. Use a vector Cubic Spline. (This has search and interpolate.) MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)23-Jun-1992 Initial coding.
LOOKUPLIN
[Previous Routine] [Next Routine] [List of Routines]
NAME: LOOKUPLIN.PRO PURPOSE: Linear interpolate along a uniform/nonuniform axis. CATEGORY: Interpolation/extrapolation CALLING SEQUENCE: y = LOOKUPLIN(x, xx, yy) INPUTS: x the evaluation points. xx the vector of abscisae. yy the vector of ordinates. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: -- RESTRICTIONS: Requires at least 2 points for xx and yy. PROCEDURE: Create (2,nxx) coefficient array for PPVAL. Use a vector Piecewise Polynomial. (This has search and interpolate.) MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)22-Jun-1992 Initial coding.
MAKE_RUN
[Previous Routine] [Next Routine] [List of Routines]
NAME: MAKE_RUN PURPOSE: Procedure to insert/update a CMOD run record. Also sets the current shot to ) of today if the current shot number is not from today. CATEGORY: CMOD Shot cycle CALLING SEQUENCE: MAKE_RUN invoked by MAKE_RUN_MAIN.PRO INPUTS: NONE KEYWORD PARAMETERS: NONE OUTPUTS: NONE COMMON BLOCKS: None. SIDE EFFECTS: Inserts a run record into the logbook database. If it is already there then it optionally updates this record. Sets the current shot number of CMOD to shot 0 of today if it is not already a shot from today. MODIFICATION HISTORY: 3/6/95 - JAS Adapted from original IDL MAIN
MAKE_SCOPE
[Previous Routine] [Next Routine] [List of Routines]
NAME: MAKE_SCOPE PURPOSE: Create a scope defaults file with pannels which match a wild card specification CATEGORY: MDSPLUS CALLING SEQUENCE: MAKE_SCOPE, file-name, wild-card [,COLUMNS=n] [,EVENT=event-name] [,SHOT=shot-number] INPUT PARAMETERS: file-name - name of the file to create wild-card - a tree wildcard specification to make scope pannels out of. Keywords: COLUMNS - number of columns for the scope. defaults to 8 traces / column. EVENT - update event name. Defaults to current experiment name SHOT - shot number to use. Defaults to zero. OUTPUTS: a file containing a scope setup. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: A tree must be open. PROCEDURE: MODIFICATION HISTORY: VERSION 1.0, CREATED BY Josh Stillerman, October 7,1992
MDS$CLOSE
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$CLOSE PURPOSE: Close an open MDSplus experiment model or pulse file CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$CLOSE[,experiment,shot][,/QUIET,STATUS=ISTAT] OPTIONAL INPUT PARAMETERS: experiment = name of the experiment used in an invocation of MDS$OPEN. shot = shot number of the file. If both experiment and shot are omitted, all files will be closed. Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDS$CLOSE and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDS$CUR_SHOT
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$CUR_SHOT PURPOSE: Returns the current shot of an MDSplus experiment CATEGORY: MDSPLUS CALLING SEQUENCE: answer = MDS$CUR_SHOT(experiment-name[,/QUIET][,STATUS=istat]) INPUT PARAMETERS: experiment-name = name of the experiment. Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success answer = shot number as result of function (long). COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDS$GET_CURRENT_SHOTID and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDS$DECOMPILE
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$DECOMPILE PURPOSE: Returns the decompilation of a node specified by name CATEGORY: MDSPLUS CALLING SEQUENCE: answer = MDS$DECOMPILE(node-spec[,/QUIET],[STATUS=status]) INPUT PARAMETERS: node_spec = name of the node to decompile Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success answer = the decompiled text result of function (string). COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: written to avoid the evaluate / don't evaluate delemma for MDS$VALUE calls. make a tring to hand to MDS$VALUE. MODIFICATION HISTORY: VERSION 1.0, CREATED BY Josh Stillerman, June 25,1991 VERSION 1.1, Removed EXECUTE Steve Wolfe June 26, 1991 VERSION 1.2, Fixed '\' vs '\\' problem. Josh Stillerman Sept. 24, 1992
MDS$DECOMP_TREE
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$DECOMP_TREE PURPOSE: Create a TCL command procedure to regenerate the tree CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$DECOMP_TREE,experiment[,shot] experiment = name of the experiment OPTIONAL INPUT PARAMETERS: shot = shot number of the file. If omitted, the model will be decompiled Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Creates a file called experiment_shot.TCL which contains the TCL commands necessary to regenerate the tree. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, Sept 22,1992
MDS$DIRECTORY
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$DIRECTORY PURPOSE: Get a directory of nodes in an MDSplus tree CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$DIRECTORY[,node-spec][,/FULL][,/QUIET][,STATUS=istat] OPTIONAL INPUT PARAMETERS: node-spec = node specification, can contain wildcards Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Invokes MDS$TCL procedure MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDS$IDL_STARTUP
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$IDL_STARTUP PURPOSE: Invoked by IDL device when first executed. This file provides a site customizable initialization routine for IDL when executing IDL devices. CATEGORY: MDSPLUS (MIT$DEVICES) CALLING SEQUENCE: IDL_STARTUP is assigned to this file before IDL is invoked by IDL device. INPUT PARAMETERS: None. Keywords: None. OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Site customizable (Initially contains only mdsplus and sql) MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, August 14,1992
MDS$MAKE_HELP
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$MAKE_HELP PURPOSE: Create MDSPLUS.HELP in IDL_DIR:[HELP] CATEGORY: MDSPLUS CALLING SEQUENCE: .RUN MDS$MAKE_HELP OPTIONAL INPUT PARAMETERS: None Keywords: None OUTPUTS: IDL_DIR:[HELP]MDSPLUS.HELP file created COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MK_LIBRARY_HELP MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, August 13,1992
MDS$OPEN
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$OPEN PURPOSE: Open an MDSplus experiment model or pulse file CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$OPEN,experiment,shot[,/QUIET][,STATUS=ISTAT] INPUT PARAMETERS: experiment = name of the experiment whose model or pulse file you want to open. shot = shot number of the file. Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDS$OPEN and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDS$PLAY_AUDIO
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$PLAY_AUDIO PURPOSE: Play a file recorded by DECSOUND program CATEGORY: GENERAL CALLING SEQUENCE: MDS$PLAY_AUDIO,filename[,/SPEAKER,VOLUME=percent] INPUT PARAMETERS: filename = file specification of audio file recorded by DECSOUND Keywords: SPEAKER = use internal speaker, if omitted, sound is played through the headset jack. VOLUME = integer volume percent from 0 to 100. Default is 70 percent. OUTPUTS: Sound COMMON BLOCKS: DIVA_COMMON SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: This procedure calls routines in the DIVA$LIB_SHR which support the audio hardware present on VAXstation 4000 series workstations. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, October 13,1992
MDS$PUT
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$PUT PURPOSE: Store data into MDSplus tree node. CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$PUT,nodename,expression[,arg1,...,argn][,/QUIET][STATUS=stat] INPUT PARAMETERS: nodename = character string containing a valid tree node specifier expression = character string containing a valid MDSplus expression OPTIONAL INPUT PARAMETERS: arg1,...,argn = values to substitute into the expression where "$" or "$n" placeholders indicate. Keywords: QUIET = prevents IDL error if procedure fails STATUS = return status, low bit set = success OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: This is actually a dummy procedure which will LINKIMAGE in the real function. Once the function is LINKIMAGE'd in, this procedure will not be reinvoked. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, September 22,1992
MDS$QEVENT
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$QEVENT PURPOSE: Queue events for this MDSplus event CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$QEVENT,event[,/QUIET][,STATUS=istat] INPUT PARAMETERS: event = name of an MDSplus event to queue Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDS$WTEVENT and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDS$SAY_NUMBER
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$SAY_NUMBER PURPOSE: Say a number from 0 to 999 CATEGORY: GENERAL CALLING SEQUENCE: MDS$SAY_NUMBER,number[,/SPEAKER,VOLUME=percent] INPUT PARAMETERS: number = a number from 0 to 999 Keywords: SPEAKER = use internal speaker, if omitted, sound is played through the headset jack. VOLUME = integer volume percent from 0 to 100. Default is 70 percent. OUTPUTS: Sound COMMON BLOCKS: DIVA_COMMON SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: This procedure calls routines in the DIVA$LIB_SHR which support the audio hardware present on VAXstation 4000 series workstations. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, December 3,1992
MDS$SETEVENT
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$SETEVENT PURPOSE: Generates an MDSplus event CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$SETEVENT,event[,/QUIET][,STATUS=STATUS][,DATA=data] INPUT PARAMETERS: event = Name of MDSplus event to generate. Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success DATA = bytarr(12) to send with event OUTPUTS: istat = return status, low bit set = success COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDS$OPEN and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDS$SET_DEF
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$SET_DEF PURPOSE: Set default to a node in an MDSplus tree CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$SET_DEF,NODE INPUT PARAMETERS: node = Node specification. Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDS$SET_DEFAULT and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDS$SHOT_LIST
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$SHOT_LIST.PRO
PURPOSE: Returns an array of shots which meet some criteria. CATEGORY: MDSplus CALLING SEQUENCE: list = MDS$SHOT_LIST() list = MDS$SHOT_LIST(runid) list = MDS$SHOT_LIST([runid, runid, ...]) list = MDS$SHOT_LIST(start=starting-runid, stop = ending_runid)
INPUTS: OPTIONAL INPUT PARAMETERS: -- run - the run for which you want the list of shots. Optionally an array of runs. KEYWORD PARAMETERS: -- start - the first run of a range of runs to be returned. stop - the last run of a range of runs to be returned. OUTPUTS: returns an array of shot numbers. OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. SQL and SET_DATABASE,"LOGBOOK" commands must have been issued to use this procedure. MODIFICATION HISTORY: Josh Stillerman(c)15-Oct-1991 Initial coding
MDS$SKIM
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$SKIM PURPOSE: Skim an MDSplus experiment model or pulse file CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$SKIM,experiment,shot[,/QUIET][,STATUS=ISTAT] INPUT PARAMETERS: experiment = name of the experiment whose model or pulse file you want to skim. shot = shot number of the file. Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDS$SKIM and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, September 7, 1994
MDS$SKIM_MINE
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$SKIM_MINE PURPOSE: Skim all shots that this user has retrieved from optical that have not been opened by other users. CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$SKIM_MINE [,TREES ,SHOTS] [/NOSKIM] [MAXSKIM=n] INPUT PARAMETERS: none. Keywords: /NOSKIM = Do not perform skim, just get list of trees and shots. MAXSKIM = Specify maximum number of shots to skim during this invokation OUTPUTS: TREES = Array of tree names that were or would have been skimmed if /NOSKIM was not specified. SHOTS = Array of shot numbers corresponding to tree names in TREES COMMON BLOCKS: None. SIDE EFFECTS: The archive database is accessed and an SQL_FINISH is executed at the end to close the database RESTRICTIONS: None. PROCEDURE: Find all trees that have been restrieved from optical by this user which have not been accessed by any other user (SOLE_ACCESS is not null) and skim them unless /NOSKIM was specified. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, September 7, 1994
MDS$TCL
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$TCL PURPOSE: Invokes the MDSplus Tree Command Language interpretter CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$TCL[,command [,/QUIET],[STATUS=istat] INPUT PARAMETERS: command = A valid TCL command. If omitted, TCL will prompt for input. Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: istat = return status, low bit set = success COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDSDCL$DO and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDS$VALUE
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$VALUE PURPOSE: Return the evaluation on an MDS expression CATEGORY: MDSPLUS CALLING SEQUENCE: ans = MDS$VALUE(expression[,arg1,...,argn][,/QUIET][STATUS=stat]) INPUT PARAMETERS: expression = character string containing a valid MDSplus expression OPTIONAL INPUT PARAMETERS: arg1,...,argn = values to substitute into the expression where "$" or "$n" placeholders indicate. Keywords: QUIET = prevents IDL error if procedure fails STATUS = return status, low bit set = success OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: This is actually a dummy procedure which will LINKIMAGE in the real function. Once the function is LINKIMAGE'd in, this procedure will not be reinvoked. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, September 22,1992
MDS$VMS_ERROR
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$VMS_ERROR PURPOSE: Issue a message containing the VMS error message CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$VMS_ERROR,errmsg,vms_status INPUT PARAMETERS: errmsg = text associated with message vms_status = vms longword status return Keywords: None. OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, May 11,1995
MDS$WFEVENT
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDS$WFEVENT PURPOSE: Wait for an MDSplus event CATEGORY: MDSPLUS CALLING SEQUENCE: MDS$WFEVENT,event[,/QUIET][,STATUS=istat][,DATA=data] INPUT PARAMETERS: event = name of an MDSplus event to wait for. Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success DATA = return event data OUTPUTS: istat = return status, low bit set = success COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Straightforward. Makes a call to MDSplus shared image library procedure MDS$WTEVENT and checks for errors. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
MDSEVENT
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDSEVENT PURPOSE: Establish an MDS Event Widget Event in an IDL Widgets application. CATEGORY: MDSPLUS/IDL WIDGETS CALLING SEQUENCE: MDSEVENT,id,event-name INPUT PARAMETERS: id = widget id of base widget in widget hierarchy event-name = name of event Keywords: None. OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: MDSEVENT will establish an MDS Event watch such that an Widget event will be generated whenever the named event occurs. The widget event generated will be a structure called defined as follows: {mds_event,id:0L,top:0L,handler:0L,event_info:mds_event_info_struct} where the event_info structure is defined as follows: {mds_event_info,stub_id:0L,base_id:0L,event_id:0L,pid:0L,name:event-name, data:bytarr(12),event_ptr:0l} MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, December 14, 1993
MDSPLUS
[Previous Routine] [Next Routine] [List of Routines]
NAME: MDSPLUS PURPOSE: Installs the MDS$PUT and MDS$VALUE MDSplus interface functions CATEGORY: MDSPLUS CALLING SEQUENCE: answer = MDS$VALUE(expression[,arg1...,argn][,/QUIET][,STATUS=idl_variable]) MDS$PUT,node-spec,expression[,arg1...,argn][,/QUIET][,STATUS=idl_variable] INPUT PARAMETERS: node-spec = node specification of node to receive data. No wildcards. expression = MDSplus expression. Use $[n]'s for replacement arguments arg1...argn = Optional replacement arguments. Data in IDL variables are substituted into placeholders in expression ($, or $1,$2,$3...). Keywords: QUIET = prevents IDL error if TCL command fails STATUS = return status, low bit set = success OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Linkimage of special MDS/IDL interface routines for doing operations. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, April 22,1991
RETRIEVE
[Previous Routine] [Next Routine] [List of Routines]
NAME: RETRIEVE.PRO PURPOSE: Retrieves records from the summary relation in the logbook database. CATEGORY: MDSplus CALLING SEQUENCE: RETRIEVE,"field-name",array_to_put_result INPUTS: field-name - one of the fields in the summary relation as of now the CURRENT LIST OF FIELDS: Name Description ---- ------------------------------- SHOT : Shot number like 911024001 IPMAX : Maximum plasma current T_IPMAX : time of max current POH : Ip times surface voltage at time of maximum plasma current NEMAX_TCI : Maximum line average electron density from TCI T_NEMAX_TCI : time of max density TEMAX_ECE : Maximum central electron temperature from ECE NEMAX_THOMSON : Maximum central electron density from TS TEMAX_THOMSON : Maximum central electron temperature from TS ZEFF : Zeff at time of maximum density PRAD : Total radiated power at time of maximum density TOPOLOGY : limited, single null, etc at time of maximum current DISRUPTIVITY : did it disrupt? T_DISRUPT : time of disruption (if disruptivity = .true.) PULSE_LENGTH : total time with Ip > .05 Ip_max A : minor radius at time of maximum current according to FFIT or EFIT R : major radius at time of maximum current according to FFIT or EFIT DELTA_U : upper triangularity DELTA_L : lower triangularity KAPPA : elongation according to FIT at time of max current PRF T_PRF T_FIT : time of fit values ~ T_IPMAX WTOTMAX : Maximum stored energy according to EFIT IPSIGN : Sign of the plasma Current (1 or -1) HARD_XRAY : time of max stored energy BTORSIGN : Sign of B-Torr (1 or -1) GAS_PRESSURE : Neutral presssure at mid-plane (torr) BTORMAX : Absolute value of maximum toroidal field LPI : Deuterium pellet ? DPI : Deuterium pellet ? TIME_OF_SHOT : Time of shot from PLCs GAS1 : Working Gas (majority species) GAS2 : Impurity species GAS3 IP : Signed maximum plasma current BTOR : Signed maximum toroidal field OUTPUTS: -- array_to_put_result - an array to fill in with the column "field_name" COMMON BLOCKS: -- common selection_common, selection_string SIDE EFFECTS: Links to IDLSQLSHR and MDSSQLSHR. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. The table selected must have a column SHOT to order by. SELECT_MORE and or SELECT_FEWER must be called before using this routine. SQL$DATABASE must point to the logbook database or a SET_DATABASE,"LOGBOOK" must be done before using this routine. MODIFICATION HISTORY: ??/??/?? - JAS original 11/08/93 - JAS put into CMS 01/11/94 - JAS added order by shot ------------------------------------------------------------------------------------- CALLING SEQUENCE: retrieve, param, place_to_put_result EXAMPLES SELECT_MORE, "GAS1 = 'He'",/new RETRIEVE,"SHOT",shot_list
ROSQL
[Previous Routine] [Next Routine] [List of Routines]
NAME: ROSQL.PRO PURPOSE: Read only transaction for WLOGBOOK CATEGORY: MDSplus CALLING SEQUENCE: (indirect) INPUTS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: SIDE EFFECTS: several. RESTRICTIONS: See SQL.PRO. PROCEDURE: --
RWSQL
[Previous Routine] [Next Routine] [List of Routines]
NAME: RWSQL.PRO PURPOSE: execute a read write transaction. CATEGORY: MDSplus CALLING SEQUENCE: (indirect) INPUTS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: SIDE EFFECTS: several. RESTRICTIONS: See SQL.PRO. PROCEDURE: --
SELECT_FEWER
[Previous Routine] [Next Routine] [List of Routines]
NAME: SELECT_FEWER PURPOSE: Sets the RETRIEVE selection string. CATEGORY: MDSplus CALLING SEQUENCE: SELECT_FEWER, criterria [,/NEW] [,/CHECK] [,/ECHO] INPUTS: criteria - an SQL selection clause. list is: KEYWORD ARGUMENTS /NEW - use to start a new query /CHECK - use to check the validity of the query being built /ECHO - use to print out the selection criteria after the routine executes CURRENT LIST OF FIELDS: Name Description ---- ------------------------------- SHOT : Shot number like 911024001 IPMAX : Maximum plasma current T_IPMAX : time of max current POH : Ip times surface voltage at time of maximum plasma current NEMAX_TCI : Maximum line average electron density from TCI T_NEMAX_TCI : time of max density TEMAX_ECE : Maximum central electron temperature from ECE NEMAX_THOMSON : Maximum central electron density from TS TEMAX_THOMSON : Maximum central electron temperature from TS ZEFF : Zeff at time of maximum density PRAD : Total radiated power at time of maximum density TOPOLOGY : limited, single null, etc at time of maximum current DISRUPTIVITY : did it disrupt? T_DISRUPT : time of disruption (if disruptivity = .true.) PULSE_LENGTH : total time with Ip > .05 Ip_max A : minor radius at time of maximum current according to FFIT or EFIT R : major radius at time of maximum current according to FFIT or EFIT DELTA_U : upper triangularity DELTA_L : lower triangularity KAPPA : elongation according to FIT at time of max current PRF T_PRF T_FIT : time of fit values ~ T_IPMAX WTOTMAX : Maximum stored energy according to EFIT IPSIGN : Sign of the plasma Current (1 or -1) HARD_XRAY : time of max stored energy BTORSIGN : Sign of B-Torr (1 or -1) GAS_PRESSURE : Neutral presssure at mid-plane (torr) BTORMAX : Absolute value of maximum toroidal field LPI : Deuterium pellet ? DPI : Deuterium pellet ? TIME_OF_SHOT : Time of shot from PLCs GAS1 : Working Gas (majority species) GAS2 : Impurity species GAS3 IP : Signed maximum plasma current BTOR : Signed maximum toroidal field COMMON BLOCKS: -- common selection_common, selection_string SIDE EFFECTS: Sets the selection string used by retrieve. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. MODIFICATION HISTORY: ??/??/?? - Created JAS 11/08/93 - Put into CMS (JAS) ------------------------------------------------------------------------------------- CALLING SEQUENCE: SELECT_FEWER, criteria EXAMPLES SELECT_FEWER, "GAS1 = 'He'",/new, /echo, /check
SELECT_MORE
[Previous Routine] [Next Routine] [List of Routines]
NAME: SELECT_MORE PURPOSE: Sets the RETRIEVE selection string. CATEGORY: MDSplus CALLING SEQUENCE: SELECT_MORE, criterria [,/NEW] [,/CHECK] [,/ECHO] INPUTS: criteria - an SQL selection clause. list is: KEYWORD ARGUMENTS /NEW - use to start a new query /CHECK - use to check the validity of the query being built /ECHO - use to print out the selection criteria after the routine executes CURRENT LIST OF FIELDS: Name Description ---- ------------------------------- SHOT : Shot number like 911024001 IPMAX : Maximum plasma current T_IPMAX : time of max current POH : Ip times surface voltage at time of maximum plasma current NEMAX_TCI : Maximum line average electron density from TCI T_NEMAX_TCI : time of max density TEMAX_ECE : Maximum central electron temperature from ECE NEMAX_THOMSON : Maximum central electron density from TS TEMAX_THOMSON : Maximum central electron temperature from TS ZEFF : Zeff at time of maximum density PRAD : Total radiated power at time of maximum density TOPOLOGY : limited, single null, etc at time of maximum current DISRUPTIVITY : did it disrupt? T_DISRUPT : time of disruption (if disruptivity = .true.) PULSE_LENGTH : total time with Ip > .05 Ip_max A : minor radius at time of maximum current according to FFIT or EFIT R : major radius at time of maximum current according to FFIT or EFIT DELTA_U : upper triangularity DELTA_L : lower triangularity KAPPA : elongation according to FIT at time of max current PRF T_PRF T_FIT : time of fit values ~ T_IPMAX WTOTMAX : Maximum stored energy according to EFIT IPSIGN : Sign of the plasma Current (1 or -1) HARD_XRAY : time of max stored energy BTORSIGN : Sign of B-Torr (1 or -1) GAS_PRESSURE : Neutral presssure at mid-plane (torr) BTORMAX : Absolute value of maximum toroidal field LPI : Deuterium pellet ? DPI : Deuterium pellet ? TIME_OF_SHOT : Time of shot from PLCs GAS1 : Working Gas (majority species) GAS2 : Impurity species GAS3 IP : Signed maximum plasma current BTOR : Signed maximum toroidal field COMMON BLOCKS: -- common selection_common, selection_string SIDE EFFECTS: Sets the selection string used by retrieve. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. MODIFICATION HISTORY: ??/??/?? - Created JAS 11/08/93 - Put into CMS (JAS) ------------------------------------------------------------------------------------- CALLING SEQUENCE: SELECT_MORE, criteria EXAMPLES SELECT_MORE, "GAS1 = 'He'",/new, /echo, /check
SELECT_TABLE
[Previous Routine] [Next Routine] [List of Routines]
NAME: SELECT_TABLE PURPOSE: Sets the table for select_more, select_fewer and retrieve CATEGORY: MDSplus CALLING SEQUENCE: SELECT_TABLE, table [,/reset] INPUTS: table - name of the table to use (ignored if /reset specified) KEYWORD ARGUMENTS /RESET - sets the table back to the default (SUMMARY) COMMON BLOCKS: -- common selection_common, selection_string SIDE EFFECTS: Sets the table used by select_more, select_fewer and retrieve RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. MODIFICATION HISTORY: 11/23/93 - Created JAS
SET_DATABASE
[Previous Routine] [Next Routine] [List of Routines]
NAME: SET_DATABASE.PRO PURPOSE: Declare schema for SQL. CATEGORY: MDSplus CALLING SEQUENCE: SET_DATABASE, schema[, QUIET=quiet][, STATUS=status] INPUTS: schema is a logical or physical name. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- /QUIET to suppress error messages. STATUS=status to get error code. OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Use COMMIT or ROLLBACK to change databases. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. Must issue SQL command before to define linkimage. PROCEDURE: MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)7-May-1991 Initial coding. Ken Klare, LANL P-4 (c)26-Aug-1991 Add status Tom Fredian, MIT connect avoids detaching and attaching each time
SHOTTREND
[Previous Routine] [Next Routine] [List of Routines]
NAME: SHOTTREND.PRO PURPOSE: adds the time of shot data from RDB to the trend tree CATEGORY: CMOD, TRENDS CALLING SEQUENCE: SHOTTREND INPUTS: NONE OUTPUTS: -- NONE COMMON BLOCKS: -- NONE SIDE EFFECTS: writes to \TOP.SHOT_DATA:SHOTS in the currently open trend tree RESTRICTIONS: assumes the current trend tree is open SQL$DATABASE must point to the logbook database or a SET_DATABASE,"LOGBOOK" must be done before using this routine. MODIFICATION HISTORY: 6/7/93 JAS
SHOT_CHECKED
[Previous Routine] [Next Routine] [List of Routines]
NAME: SHOT_CHECKED PURPOSE: Widget IDL routine to check if the engineering comment has been entered for the current shot. CATEGORY: CMOD CALLING SEQUENCE: shot_checked INPUT PARAMETERS: none Keywords: none OUTPUTS: none COMMON BLOCKS: None. SIDE EFFECTS: RESTRICTIONS: -Must have done an IDL> SQL command before calling SHOT_LOG. -Logbook database must be defined. PROCEDURE: MODIFICATION HISTORY: VERSION 1.0, CREATED BY Josh Stillerman November 4, 1992
SHOT_DATE
[Previous Routine] [Next Routine] [List of Routines]
NAME: SHOT_DATE.PRO PURPOSE: Get shot's date and time. CATEGORY: MDSplus CALLING SEQUENCE: date=SHOT_DATE,filename[,/UNIX][,/BINARY][,/MODIFIED] INPUTS: -- OPTIONAL INPUT PARAMETERS: shot The shot number. KEYWORD PARAMETERS: (none) gives date form 18-Jun-1992 11:27:19. /BINARY gives number of 10^-7 seconds since 17-Nov-1858 00:00;00.00, i.e., tics since Julian day 3,000,000. It is quadword date in long(2) format. /UNIX gives Unix date form Sun Sep 16 01:03;52 1984\n. /JULIAN gives floating Julian date - 3 million. /BINARY /UNIX gives seconds since 1-Jan-1970 00:00:00. /MODIFIED uses modified date, otherwise the creation date. OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Links to VAXCRTL and LIBRTL. RESTRICTIONS: Must have invoked MDSPLUS definitions. Must have defined experiment and possibly shot with MDS$OPEN. Must not be remote, see VAXCRTL. PROCEDURE: Make a file name and look it up. MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)3-Aug-1992 Initial coding.
SHOT_LENGTH
[Previous Routine] [Next Routine] [List of Routines]
NAME: SHOT_LENGTH.PRO PURPOSE: Returns the length of a shot by looking at absolute value of the IP trace. CATEGORY: CMOD CALLING SEQUENCE: mds$open, "MAGNETICS", shot print, shot_length([threshold=current]) INPUTS: threshold - optional minimum current. OUTPUTS: -- returns the length of the shot or zero if there is a problem. COMMON BLOCKS: -- NONE SIDE EFFECTS: NONE RESTRICTIONS: The shot must already be open, MAGNETICS or CMOD MODIFICATION HISTORY: 10/21/93 JAS - from TERMINATE.PRO (HUTCH) ------------------------------------------------------------------------------------- EXAMPLES print, SHOT_LENGTH() or print, SHOT_LENGTH(thresh=1.5E5)
SHOT_LOG
[Previous Routine] [Next Routine] [List of Routines]
NAME: SHOT_LOG PURPOSE: Widget IDL routine for entering engineering shot quality comments. CATEGORY: CMOD CALLING SEQUENCE: shot_log INPUT PARAMETERS: none Keywords: none OUTPUTS: none COMMON BLOCKS: common shot_common, complain_events, complain_id, done SIDE EFFECTS: Updates the LOGBOOK DATABASe shots relation. RESTRICTIONS: -Must have done an IDL> SQL command before calling SHOT_LOG. -Logbook database must be defined. -The MDS event CHECK_SHOT_EVENT will cause the SHOT_LOG to prompt - for the comment for this shot. PROCEDURE: MODIFICATION HISTORY: VERSION 1.0, CREATED BY Josh Stillerman November 4, 1992 Modified to interact with new non interactive version of shot_checked. 7/6/93
SHOW_COLUMNS
[Previous Routine] [Next Routine] [List of Routines]
NAME: SHOW_COLUMNS PURPOSE: Display columns of an Rdb table. CATEGORY: MDSplus CALLING SEQUENCE: SHOW_COLUMNS,'table'[,MATCH='match'][,/QUIET][,STATUS=status] INPUTS: TABLE is the name of a table OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: MATCH=match a string to be matched using wildcards. Use % for any string, _ for any one character. /QUIET to suppress error messages. STATUS=status to get error code. OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: see GET_COLUMNS RESTRICTIONS: VAX dynamic SQL Requires declared database Rdb only, VMS descriptor types. PROCEDURE: Join Rdb tables to get info. MODIFICATION HISTORY: KKlare, LANL P-4 (c)02-May-1991 Initial coding KKlare, LANL P-4 (c)09-May-1991 Allow selection KKlare, LANL P-4 (c)26-Aug-1991 Add status KKlare, LANL P-4 (c)22-Jul-1993 Add Sybase
SHOW_TABLES
[Previous Routine] [Next Routine] [List of Routines]
NAME: SHOW_TABLES.PRO PURPOSE: Display user/system/all Rdb tables CATEGORY: MDSplus CALLING SEQUENCE: SHOW_TABLES INPUTS: -- OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: /ALL to all tables, default is the user tables /SYSTEM to get system tables MATCH=match a string to be matched using wildcards. Use % for any string, _ for any one character. /QUIET to suppress error messages. STATUS=status to get error code. OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: see GET_TABLES RESTRICTIONS: see GET_TABLES PROCEDURE: see GET_TABLES MODIFICATION HISTORY: KKlare, LANL P-4 (c)26-Apr-1991 Initial coding KKlare, LANL P-4 (c)03-May-1991 Does flags show view? KKlare, LANL P-4 (c)09-May-1991 Add table select KKlare, LANL P-4 (c)26-Aug-1991 Add status
SQL
[Previous Routine] [Next Routine] [List of Routines]
NAME: SQL.PRO PURPOSE: Set linkages to dynamic SQL commands. CATEGORY: MDSplus CALLING SEQUENCE: SQL INPUTS: -- OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Links to IDLSQLSHR and MDSSQLSHR. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. This linkage must be set before any DSQL/ISQL calls are defined. PROCEDURE: Use IDLSQL image to link to SQL_DYNAMIC with IDL or USER routines. MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)1-May-1991 Initial coding. Ken Klare, LANL P-4 (c)26-Aug-1991 Add status. Ken Klare, LANL P-4 (c)23-Mar-1992 Add definitions, ISQL selects. ------------------------------------------------------------------------------------- CALLING SEQUENCE: count = DSQL(command, markers, ... , outputs, ..., keywords...) INPUTS: command an SQL command. OPTIONAL INPUTS: markers question mark substitutions in the command. They can only be used where columns are tested or used. Examples: n=DSQL("INSERT INTO table(column) VALUES(?)", newvalue) n=DSQL("SELECT column FROM table WHERE other=?", test) KEYWORD PARAMETERS: COUNT Output number selected. Also returned as function value. ERROR Output text of error message, otherwise ''. /QUIET Input flag for don't print error message. STATUS Output VMS error number. OUTPUTS: outputs receivers for DSQL "Select From" arrays. Requires exactly one variable per column selected. It is a scalar of the appropriate type and size if count = 0. OPTIONAL OUTPUT PARAMETERS: -- RESTRICTIONS: The markers plus outputs must match the ?'s plus selected columns. ------------------------------------------------------------------------------------- CALLING SEQUENCE: count = ISQL(command, keywords...) INPUTS: command an SQL command. OPTIONAL INPUTS: -- (ISQL takes its markers from the terminal.) KEYWORD PARAMETERS: /QUIET Input flag for don't print error message. COUNT Output number selected. Also returned as function value. ERROR Output text of error message, otherwise ''. STATUS Output VMS error number. "Select From" only: HEAD Input 0=none 1=above column 2=in-line. Default=2. WIDTH Input nominal display width. Default=terminal width. TEXT Output variable to receive text. Default=terminal. OUTPUTS: -- (ISQL outputs to terminal or TEXT array.) OPTIONAL OUTPUT PARAMETERS: -- RESTRICTIONS: Each output string is a row. For no rows selected, '' is returned. Lines are separated by within the the string. ------------------------------------------------------------------------------------- Note: "Delete From"/"Insert Into" COUNT has stopped working.
SQL_FINISH
[Previous Routine] [Next Routine] [List of Routines]
NAME: SQL_FINISH.PRO PURPOSE: Detach from all schema. CATEGORY: MDSplus CALLING SEQUENCE: SQL_FINISH,'filename' INPUTS: schema is pathname of database. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: /QUIET to suppress error messages. STATUS=status to get error code. OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Does COMMIT of changed databases. RESTRICTIONS: Uses VAX dynamic SQL. PROCEDURE: -- MODIFICATION HISTORY: Ken Klare, LANL P-4 (c)10-May-1991 Initial coding. Ken Klare, LANL P-4 (c)26-Aug-1991 Add status Ken Klare, LANL P-4 (c)01-Jun-1993 Sybase Ken Klare, LANL P-4 (c)23-Jul-1993 Environment variable
SQL_UPDATE
[Previous Routine] [Next Routine] [List of Routines]
NAME: SQL_UPDATE PURPOSE: Update (optionally insert) a record in a time slice table CATEGORY: MDSPLUS - SQL CALLING SEQUENCE: sql_update, table, p_key, values=values, [, key=key][, master_table=master_table] [, status=status] [,/quiet] [,/debug] [,mask=mask] [,/CREATE] table - name of the table to update p_key - struct containing the record key for the primary table. for example: {shot:999999, time_slice:.05} values=values struct containing the fields to set like {ninja:'ninja string', ninja_time:2.2} [key=key] struct containing the values for the rest of the key of this slice, for example {side:'in', probe:12} [master_table=master_table] - name of the 'key' table for this table if not specified then this table is assumed to be a standalone database table. Like SUMMARY, or CORE... see /CREATE below [status=status] optional return status [/QUIET] if set no messages will be printed out [/DEBUG] if set various diagnostic messages are printed [MASK=mask] an array of bytes 1/field in values where -1 -> set this field to null 0 -> leave this field alone 1 -> update this field from values [/CREATE] if set and no master table is specified then if the record to be updated is not present it will be inserted. KEYWORDS: See above. OUTPUTS: None except for status COMMON BLOCKS: None. SIDE EFFECTS: SQL database opened or accessed. RESTRICTIONS: -A SET_DATABASE command must have been executed prior to using this routine. -The relation specified by the master_table argument must have shot and time_slice fields PROCEDURE: Select the record to be updated in the table relation if it is not there then select the record for this shot, time from the master talbe if it is not there then choke else insert this record shot, time (and any keys) into the talbe endif update the specified fields in table. MODIFICATION HISTORY: April 7, 1994 - Initial version Josh Stillerman May 3, 1994 - add p_key and /CREATE and change name Josh Stillerman
SUMMARY_IDL
[Previous Routine] [Next Routine] [List of Routines]
NAME: SUMMARY_IDL.PRO PURPOSE: Summarize the shot data and put it in the Rdb database. CATEGORY: MDSplus CALLING SEQUENCE: SUMMARY_IDL, 'filename' INPUTS: filename file of directives and actions. OPTIONAL INPUT PARAMETERS: -- KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: some SIDE EFFECTS: Changes SUMMARY database. RESTRICTIONS: Requires DEFINE MDS$PATH MDS$ROOT:[TDI] Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. Uses IDLSQL image to link to SQL_DYNAMIC. Uses several MDSplus procedures: SQL FILE_DATE CSITG CSAKM CSVAL MDSPLUS MDSvalue Before using this procedure you must open the shot: IDL> MDSPLUS IDL> shot=MDS$CUR_SHOT('RFX') IDL> MDS$OPEN, 'RFX', shot PROCEDURE: Interpret a file. Pack up the SQL operations where possible. MODIFICATION HISTORY: KKLARE 9-Jun-1992 /EXCESS for Insert and Update. KKLARE 17-Jun-1992 continuations and bug checking CAUTION: STRING(FORMAT=multiline) limited to 256 array elements.
TREE_ONLINE
[Previous Routine] [Next Routine] [List of Routines]
NAME: TREE_ONLINE PURPOSE: Determine if a tree is online. CATEGORY: CMOD CALLING SEQUENCE: answer = TREE_ONLINE(tree,shot) INPUT PARAMETERS: tree = name of the tree shot = shot number of the file. Keywords: None. OUTPUTS: answer = 1 if online, 0 if not online, -1 if is not in archive COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: None. PROCEDURE: Query archive database for location of shot. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, November 18,1993
UPDATE_FIELD
[Previous Routine] [Next Routine] [List of Routines]
NAME: UPDATE_FIELD.PRO PURPOSE: Updates / Creates a record in a relation of the summary/logbook database. CATEGORY: MDSplus CALLING SEQUENCE: UPDATE_FIELD, relation, shot, field, val INPUTS: relation - table to update shot - shot to update field - name of the field to update. value - value to store into this field. list is: OUTPUTS: -- NONE COMMON BLOCKS: -- NONE SIDE EFFECTS: Creates / Updates a record in the summary/logbook database. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. SQL$DATABASE must point to the logbook database or a SET_DATABASE,"LOGBOOK" must be done before using this routine. MODIFICATION HISTORY: 4/29/92? JAS - created 5/10/93 JAS - added these comments ------------------------------------------------------------------------------------- EXAMPLES update_field,"SUMMARY", 910901001, "GAS1", "He"
UPDATE_SLICE
[Previous Routine] [Next Routine] [List of Routines]
NAME: UPDATE_SLICE.PRO PURPOSE: Updates a record in the time_slice relation. CATEGORY: MDSplus CALLING SEQUENCE: UPDATE_TIME_SLICE, table, shot, time, field, val INPUTS: table - time slice table to update shot - shot to update time - shot to update field - name of the field to update. (see list below) value - value to store into this field. CURRENT LIST OF FIELDS in core: Name Type Description ................................................................ REQUESTOR CHAR(14) USER_DOM SHOT INTEGER C-Mod shot number TIME_SLICE real sec time of time slice NAME CHAR(12) time slice specifier DESCRIPTION CHAR(132) comments + standard phrases/steady-state/H-mode /L-H transition/disruptive TOPIC CHAR(132) keyword phrases eg Confinement/Density limit /Pellet injection/etc... GAS_MAJ CHAR(4) majority species (H2, D2, etc.) GAS_MIN CHAR(4) minority species (H2, D2, etc.) MIN_FRAC REAL minority fraction GAS_IMP CHAR(8) puffed impurities (argon, etc) A REAL m minor radius R REAL m major radius (mag axis) Z REAL m Z position of Mag axis KAPPA REAL elongation DELTA_U REAL upper triangularity DELTA_L REAL lower triangularity TOPOLOGY CHAR(3) limited, upper/lower single, double null GAP_INNER REAL m inner gap GAP_OUTER REAL m outer gap (to RF limiter) BETAP_LI2 REAL plasma + mag term (where not separable) BETAP REAL beta poloidal from efit LI REAL internal inductance INDUCTANCE REAL H plasma inductance BETAT REAL beta toroidal from efit W_MHD REAL joule energy content from efit DWMHDDT REAL watt time derivative of stored energy from efit TAUE_MHD REAL sec global energy conf. from magnetics QPSI_95 REAL safety factor V_SURF REAL volt Surface voltage V_RES REAL volt Resistive component of surface voltage V_IND REAL volt inductive voltage V_AXIS REAL volt Central voltage POH REAL Watt Ohmic heating power VOLUME REAL m^3 total plasma volume AREA REAL m-2 plasma surface area POL_AREA REAL m_2 poloidal cross section area BT REAL tesla toroidal field at R = .66 m BTSIGN TINYINT sign of bt DTBDT REAL IP REAL MA plasma current IPSIGN TINYINT sign of IP BETAP_DIA REAL beta toroidal from diamagnetism W_DIA REAL Joule stored energy from diamagnetism TAUE_DIA REAL sec tauE from diamagnetism SAWTOOTH CHAR(1) (y/n) sawtoothing F_SAWTOOTH REAL sec-1 sawtooth period PHASE_SAWTOOTH REAL degree sawtooth phase at time slice A_SAWTOOTH REAL delta sawtooth/total signal R_SAWTOOTH REAL m sawtooth inversion radius ELMS CHAR(12) ELM description NE0_TCI REAL 10e20/m3 peak density from TCI NEBAR_TCI REAL 10e20/m3 line ave density (vert. through Ro) from TCI NE_VOL_TCI REAL 10e20/m3 volume av density N_TOT_TCI REAL 10e20 total particle inventory TAUP_GLOBAL REAL sec global particle confinement time NE0_YAG REAL 10^20/m3 peak density from YAG TE0_YAG REAL eV peak Te from YAG TE0_ECE REAL eV peak Te from ece TE0_ECE_GWID REAL m Te gauss profile width factor from ece TE0_ECE_TWID REAL m Te trapezoid profile width factor from ece TE0_VOL_ECE REAL eV volume averaged Te from ece TI0_HIREX REAL eV peak Ti from HIREX TE_PHA REAL eV Te from PHA RDD REAL sec^-1 DD neutron rate TI0_NEUT REAL eV Ti from neutron rate ZEFF_AV REAL single channel Zeff ETA_RATIO REAL eta/eta_classical MARFE CHAR(1) (y/n) marfe existing PRAD REAL watt total radiated power PRAD0 REAL watt/m^3 central radiated power density P0_MID REAL torr midplane neutral pressure P0_DIV REAL torr divertor neutral pressure X_HARD REAL AU Hard xray emission PICRF_1 REAL Watt Net RF power PICRF_2 REAL Watt Net RF power LAMDA REAL coulomb logrythm W_KIN REAL joule total energy content - from kinetic diag. WE_KIN REAL joule electron energy content - from kinetic diag. WI_KIN REAL joule ion energy content (thermal)- from kinetics WI_TAIL REAL joule ion tail energy content DW_DT_KIN REAL watt time derivative of stored energy from diag TAUE_KIN REAL sec global energy conf. from diagnostics NU_I REAL ion collisionality NU_E REAL electron collisionality RHOSTAR REAL rho(0)/a DPEL_TIME REAL sec Time of last pellet fired before time slice DPEL_SIZE REAL nominal pellet size (numbers of electrons) DPEL_DN INTEGER actual pellet delta n (n electrons) DPEL_VEL REAL m/sec pellet velocity DPEL_PEN REAL M major radius reached by pellet DPEL_SPECIES CHAR(2) species (H, D, Ne) of pellet LIPEL_TIME REAL sec Time of last pellet fired before time slice LIPEL_SIZE REAL nominal pellet size LIPEL_DN INTEGER actual pellet delta n (n electrons) LIPEL_VEL REAL m/sec pellet velocity LIPEL_PEN REAL M major radius reached by pellet LIPEL_SPECIES CHAR(2) species (Li, Carbon, Boron) of pellet IMPINJ_TIME REAL sec Time of impurity injection before time slice IMPINJ_SPECIES CHAR(2) Name of injected impurity OUTPUTS: -- NONE COMMON BLOCKS: -- NONE SIDE EFFECTS: Creates / Updates a record in the summary/logbook database. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. SQL$DATABASE must point to the logbook database or a SET_DATABASE,"LOGBOOK" must be done before using this routine. MODIFICATION HISTORY: 9/14/93 JAS - created 3/1/94 JAS added table argument ------------------------------------------------------------------------------------- EXAMPLES update_slice, CORE, 910901001, .01, "GAS1", "He"
UPDATE_SUMMARY
[Previous Routine] [Next Routine] [List of Routines]
NAME: UPDATE_SUMMARY.PRO PURPOSE: Updates / Creates a record in the summary relation of the database. CATEGORY: MDSplus CALLING SEQUENCE: UPDATE_SUMMARY, shot, field, value INPUTS: shot - shot to update field - name of the field to update (see list below) value - value to store into this field. list is: CURRENT LIST OF FIELDS: Name Description ---- ------------------------------- SHOT : Shot number like 911024001 IPMAX : Maximum plasma current T_IPMAX : time of max current POH : Ip times surface voltage at time of maximum plasma current NEMAX_TCI : Maximum line average electron density from TCI T_NEMAX_TCI : time of max density TEMAX_ECE : Maximum central electron temperature from ECE NEMAX_THOMSON : Maximum central electron density from TS TEMAX_THOMSON : Maximum central electron temperature from TS ZEFF : Zeff at time of maximum density PRAD : Total radiated power at time of maximum density TOPOLOGY : limited, single null, etc at time of maximum current DISRUPTIVITY : did it disrupt? T_DISRUPT : time of disruption (if disruptivity = .true.) PULSE_LENGTH : total time with Ip > .05 Ip_max A : minor radius at time of maximum current according to FFIT or EFIT R : major radius at time of maximum current according to FFIT or EFIT DELTA_U : upper triangularity DELTA_L : lower triangularity KAPPA : elongation according to FIT at time of max current PRF T_PRF T_FIT : time of fit values ~ T_IPMAX WTOTMAX : Maximum stored energy according to EFIT IPSIGN : Sign of the plasma Current (1 or -1) HARD_XRAY : time of max stored energy BTORSIGN : Sign of B-Torr (1 or -1) GAS_PRESSURE : Neutral presssure at mid-plane (torr) BTORMAX : Absolute value of maximum toroidal field LPI : Deuterium pellet ? DPI : Deuterium pellet ? TIME_OF_SHOT : Time of shot from PLCs GAS1 : Working Gas (majority species) GAS2 : Impurity species GAS3 IP : Signed maximum plasma current BTOR : Signed maximum toroidal field OUTPUTS: -- NONE COMMON BLOCKS: -- NONE SIDE EFFECTS: Creates / Updates a record in the summary database. RESTRICTIONS: Uses VAX dynamic SQL. To create/maintain a database you must be licensed for Development or Interactive, not Runtime. SQL$DATABASE must point to the logbook database or a SET_DATABASE,"LOGBOOK" must be done before using this routine. MODIFICATION HISTORY: 4/29/92? JAS 5/10/93 JAS - put into CMOD_IDL_PROS ------------------------------------------------------------------------------------- EXAMPLES UPDATE_SUMMARY, 910901001, "GAS1", "He"
WAVEEDIT
[Previous Routine] [Next Routine] [List of Routines]
NAME: WAVEEDIT PURPOSE: Displays a stack of waves for editting CATEGORY: MDSPLUS CALLING SEQUENCE: WAVEEDIT,NODES[,BOUNDARY][,MOVIE_TIMES] INPUT PARAMETERS: NODES - Wildcard node specification of wave sets OPTIONAL INPUT PARAMETERS: BOUNDARY - Node containing expression for generating plasma display plot. MOVIE_TIMES - Expression to generate movie times Keywords: None: OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: MDSplus tree must have been previously opened. PROCEDURE: Not Straightforward. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, May 7, 1991
WAVEGEN_TIMES
[Previous Routine] [Next Routine] [List of Routines]
NAME: WAVEGEN_TIMES PURPOSE: Returns the times loaded into a wavegen control node CATEGORY: HYBRID CALLING SEQUENCE: answer = WAVEGEN_TIMES(control-node) INPUT PARAMETERS: control-node = bitbus node of the wavegen control node Keywords: None. OUTPUTS: answer = array of times in seconds relative to the wavegen trigger COMMON BLOCKS: None. SIDE EFFECTS: None. RESTRICTIONS: *********************************************************************** Uses R_UPLOAD from SHAPE$DUA0:[HYBRID.IDL] *********************************************************************** PROCEDURE: Reads 1000 bytes from address 4096 + start * 2 from the wavegen. Swaps bytes, thows out first 4 bytes and computes times for all dt's up to a dt of 65535. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W.Fredian May 1, 1993
WAVE_EDIT
[Previous Routine] [Next Routine] [List of Routines]
NAME: WAVE_EDIT PURPOSE: Displays a stack of waves for editting CATEGORY: MDSPLUS CALLING SEQUENCE: WVEDIT,NODES,BOUNDARY,MOVIE_TIMES,title=title,group=group other calls into this module: value = wave_get_nid(nid, [time=time]) wave_put_nid, nid, x,y,knots,pen INPUT PARAMETERS: NODES - Wildcard node specification of wave sets OPTIONAL INPUT PARAMETERS: BOUNDARY - node containing a string array with the names of the boundry display procedures in it. For example: BOUNDRY = ["PlasmaDisplay", "PlasmaUpdate"] MOVIE_TIMES - Expression to generate movie times Keywords: title - Specifies a title for the plots group - associated widget id for destruction etc... button_proc - procedure to call when the buttons are pushed. arg - argument to button proc OUTPUTS: None. COMMON BLOCKS: COMMON WAVEEDIT_COMMON, shells, plasma_shells, event_procs, scan_times SIDE EFFECTS: None. RESTRICTIONS: Thid procedure can only be called in a widget environment. MDSplus tree must have been previously opened. PROCEDURE: Not Straightforward. MODIFICATION HISTORY: VERSION 1.0, CREATED BY T.W. Fredian, May 7, 1991 VERSION 2.0, J. Stillerman 10/27/92 using CW_WVEDIT_NIDS
WAVE_EDIT_ARR
[Previous Routine] [Next Routine] [List of Routines]
NAME: WAVE_EDIT_ARRAY PURPOSE: Graphically edit a 2-d Signal CATEGORY: PCS Support CALLING SEQUENCE: wave_edit_arr, v_nid, t_nid, columns=columns, step = step, $ title=title,xsize=xsize,ysize=ysize,yoffset=yoffset, $ labels = labels, XGRIDSNAP = xgridsnap, YGRIDSNAP = ygridsnap INPUTS: v_nid - the Nodeid of the values to edit (must be 2d) t_nid - the Nodeid of the signal to edit (must be 2d) KEYWORD PARAMETERS: columns=columns, step = step, title=title, xsize=xsize, ysize=ysize, yoffset=yoffset button_proc=button_proc xmindistance=distance lowx=lowx xgridsnap=xgridsnap ygridsnap=ygridsnap OUTPUTS: None COMMON BLOCKS: None SIDE EFFECTS: Writes a new value to the tree for the signal specified. PROCEDURE: MODIFICATION HISTORY: 17-FEB-1993 Josh Stillerman - Initial version.
WLOGBOOK
[Previous Routine] [Next Routine] [List of Routines]
NAME: WLogbook PURPOSE: To read/write the experiment's Rdb/Sybase database. CATEGORY: MDSplus, database, SQL CALLING SEQUENCE: WLOGBOOK KEYWORD PARAMETERS: FILE='save_file' to restore settings. COMMON BLOCKS: LogCom Logbook_Event.PRO shared Logwdg Logbook_Event.PRO shared LogSensitive LogSetSensitive internal EditCommon Edit_Menu.PRO internal SIDE EFFECTS: See SQL.PRO. Starts event manager. RESTRICTIONS: See SQL.PRO. Expects an VAX-Rdb database (logical) of LOGBOOK. Or a Sun-Sybase environment variables: SYBASE IDL_SYBASE DSLISTEN DSQUERY DSCONSOLE PROCEDURE: Create the main widget and start it. SQL routines are not here because we must first define the LinkImage. For Logbook Enter only, see WLogbookEnter.PRO. FEATURES: Can work with other Rdb/Sybase database. LAYOUT: {File}{Do it}(Enter)(Set)(Plot) (Show Selected) {Select} _0______________________ {}=pdm {From} _1_______________ (run) _5_ __=text (Where) _2______________ (shot) _6_ ()=button {Order By} _3___________ (topic) _7_ []=toggle Limit to _4_ Rows. Selectors: (text) _8_ <>=scroll database: _13_ (username) _9_ (Insert) _12_____________ (entered) _10_ (voided) _11_ Dropdowns: row1: File: Set database, Restore from, Restore..., Save to, Save..., Exit Do it: Show IDL..., Show SQL..., Select from selectors, Select to selectors, Selectors menu..., Make an Entry..., {Show all}, {Make}, Unvoid, Void, Debug col1 Select, From, Where, Order by, Limit to, Insert col2: (selectors) Windows: Enter: (Hide) {Edit} {Do it} (Make Entry) {run} ___________ (unless general) {shot} __________ (implies shot) {topic} _________ (required) Set: (Hide) [Menu form:] [List labels:] Width: _width_ (Scroll font) _font_ Plot: _0_ (Hide){Window}_12_ (Query for s0..s7) _9_pts Release s0..s7 s0 ..._10_ (Plot)(Oplot)(All)(Knobs...) IDL expr. of s0..s7 (<)_11_(>) X _1_/Y _2_/Z _3_/ErrX _4_/ErrY _5_ X Y & Label (or comma lists) _6_ _7_/_8_ Show IDL...: (Hide){Edit}(Do Last Line)(Do All lines!!) comment Show SQL...: (Hide){Edit}(Do Last Line)(Do All lines!!) comment Make pull down: run/shot/topic/keyword Edit pull down: Cut/Copy/Paste After/Paste Before/Clear/Clipboard... Print/Copy File After.../Copy File Before... Append to File/Write to file Plot sub-window: Options: (Hide)(Clear knobs)(Plot) X__ Y__ Z__ other__ MODIFICATION HISTORY: KKLARE 2 to 17-Mar-92 designing KKLARE 23-Mar-92 add text output ISQL KKLARE 30-Mar-92 adding dynamic selectors. KKLARE 7 to 9-Apr-92 add ploting. KKLARE 14-Apr-1992 more cleanup. KKLARE 20-May to 5-Jun-1992 layout changes. KKLARE 11-Jun-1992 make external Enter KKLARE 19-Aug-1992 add Save/Restore defaults. KKLARE 28-Jul-1993 Sybase, first pass KKLARE 25-Aug-1993 to 15-Sep-1993 Suggestions from Juan Fernandez KKLARE 22-Oct-1993 Insert list bug: DSQL/ISQL not giving count for INSERT/DELETE, when fixed MUST=0 => /MUST Sun has much wider buttons, Labels are in pixels not characters.
XERRPLOT
[Previous Routine] [Next Routine] [List of Routines]
NAME: XERRPLOT PURPOSE: Plot horizontal error bars over a previously drawn plot. CATEGORY: J6 - plotting, graphics, one dimensional. CALLING SEQUENCE: XERRPLOT, Low, High ;X axis = point number. XERRPLOT, Low, High, Y ;To explicitly specify ordinants. INPUTS: Low: A vector of lower estimates, equal to data - error. High: A vector of upper estimates, equal to data + error. OPTIONAL INPUT PARAMETERS: Y: A vector containing the ordinants. KEYWORD Parameters: WIDTH: The width of the error bars. The default is 1% of plot width. OUTPUTS: None. COMMON BLOCKS: None. SIDE EFFECTS: An overplot is produced. RESTRICTIONS: Logarithmic restriction removed. PROCEDURE: Error bars are drawn for each element. EXAMPLES: To plot symmetrical error bars where X,Y = data values and ERR = symmetrical error estimates, enter: PLOT, X, Y ;Plot data XERRPLOT, X-ERR, X+ERR, Y ;Overplot error bars. If error estimates are non-symetrical, enter: PLOT,Y ERRPLOT, Upper, Lower, Y ;Where Upper & Lower are bounds. MODIFICATION HISTORY: DMS, RSI, June, 1983. Joe Zawodney, LASP, Univ of Colo., March, 1986. Removed logarithmic restriction. DMS, March, 1989. Modified for Unix IDL.
XTMANAGECHILD
[Previous Routine] [Next Routine] [List of Routines]
NAME: XtManageChild.pro PURPOSE: Manage an idl or Xwindows widget CATEGORY: MDSWIDGETS CALLING SEQUENCE: XtManageChild,id[,/XWIDGET] INPUTS: id - the widget id (IDL) of the widget whoose resources to query KEYWORD PARAMETERS: XWIDGET - if included, the id is a real X windows widget, not an IDL widget id. OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: PROCEDURE: finds the real widgetid of the specified IDL widget and calls XtManageChild on it. MODIFICATION HISTORY: Initial creation: T.W.Fredian 2/18/94
XTPARENT
[Previous Routine] [Next Routine] [List of Routines]
NAME: XtParent.pro PURPOSE: Return X window widget parent of widget CATEGORY: MDSWIDGETS CALLING SEQUENCE: w = XtParent(id[,/XWIDGET]) INPUTS: id - the widget id (IDL) of the widget whoose resources to query KEYWORD PARAMETERS: XWIDGET - if included, the id is a real X windows widget, not an IDL widget id. OUTPUTS: w - widget COMMON BLOCKS: SIDE EFFECTS: PROCEDURE: finds the real widgetid of the specified IDL widget and calls XtParent on it. MODIFICATION HISTORY: Initial creation: T.W.Fredian 2/18/94
XTUNMANAGECHILD
[Previous Routine] [Next Routine] [List of Routines]
NAME: XtUnManageChild.pro PURPOSE: UnManage an idl or Xwindows widget CATEGORY: MDSWIDGETS CALLING SEQUENCE: XtUnManageChild,id[,/XWIDGET] INPUTS: id - the widget id (IDL) of the widget whoose resources to query KEYWORD PARAMETERS: XWIDGET - if included, the id is a real X windows widget, not an IDL widget id. OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: PROCEDURE: finds the real widgetid of the specified IDL widget and calls XtUnManageChild on it. MODIFICATION HISTORY: Initial creation: T.W.Fredian 2/18/94
XTVAGETVALUES
[Previous Routine] [Next Routine] [List of Routines]
NAME: XtVaGetValues.pro PURPOSE: get arbitrary resource values from an IDL widget. CATEGORY: MDSWIDGETS CALLING SEQUENCE: XtVaGetValues,id,name,value,name,value, ... up to 12 pairs [,parent=parent][,/XWIDGET] INPUTS: id - the widget id (IDL) of the widget whoose resources to query name - the resource name to get (eg "XmNbuttonState") value - an IDL variable to put the value into. KEYWORD PARAMETERS: PARENT - return resources of the top level widget in the hierarchy containing id. XWIDGET - if included, the id is a real X windows widget, not an IDL widget id. OUTPUTS: The values of the specified resources are returned. COMMON BLOCKS: SIDE EFFECTS: PROCEDURE: finds the real widgetid of the specified IDL widget and calls XtGetValues on it. MODIFICATION HISTORY: Initial creation: T.W.Fredian 10/9/93 These comments added Josh Stillerman 1/3/93
XTVASETVALUES
[Previous Routine] [Next Routine] [List of Routines]
NAME: XtVaSetValues.pro PURPOSE: set arbitrary resource values in an IDL widget. CATEGORY: MDSWIDGETS CALLING SEQUENCE: XtVaSetValues,id,name,value,name,value, ... up to 12 pairs [,parent=parent][/XWIDGET] INPUTS: id - the widget id (IDL) of the widget whoose resources to query name - the resource name to set (eg "XmNbuttonState") value - an IDL variable to put the value into. KEYWORD PARAMETERS: PARENT - return resources of the top level widget in the hierarchy containing id. /XWIDGET - if set then id is expected to be a real X windows widget, not an IDL widget id. OUTPUTS: The values of the specified resources are returned. COMMON BLOCKS: SIDE EFFECTS: PROCEDURE: finds the real widgetid of the specified IDL widget and calls XtSetValues on it. MODIFICATION HISTORY: Initial creation: T.W.Fredian 10/9/93 These comments added Josh Stillerman 1/3/93
X_COMPLAIN
[Previous Routine] [Next Routine] [List of Routines]
NAME: X_COMPLAIN PURPOSE: Pops up a one line complaint. CATEGORY: MDS-Widgets CALLING SEQUENCE: X_COMPLAIN,message INPUTS: message - text to display COMMON BLOCKS: None. SIDE EFFECTS: PROCEDURE: MODIFICATION HISTORY:
X_LISTBOX
[Previous Routine] [Next Routine] [List of Routines]
NAME: X_Listbox PURPOSE: To create a listbox and return the selection(s). CATEGORY: CALLING SEQUENCE: X_Listbox, title, array, comment, textid, GROUP=group INPUTS: title scalar title of box, "From" is special. array vector selection list comment scalar or vector matching ARRAY textid identifier of text-widget to change KEYWORD PARAMETERS: group identifier of group leader cancel receives cancel flag OUTPUTS: None. OPTIONAL OUTPUT PARAMETERS: None. COMMON BLOCKS: Listboxcom SIDE EFFECTS: Initiates the XManager if it is not already running. Can change text value of TEXTID. RESTRICTIONS: Deactivates other widgets. PROCEDURE: Create and register the widget, allow selection, and exit. Clicking the list box adds a comma-separated value. Button OK stuffs value and returns. Button Clear erases the temporary. Button Reset restores original value. Button Cancel makes no changes and returns. The temporary result is displayed in a editable text widget. A in the edit box is an OK. Because this will be only active widget, we can use one common for all. MODIFICATION HISTORY: KKLARE 3/3-6/92 new KKLARE 3/10/92 minor mods KKLARE 7/6/92 cancel option
X_MENU
[Previous Routine] [Next Routine] [List of Routines]
NAME: X_Menu PURPOSE: To create a menu and return the selection(s). CATEGORY: CALLING SEQUENCE: X_Menu, title, array, textid, GROUP=group INPUTS: title scalar title of box array vector selection list wid identifier of text-widget to change KEYWORD PARAMETERS: group identifier of group leader cancel flag for cancel OUTPUTS: None. OPTIONAL OUTPUT PARAMETERS: None. COMMON BLOCKS: Menucom SIDE EFFECTS: Initiates the XManager if it is not already running. Can change text value of TEXTID. RESTRICTIONS: Deactivates other widgets. Fails for null strings. PROCEDURE: Create and register the widget, allow selection, and exit. Clicking the left (unselected) box adds to the right (selected). Clicking the right (selected) box adds to the left (unselected). Button OK stuffs value and returns. Button All>> selects all Button <
X_QUESTION
[Previous Routine] [Next Routine] [List of Routines]
NAME: X_Question PURPOSE: To present a question and get an answer. CATEGORY: Widgets. CALLING SEQUENCE: answer = X_Question(question, answers, GROUP_LEADER=group) INPUTS: question the interrogation string answers the permitted answers KEYWORD PARAMETERS: group destroys this if leader goes. OUTPUTS: function value is answer. OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Initiates the XManager if it is not already running. RESTRICTIONS: -- PROCEDURE: Defines a widget. MODIFICATION HISTORY: 1-May-1992 KKLARE design
X_TABLE
[Previous Routine] [Next Routine] [List of Routines]
NAME: X_Table PURPOSE: To allow cut and paste from a display table. CATEGORY: Widgets. CALLING SEQUENCE: X_Table, title, value, GROUP_LEADER=group INPUTS: title the title string of a box. value the initial string array contents. KEYWORD PARAMETERS: group destroys this if leader goes. OUTPUTS: None. OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: EditCommon in Edit_Event SIDE EFFECTS: Initiates the XManager if it is not already running. Displays the value and allows cut and paste. RESTRICTIONS: Can require Edit_Event in Edit_Menu. PROCEDURE: Defines a widget. MODIFICATION HISTORY: 17-Mar-1992 KKLARE design 25-Mar-1992 KKLARE brute force correct 1-Apr-1992 KKLARE limit title width
X_WARNING
[Previous Routine] [List of Routines]
NAME: X_Warning PURPOSE: To display a warning. CATEGORY: MDSplus CALLING SEQUENCE: X_Warning, string INPUTS: mess message KEYWORD PARAMETERS: -- OUTPUTS: -- OPTIONAL OUTPUT PARAMETERS: -- COMMON BLOCKS: -- SIDE EFFECTS: Initiates the XManager if it is not already running. RESTRICTIONS: -- PROCEDURE: Create, register the widget and allow close. MODIFICATION HISTORY: 3/4/92 KKLARE initial code