• ADDDATE - Add days to a date. Tries to return string in same form as input
  • ADDLABELNODES - Add LABEL sub-nodes to MDSplus signal nodes reading info from a file
  • ADDMDSTAGS - Add tags to MDSplus nodes
  • ADDSIGNODES - Add signal nodes and tags to a MDSplus tree for many shots
  • ADDTREETOTAG - Return tags with trees merged in
  • ADD_TAG - Add a new tag to the structure. NOTE: if you want to add more than one tag at once, use ADD_TAGS
  • ALPHAMOVIE10 - Plot every 10th frame in time, and overlay 10 d-alpha traces. Have a marching vertical line indicating time in a plot indicating the Strike Point Radius.
  • AMEDIAN - Works the same as MEDIAN, but the effect tapers off at the edges.
  • ANIM2CINE - Create an mpeg or avi movie from two .cin files from Phantom Cameras. The data can be color or monochrome
  • ANIMXYPLOT - Animate X-Y plot of a 2-D array
  • ARRAYMASK - Return an array mask where values are 1 if within the drawn polygon and 0 if outside.
  • ARRAY_EQ - Return TRUE if two arrays are equal, else false.
  • BADPAR - (one line) Validate an input parameter against valid entries.
  • BAD_PTDATA_ERROR - Return a logical true IF the PTDATA error is serious
  • BANGPW - Widget to set interactively some !P values. Lists colors by name, if mk_color used; otherwise finds "closest" index to named colors. Allows selection of several custom plotting symbols (see PLOTSYM).
  • BELL - Ring terminal bell.
  • BETTERRAINBOW - Loads a rainbow color palette with 6 evenly-spaced (roughly) colors
  • BETTERTICKLABELS - Tick labels are made a little cleaner. E.g., shorter exponentials, no unnecessary trailing zeroes, accurate numbers when tick values are small differences between large numbers, etc.
  • BIN2D - Create a density image (2D histogram) from arrays of (x,y) points, or create an image of a function from arrays of ( x, y, f(x,y) ) data. In first case each pixel counts # of (x,y) points falling into a 2D bin (box), thus forming an image of counters. In optional case, each pixel is the average of all f(x,y) data falling into the box. Boxes are determined by dividing the (x,y) range into a uniform grid.
  • BITMAPBUTTONS - Illustrate use of bitmapbuttons in IDL
  • BITS - Given a byte or integer, return a vector of 8 or 16 values which are the binary representation of the value.
  • BLOBBINRANGES - Plot bins of one variable vs another from blob database and drawn ranges, of say 90%, in Y for each binned point. See http://nstx.pppl.gov/nstx/Software/Applications/blobDBdefs.txt for an explanation of variables and units of database variables.
  • BLOBTRAILS - Draw trails of blob trajectories that go through a certain region of the image. Data comes from a database of blob characteristics for a given shot, and perhaps just part of a shot (see populateblobs.pro).
  • BPASS - Implements a real-space bandpass filter which suppress pixel noise and slow-scale image variations while retaining information of a characteristic size.
  • BPWFEDIT - Read, Edit, & Plot Breakpoint Waveform files used in ppcc system on TFTR
  • BREAKMDSNAME - Break an MDS pathname near the middle, if too long
  • BREAKSTRING - Break a string up and return a string array
  • BREAKTEXT - break up (justify) text so lines not longer than a certain length.
  • BREAK_PATH - Breaks up a path string into its component directories.
  • BTEST - To test bit N in FIX(X)
  • CACHECKMONITOR - This function returns a non-zero value if there is a new (unread) monitor for this process variable, otherwise it returns zero. This function is particularly useful when a caGet() operation is expensive in time, e.g. reading large arrays.
  • CACLEARMONITOR - This procedure clears a monitor on the specified process variable. It cancels the effect of caSetMonitor().
  • CADEBUG - This procedure turns the EZCA debugging flag on or off. Turning on the debugging flag prints lots of information, which is mainly useful to developers.
  • CAENDGROUP - This function ends an "asynchronous group". See caStartGroup for more information on asynchronous groups. caEndGroup flushes the queue of caGet and caPut calls and waits for replies from the channel access servers.
  • CAERROR - This procedure controls error printing and returns error strings.
  • CAGET - This function reads the value of a Channel Access process variable.
  • CAGETARRAY - This function reads values for a list of Channel Access process variable. It returns 0 if successful, returns -1 if failed.
  • CAGETCONTROLLIMITS - This procedure reads the control limits for the specified channel access process variable.
  • CAGETCOUNTANDTYPE - This function returns the number of elements and data type of a Channel Access process variable.
  • CAGETENUMSTRINGS - This function returns all of the choice strings associated with a Channel Access "enum" process variable. It is particularly useful for building menus of options.
  • CAGETERROR - This function get CA return codes for a list of process variable names. Return code can be 0 or -1, 0 for success, -1 for failure.
  • CAGETGRAPHICLIMITS - This procedure reads the graphic limits for the specified channel access process variable.
  • CAGETPRECISION - This procedure reads the precision for the specified channel access process variable.
  • CAGETRETRYCOUNT - This function returns the value of the EZCA retry count parameter. In conjunction with the EZCA Timeout parameter it determines how long EZCA will try to connect to a process variable before giving up.
  • CAGETSTATUS - This procedure reads the status parameters for a channel access process variable.
  • CAGETTIMEOUT - This function returns the value of the EZCA Timeout parameter. This value determines the time parameter passed to ca_pend_io() in EZCA. In conjunction with the EZCA RetryCount parameter it determines how long EZCA will try to connect to a process variable before giving up.
  • CAGETUNITS - This procedure reads the units string for the specified channel access process variable.
  • CAINIT - This routine sets the channel access timeout used by list array functions defined in ezcaScan library.
  • CALCBTBP - Calculates toroidal and poloidal magnetic field values (Bt & Bp) at desired R & Z and desired time by reading data from the EFIT (or similar) MDS+ tree. (Bt is also refered to as B-phi.)
  • CAMAC_HERE - Return 1 if CAMAC on this computer (if environmental variable "camac_server" is non-blank)
  • CAMONITOR - This function provides Add/Get/Check/Clear monitor features on a single PV or a list of PV names.
  • CAPENDEVENT - This function causes the Ezca to call channel access ca_pend_event function.
  • CAPENDIO - This routine sets the timeout used by ca_pend_io in array get/ put used in ezcaScan library.
  • CAPUT - This procedure writes a new value to a channel access process variable.
  • CAPUTARRAY - This function writes an array of data to a list of Channel Access process variable. It returns 0 if successful, else retuns -1.
  • CASCAN - This function provides add/get/zero/clear monitor features on a scan record and a set of PV names.
  • CASEARCH - This function searches for a list of process variable names. It returns 0 if successful, returns -1 if failed.
  • CASETMONITOR - This procedure sets a monitor on the specified process variable. This causes a channel access callback to execute whenever the value of that process variable changes. Subsequent calls to caGet() after calling caSetMonitor will read the values provided by the callbacks, rather than reading from the IOC.
  • CASETRETRYCOUNT - This procedure sets the value of the EZCA RetryCount parameter. In conjunction with the EZCA Timeout parameter it determines how long EZCA will try to connect to a process variable before giving up.
  • CASETTIMEOUT - This procedure sets the value of the EZCA Timeout parameter. This value determines the time parameter passed to ca_pend_io() in EZCA. In conjunction with the EZCA RetryCount parameter it determines how long EZCA will try to connect to a process variable before giving up.
  • CAST - Generalized type casting. Converts variables whose type code is out of the range [LOW,HIGH] into this range.
  • CASTARTGROUP - This procedure starts an "asynchronous group". Within an asynchronous group all calls to caGet and caPut are asynchronous, i.e. they queue a request and return immediately without waiting for a reply from the channel access servers. Calling caEndGroup causes the queue to be flushed and waits for the replies. The use of asynchronous groups can greatly improve the efficiency of channel access. The user must be aware of the restrictions on caGet outlined under the description of that routine.
  • CATIMESTAMP - This function returns the time stamp of corresponding value for the specified record name.
  • CATRACE - This procedure turns the EZCA trace flag on or off. Turning on the trace flag prints lots of information which is mainly useful to developers. Setting the trace flag results in less verbose output than setting the debug flag (see caDebug).
  • CAVERSION - This function returns the string of current version information about ezcaIDL
  • CHARSIZE2FIT - compute charsize for a string to fit in horizontal # of pixels
  • CHECKMDSTREE - Check MDS trees, say after a transfer. Produce a file with a list of nodes and checksum of contents of each numerical node or first element of non-numeric nodes.
  • CHECKSIG - checks for existence of a signal in MDSplus for current shot and optionally declares an event. It can also execute and IDL string when it sees the event. It will then start watching for the next shot.
  • CH_EXAMPLE - a simple example using the GA Crosshair routines
  • CH_REGISTER - register window for crosshair routines
  • CINE2MPEG - Create a movie from a .cin files from Phantom Fast Cameras. Will default to writing jpegs and spawning jmovie to create a QuickTime movie. If /MPEGout keyword set, will write an MPEG. The data can be color or monochrome,
  • CINEAVE - Produce an average frame from a time ranged from .cin files from Phantom Fast Cameras. This frame is typically used to divide GPI images by to get normalized image.
  • CINELOAD - Read a frame from a .cin file from a Phantom 7 camera. File is opened only the first time (or when filename is new), and pointers and things are remembered from one call to the next.
  • CINERATE - Return framing rate from a .cin file from a Phantom 7 camera.
  • CINETHUMBNAILS - Plot thumbnails of many frames from a .cin file
  • CINE_LOAD - Read a frame from a .cin file from a Phantom 7 camera.
  • CINE_SNUM - Return camera serial number from a .cin file from a Phantom camera.
  • CINE_TIME - Read time from a .cin file from a Phantom 7 camera.
  • CLEANPLOT - Reset all system variables (!P,!X,!Y,!Z) to their default values
  • CLEARPLT - This procedure will clear or zero all or a selection of the system plot variables
  • CLICKONW - Allow recording of click locations on Tiff files. e.g., can be used for tracking dust particles from fast camera images of plasmas
  • COLORBAR - The purpose of this routine is to add a color bar to the current graphics window.
  • COLORBARBD - The purpose of this routine is to add a color bar to the current graphics window. (this is a mod by BD to handle veritcal plot ticknames better)
  • COLORSEARCH - Return color index (or closest available) from the color name.
  • COLOR_RESOURCE_EXAMPLE - Example of color buttons on a widget.
  • COLOR_STATUS_EXAMPLE - Example of color status fields on a widget.
  • COMBINE_STRUCTS - Takes two arrays of structures str1,str2 which have the same number of elements but possibly different tags and makes another structure which has the same number of elements but the tags of both str1,str2 and has their respective tags values copied into it
  • COMPW - Plot two signals and the difference.
  • CONVANGLE - Convert angle from one scheme to another. For example, some routines have 0 horizontally to the left, with angles increasing in a clockwise direction. and others have zero to the right, with angles increasing in a counter-clockwise direction.
  • CONVOLVE - Convolution of an image with a Point Spread Function (PSF)
  • COPY_STRUCT - Copy all fields with matching tag names from one structure to another
  • CP2JSCOPEFILE - Copy an MDSplus Scope input file to one that will work with jScope
  • CREATE_LOCUS_TABLE - Create a table in the Locus database following the convention of data columns named xx0, xx1, xx2, etc.
  • CW_ANIMATE_DUPS - This widget displays an animated sequence of images using X-windows Pixmaps. This is a compound widget, based on the XINTERANIMATE procedure, with the following advantages: - It can be included in other applications. - Multiple copies can be run simultaneously. The speed and direction of the display can be adjusted using the widget interface.
  • CW_BGROUP3_6 - CW_BGROUP3_6 is a compound widget that simplifies creating a base of buttons. It handles the details of creating the proper base (standard, exclusive, or non-exclusive) and filling in the desired buttons. Events for the individual buttons are handled transparently, and a CW_BGROUP3_6 event returned. This event can return any one of the following: - The Index of the button within the base. - The widget ID of the button. - The name of the button. - An arbitrary value taken from an array of User values.
  • CW_FIELD - This widget cluster function manages a data entry field widget. The field consists of a label and a text widget. CW_FIELD's can be string fields, integer fields or floating-point fields. The default is an editable string field.
  • CW_FIELD_BD - This widget cluster function manages a data entry field widget. The field consists of a label and a text widget. CW_FIELD's can be string fields, integer fields or floating-point fields. The default is an editable string field.
  • CW_PDLIST - A compound widget that simplifies creating pulldown menus. It has a simpler interface than the XPDMENU procedure, which it is intended to replace. Events for the individual buttons are handled transparently, and a CW_PDList event returned. This event can return any one of the following: - The Index of the button within the base. - The widget ID of the button. - The name of the button. - The fully qualified name of the button. This allows different sub-menus to contain buttons with the same name in an unambiguous way.
  • CW_PDMENU - CW_PDMENU is a compound widget that simplifies creating pulldown menus. It has a simpler interface than the XPDMENU procedure, which it is intended to replace. Events for the individual buttons are handled transparently, and a CW_PDMENU event returned. This event can return any one of the following: - The Index of the button within the base. - The widget ID of the button. - The name of the button. - The fully qualified name of the button. This allows different sub-menus to contain buttons with the same name in an unambiguous way.
  • DATATYPE - Datatype of variable as a string (3 char or spelled out).
  • DATE2JD - Convert a date string to Julian Day number.
  • DATE2YMD - Date text string to the numbers year, month, day.
  • DB_COLUMNS - List database tables and columns in which the column name contains a string.
  • DB_LIST - List info from an NSTX Database Table; especially to be displayed in output from a Web Tool database, like http://nstx.pppl.gov/nstx/Software/WebTools/searchefitdb.html. Searches from a database will be MUCH faster than from MDSplus trees.
  • DECODE_GRAY - Convert a gray-code value to an integer
  • DECOMPOSEDCOLOR - This function is used to determine, in a device independent way, if the current graphics device is using color decomposition. The function returns a 1 if color decomposition is turned on, and a 0 if it is turned off. When color decomposition is turned on, we say the device is using a true-color display. If color decomposition is turned off, we say the device is using an indexed color display.
  • DELFROMLIST - Delete ith element from a list
  • DIALOG_INPUT - A modal (blocking) dialog widget to input a line of text. The dialog must be dismissed, by entering text and pressing the Return key, or by clicking on the 'Ok' or 'Cancel' button before execution of the calling program can continue.
  • DIALOG_MENU - A modal (blocking) dialog widget to display a selectable menu. The dialog must be dismissed by selecting a menu item before execution of the calling program can continue.
  • DISPLAYFCTIFFS - Animate Fast Camera images with the time overlayed
  • DOMAINNAME - Return TCP/IP domain name from Unix systems
  • DRAWCIRCLE - Draw a circle centered on [x0, y0]. YOU HAVE TO HAVE YOUR AXES ESTABLISHED BEFORE CALLING THIS. Return out arrays for later drawing on a surface, too. These are in two parts, so you won't have a line down the middle when drawing.
  • DRAWDIAMOND - Draw a diamond in data coordinates
  • DRAWELLIPSE - Draw an ellipse centered on [x0, y0]. YOU HAVE TO HAVE YOUR AXES ESTABLISHED BEFORE CALLING THIS.
  • DRAWNSTXINSIDES - Provide a drawnstxinsides for IDL routines to be used by others
  • DRAWRECTANGLE - Draw a rectangle in data coordinates
  • DT_NICENUMBER - Makes nice delta time numbers, by rounding to 3 significant digits Can be used if you want to know if you have a constant timebase.
  • EDITTABLE - Edit a structure with a table where the second item in the structure is on/off. You can set all items (but the first) on, off, or to a specific value. If there are more rows than will fit on your screen, it will make new columns.
  • EFITMOVIES - Plot EFIT field lines, Thomson Scattering Density and Temperature and, optionally, Fast Camera images. Instead of Fast Camera, can plot H-alpha (or another) signal vs. time.
  • ERROR_MESSAGE -
  • EVENTSPAWN - When a designated MDSplus event is detected, spawn an IDL procedure, first killing any versions that are running.
  • EXECONEVENT - Widget to spawn an executable (with shot as argument) when an MDSplus event occurs. An IDL routine can also be spawned with shot as the only argument, or any IDL command string executed.
  • FACTOR - Find prime factors of a given number.
  • FANCY_TITLE - write a title at top of screen, with option to use Hershey fonts
  • FCDCMOVIES - Plot Fast Camera and Divertor Camera images along with EFIT field lines, and, optionally, Thomson Scattering Density and Temperature. You may also plot H-alpha (or another) signal vs. time.
  • FCPLAYER - Also displays files from the Phantom or color Miro cameras (.cin files) and optionally save frames as JPEG, png or TIFF files. Allows recording of click locations on .cin files from a Phantom 4 or 7 camera (for tracking dust, e.g.). Also trackes "blobs" from images of edge turbulence.
  • FCTIFFSVCR - animate Fast Camera tiffs with VCR-like controls. from the resulting widget, you may write an Mpeg file
  • FCVCR - Plot Fast Camera images with a VCR-like interface
  • FDECOMP - Routine to decompose a file name for any operating system
  • FEATURE - Finds and measures roughly circular 'features' within an image.
  • FILE2STRUCT - return a structure where elements are named with column headings, and arrays are the columns
  • FILEONEVENT - When a designated MDSplus event is detected, write a file containing a shot number, first deleting existing file.
  • FILESHOTDATE - Print time and date of an NSTX shot, but get data from a file
  • FILETIME2DBTIME - Return times in filetimes format in database format
  • FILTER_IMAGE - Identical to MEDIAN or SMOOTH but handle edges and allow iterations.
  • FINDALLCHAR - Find all appearances of a character in a scalar string
  • FINDCAMFILES - Find camera files in various directories Environmental/System variable FC_DATA_DIR will be used, if set, to look for files containing the string in 'filename'
  • FINDDISKS - return a list of disks shown in the df command on Linux
  • FINDMDSNODES - Search for MDSplus nodes or tags with a name containing a string
  • FINDMDSTIME - find a time within an MDSplus shot, correspoding to the time of Max Ip, time of Max W-tot, etc. signals come from the EFIT tree when possible.
  • FINDPEAKS - Find peaks in a data array. To be a peak a local maximum must have a 25% higher range than the first and last quarter of the peak range.
  • FINDRATZ - find the r of desired Z, but on the outer part of curve, if there is more than one point that would cross Z=desiredZ. Use spline interpolation.
  • FINDVALIDSHOTS - Search MDS Plus Trees for valid shot numbers with data in a particular node
  • FIND_COMMON() - : Find which elements are common to the input vectors.
  • FIND_FONT - Select a Unix hardware font for IDL graphics.
  • FIRSTSIGNAME - Return the first signal name in a TDI expression. Needed when you want the xaxis from a combination of signals.
  • FITSRUN - Quickly tell which EFITs and LRDFITs exist for an MDSplus shot
  • FLUXCOORDS - Return flux coordinates for input R values at a given Z
  • FOLLOWCONTOUR - Follow a contour line to find where it intersects a desired Y and return the X value. I.e., where the 2D input array has the same value as at specified coordinates. This is used to find the R value at Z=0 with the same Psi value as a specified point on the flux surface. So, it can be used for plotting things in relation to flux surfaces.
  • FOUNDSUBTREE - determine if sub trees like efit05, lrdfit06, etc. exist
  • FROMIDLSECONDS - Convert from IDL-syle time (output from SYSTIME(1), to form of '06/14/2004 11:04:52'
  • FROMIDLTIME - Convert from IDL-syle time (output from SYSTIME(0), to form of '06/14/2004 11:04:52'
  • FSC_COLOR - The purpose of this function is to obtain drawing colors by name and in a device/decomposition independent way. The color names and values may be read in as a file, or 192 color names and values are supplied with the program. These colors were obtained from the file rgb.txt, found on most X-Window distributions, and from colors in the Brewer color tables (http://colorbrewer2.org/). Representative colors were chosen from across the color spectrum. To see a list of colors available, type: Print, FSC_Color(/Names), Format='(6A18)' If the color names '0', '1', '2', ..., '255' are used, they will correspond to the colors in the current color table in effect at the time the FSC_Color program is called.
  • FSC_COLORBAR - The purpose of this routine is to add a color bar to the current graphics window.
  • FULLMDSPATH - Return an MDSplus path for a tag
  • GAMMA_RAISE - Apply gamma correction to an array, presumably an image.
  • GAUSSIAN - Compute the 1-d Gaussian function and optionally the derivative
  • GA_DATA - A GA_Data object defines a dataset Y as a function of X. It can be drawn on a Plot defined by a GA_Plot object.
  • GA_DATA::ADD_TEXT - Add a text annotation defined by GA_AnnotateText object that will be drawn together with this data object onto the plot object.
  • GA_DATA::DELETE_TEXT - Deletes a text member from the data object.
  • GA_DATA::DRAW - Overplots this data set onto a Plot that has been established by a GA_Plot object.
  • GA_DATA::GETCOLOR - Retrieves the color index associated with this data set.
  • GA_DATA::GETFLAGAUTOLABEL - Retrieves value of FlagAutoLabel
  • GA_DATA::GETLABEL - Retrieves the label of this dataset. If not set, use YName. Can be overridden by subclasses to supply automatically generated label. FlagAutoLabel is provided to facilitate this.
  • GA_DATA::GETLINESTYLE -
  • GA_DATA::GETLINESTYLENONE - Retrieves linestyle index for 'NONE' (no line).
  • GA_DATA::GETPLOT - Retrieves the GA_Plot object that contains this data object.
  • GA_DATA::GETSYMBOL -
  • GA_DATA::GETSYMBOLSIZE -
  • GA_DATA::GETXDATA - Retrieves abscissa vector X.
  • GA_DATA::GETXNAME - Retrieves the name of X vector.
  • GA_DATA::GETXRANGE - Retrieves the range of X data.
  • GA_DATA::GETYDATA - Retrieves ordinate vector Y.
  • GA_DATA::GETYNAME - Retrieves the name of Y vector.
  • GA_DATA::GETYRANGE - Retrieves the range of Y data.
  • GA_DATA::INIT - Initializes the GA_Data object.
  • GA_DATA::SETPROPERTY - Sets the value of a property or group of properties for the GA_Data.
  • GA_DATA::SET_TEXT_PROPERTY - Sets the parameters associated with a text annotation object.
  • GA_PLOT - A GA_Plot object draws graphs of its data members. It is a container of GA_Data objects. If it has more than one data object member, the data members are overlayed. A plot object can be thought as a wrapper to IDL's PLOT command, keyword values to the PLOT command are preserved as plot object's or data objects' members. A plot object is plotted on a window created by a GA_Plot_Window object which may contain several plot objects.
  • GA_PLOT::ADD_DATA - This method allows you to add another data object to the plot object. Properties of the data object may be set with the method's keywords. Extra carries any keywords acceptable by Ga_Data[3]::Init. A new data object will be created and the reference is returned. See also GA_Plot::Add_Data_Object
  • GA_PLOT::ADD_DATA_OBJECT - This method allows you to add a GA_DATA or GA_DATA3 object to the plot object. The data object reference is returned. See also GA_Plot::Add_Data
  • GA_PLOT::ADD_TEXT - This method adds a text annotation to a specified location on the plot.
  • GA_PLOT::AUTO_RANGE - Set data ranges automatically according to data. This is needed for multiple data sets. Set both xrange and yrange by default.
  • GA_PLOT::DELETE_DATA - This method allows you to delete a data set member from the Plot Object. The data set may be specified by indicating its NAME, by indicating its POSITION (index number), or by the data OBJECT itself. (See the Select_Data method for more details about a data set's NAME and POSITION.)
  • GA_PLOT::DRAW - This method draws the Plot Object, including all of the data members included in the Plot Object.
  • GA_PLOT::GETDATAOBJECTS - The method returns the array of data objects stored in this plot object.
  • GA_PLOT::GETDATASELECTED - Retrieves the selected data object. A data object can be selected by clicking near to the data points with Left-Mouse-Button in 'Select' mode.
  • GA_PLOT::GETWINDOW - This method returns the GA_Plot_Window object that the plot object belongs to, for EditCallBack purpose.
  • GA_PLOT::GET_DATA_PROPERTY - This method allows you to retrieve the properties of a data member belonging to the plot. Data member is identified by passing its object reference (which can be obtained with the Select_Data method). If a data member is not specified, the first data memeber is used as a default.
  • GA_PLOT::GET_PLOT_PROPERTY - This method allows you to obtain the standard Plot properties from the Plot Object. (See the Init Method for a more complete explanation of these Plot properties.)
  • GA_PLOT::INIT - This method initializes a GA_Plot object. Standard properties are set with positional and keyword parameters. The routine makes GA_DATA objects from the data passed into the method. Use the Add_Data method to add additional data sets and the Delete_Data method to remove data sets from the Plot Object. Data inside the data objects can be modified with the Set_Data_Property method. Think of this initialization routine as a wrapper for the PLOT command. Use keywords appropriate for the PLOT command in making the call.
  • GA_PLOT::SELECT_DATA - This method retrieves a particular data object associated with this plot object. A data can be selected by name or by index number.
  • GA_PLOT::SETSLICEMODE - Set mode for data slicing. For a GA_Plot object, the plot can be used as a slicer to slice through other GA_Plot3 objects in the same window. The data in this plot will not be sliced because there is no third dimension. See also GA_Plot3::SetSliceMode
  • GA_PLOT::SET_DATA_PROPERTY - This method allows you to change the parameters associated with a particular data object. You must specify a particular data set by passing the object reference to the data set. (This can be obtained with the GA_Plot::Select_Data method.) If a data set object is not specified as the data member, the first data set is used by default.
  • GA_PLOT::SET_PLOT_PROPERTY - This method allows you to set the standard Plot properties. If the DRAW keyword is set, the plot will be drawn after the new properties are set. (See the Init Method for a more complete explanation of these Plot properties.)
  • GA_PLOT::SET_TEXT_PROPERTY - This method allows you to change the parameters associated with a text annotaion object. The textMember is the index number of the text object. All text members are used by default if no textMember is specified.
  • GA_PLOTW - Plot widget for "table" of data, or input X & Y arrays.
  • GA_PLOT_WINDOW - A GA_Plot_Window is a compound widget with a draw window that contains one or several GA_Plot[3] objects. Plots can be added or deleted. The window object handles plot layout, coordinates, preference and properties configurations, mouse events and draws all the plots through their own draw methods.
  • GA_PLOT_WINDOW::ADD_PLOT - This method adds a plot to the window. A new column of plots will be created if necessary to accomodate the new plot. A plot object is required. If NoDuplicate keyword is set, check if newPlot belongs to the window already. If so, return.
  • GA_PLOT_WINDOW::CHECKPLOTNUMBERS - Goes through member plots and checks to ensure that they are sequentially numbered. Renumbers them if they are not. Plots having the same number are overlayed and can cause confusing display results. This routine is optional - to be used by the parent application if needed. It returns 0 if no plot has been renumbered, returns 1 otherwise.
  • GA_PLOT_WINDOW::DELETE_PLOT - This method deletes a plot from the list of plots within the window. Plots are numbered from 1 to N and are in column order in the window. NO EDITCALLBACK is generated by this method! For an EDITCALLBACK use GA_Plot_Window::RemovePlot.
  • GA_PLOT_WINDOW::DRAW - Draws all the plots in this window by calling the plot objects Draw method.
  • GA_PLOT_WINDOW::DUMP - Prints out pointers to plot objects and their associated data objects. For debugging purposes.
  • GA_PLOT_WINDOW::EDITCALLBACK - Perform an IDL procedure call upon certain editing action, CALL_PROCEDURE,ProName,Parent,oData,oPlot,Action ProName is the procedure name specified by keyword EDITCALLBACK when the window object is created (see GA_Plot_Window::Init). This procedure should expect four arguments. Parent The parent widget of the PARENT argument specified in GA_Plot_Window::Init. If the GA_Plot_Window is created through CW_GAWindow, Parent will be the PARENT argument passed to CW_GAWindow. oData A GA_Data object or a null object. oPlot A GA_Plot object or a null object. Action An action string such as 'ADD_DATA','DELETE_DATA', 'DELETE_PLOT','REFERENCE_POINT',etc.
  • GA_PLOT_WINDOW::GETCURRENTTOOL - Retrieves the name of the current mouse mode. Possible modes are ['Select','Zoom','Edit','Cursor','Slice','Mark','Vector'] plus those defined by MOUSEMODES.
  • GA_PLOT_WINDOW::GETPLOT - Retrieves a plot object specified by its index number.
  • GA_PLOT_WINDOW::GETPLOTLIST - Retrieves the names of plots in this window object. A name is specified or a default is given when a plot object is created.
  • GA_PLOT_WINDOW::INIT - Initializes a GA_Plot_Window object. The window is conceived as a compound widget via CW_GAWindow. When you get the "value" of the compound widget, you are returned the window object. Instead of "setting values" to the compound widget, you call window object methods.
  • GA_PLOT_WINDOW::INSERT_PLOT - Inserts a new plot at a specified index number. The plot numbers are shifted by 1 (+1) from the inserted plot.
  • GA_PLOT_WINDOW::REMOVE_PLOT - If the PLOT tag in EDITFLAGS structure is set, this method deletes the plot object specified by the index number. A GA_Plot_Window::EditCallBack is generated.
  • GA_PLOT_WINDOW::REPLACE_PLOT - This method replaces a current plot in the window with another plot.
  • GA_PLOT_WINDOW::RESTOREPREFERENCES - Restore user's preferences from file specified by PreferencesFile. This file is always in user's HOME directory.
  • GA_PLOT_WINDOW::SAVEPREFERENCES - Save the current settings to user's preferences file specified by PreferencesFile. This file is always in user's HOME directory.
  • GA_PLOT_WINDOW::SETAUTOGRID - Turn on or off the automatic grid layout calculation.
  • GA_PLOT_WINDOW::SETCHARSIZE -
  • GA_PLOT_WINDOW::SETCOLORFLAG - Resetting the color table.
  • GA_PLOT_WINDOW::SETCURRENTTOOL - This method sets the current tool(mouse mode) to be used in the window. 'SELECT' - Seleting a data or a plot for manipulation, copying and deletion, etc. 'ZOOM' - Zoom and reset a plot, switch between multiple and single-plot displays. 'EDIT' - Add, delete or move data points. 'CURSOR' - Mark reference points, switch cursor readout from absolute to relative. 'SLICE' - Change the slices of the 3D data being plotted. 'MARK' - Mark a data point with a special symbol. 'VECTOR' - Change vector magnitute, data point resampling rate, etc.
  • GA_PLOT_WINDOW::SETMAXGRID - Set the maximum number of columns and rows for determining grid layout of plots automatically.
  • GA_PLOT_WINDOW::SET_CROSSHAIRS - This method turns cursor crosshair tracking on or off.
  • GA_PLOT_WINDOW::SET_STATUS_WINDOW - This method assigns a text or label widget ID to be the status window. Cursor tracking reports are sent to the status window.
  • GA_PLOT_WINDOW::USERSETGRID - Allows manually setting the grid layout of the plots. If howeve, the total number of plots is greater than GRID[0]*GRID[1], the grid is recalculated automatically.
  • GETCMODEFIT - Get efit data from CMOD for separatrix and limiter locations
  • GETEFIT - Procedure to get efit data from A0 and G0 file or from MDSPLUS. This can be used as a front end to the usual reada and readg. It prints out a message if the efit data does not occur for the desired value of DELTIME. It does not return any data unless time window requirements are met.
  • GETFILETIME - return creation date and time of a file (not sure atime and ctime are right, for files from a PC)
  • GETIMAGE - The purpose of this function is to allow the user to open either regular or XDR binary image files of two or three dimensions.
  • GETMDSLABEL - return a label for an MDSplus signal. If there is a :LABEL sub-node, use that string, else if there is a :COMMENT sub-node, use that, else return the MDSplus signal name.
  • GETNEXTFILE - get next file in a directory, defaulting to alphabetic search
  • GETPOS - Get the values for the POSITION keyword after a plot
  • GETSCOPENAMES - return signal names and plot settings from an MDSplus Scope input file
  • GETSEP - Get the separtrix (last closed flux surface) R & Z values from EFIT or LRDfit for a particular NSTX or CMOD shot. Interpolate surfaces in time. Can also return R & Z of limiter interior. Also works for CMOD shots (tree opened elsewhere).
  • GETTOK - Function to retrieve the first part of the string until the character char is encountered.
  • GETWRD - Return the n'th word from a text string.
  • GET_DELIM - returns file delimiter that is appropriate to VMS, UNIX or Windows
  • GET_NEBAR - Get Ne Bar (line-averaged plasma density at the midplane) from Multi-point Thomson Scattering data and EFIT gap data.
  • GET_TEXT_INPUT - Prompt the user for input with a question and return the text string typed by user. For X-windows the input is through a text widget, in the middle of the screen, and the text widget waits until carriage return is entered. Otherwise input is in the terminal window, with a beep to alert user.
  • GET_WEBPLOTSUM - Creates summary plots vs time with plasma current, D-alpha, injected power and stored energy (W-mhd).
  • GOOD_IP - Determine if plasma current (Ip) was good for a shot and, optionally declare an event.
  • GPICONT - plot GPI data (an average of a center strip vs. time) as a color contour with the separatrix overlayed
  • GPIMOUNTAIN - plot GPI data (an average of a center strip vs. time) as a surface with the separatrix overlayed
  • GREEK - This function returns the string needed to draw the specified greek character using either the vector graphics font no. 4, or PostScript font 9. If (!d.name eq 'PS') and (!p.font eq 0), then the PostScript font will be used. Otherwise, the vector font will be used.
  • GRIDPLOT - Widget for plotting a grid of data from MDSplus or gadat This is an interactive version of ShotLoop. If at GA, assume that access will be through gadat only. When a plot on the grid is clicked on, it is expanded into a separate window.
  • H5DFROMTEXT - create a H5D file from a text file with columns of data
  • HIGHESTEFITRUN - find highest efit version run (in the MDSplus tree) Checks up to 5, and contigously after that
  • HOURS2TIME - Return time string like 23:59:05 from floating point hour value
  • IDLV4_TO_V5 - Modify an IDL V4.0 (or earlier) procedure such that variables are indexed using square brackets, as allowed (and suggested) within IDL V5.0 and later
  • IJ2RZ - Convert from fast GPI camera pixels at CMOD or NSTX to R & Z
  • IMAGEPROC - Demonstrate a few of IDL's image processing features: Fourier filtering, pixel scaling, pixel distribution (histogram), edge enhancement, dilate & erode, convolution, and zooming.
  • INTERP2D - Perform bilinear 2d interpolation using the IDL intrinsic interpolate procedure
  • INTERP2DFIT - fit irregularly-spaced x, y, & z points by fitting a 2-D surface using SFIT, and, using the returned coefficients, compute new values at other irregularly-spaced locations.
  • INTERPEDGE - Interpolate separatrix in time. From EFIT or LRDfit, find R and Z values of last closed flux surface (separatrix) for a particular NSTX or CMOD shot. Can also return R & Z of limiter interior. Also works for CMOD shots (tree opened elsewhere).
  • INTERPWF - Interpolate MDS signal, or array, to 1 KHz.
  • INT_DEFINED - see if a value is defined and is an integer
  • ISARRAY - Tests if the argument is an array.
  • ISFUNCTION() - Determine whether the IDL program(s) in a file are procedures or functions. Needed because the intrinisc RESOLVE_ROUTINE and ROUTINE_INFO() procedures require the user to know beforehand whether to supply the /IS_FUNCTION or /FUNCTION keywords.
  • ISNUM - Checks whether the input is a number.
  • ISNUMBER - Determine if a text string is a valid number.
  • ISOTIME - Return time in ISO 8601 standard, assuming US East Coast. (handles Daylight Savings time)
  • JD2DATE - Convert a Julian Day number to a date string.
  • JD2YMD - Find year, month, day from julian day number.
  • KEYBRDANIM - Animate frames of plots with keyboard controls. Plot commands can be passed into the routine. By default a vertical dashed red line shows the time. Keyboard controls over animation: 'H': See this Help 'P' or : Toggle Pause 'C': Continue 'F': Faster 'S': Slower 'R' or '>' or : move forward 1 frame 'L' or '<' or : move backward 1 frame 'J' or : Jump forward 10 frames 'B' or : move backward 10 frames 'M': Mouse-click time desired 'Q': to quit
  • LABELEVERYOTHERTICK - Only label every other major tic mark. The format of the numbers is customized.
  • LABELFIT - determine character size to make a label fit in a space
  • LASTMDSSHOT - get the last (current) MDS shot
  • LEAFNAME - Return leaf name from MDSplus pathname(s)
  • LEGEND - Create an annotation legend for a plot.
  • LINESOUT - Write lines out to an X window. Works like xyouts, but uses line #'s (from the top) and /right if you want to right justify text.
  • LINT - Find the intersection of two lines in the XY plane.
  • LINTERP - Linearly interpolate tabulated 1-d data from one grid to a new one.
  • LISTFROMPERL - Called from a Perl Script to list MDSplus data from a Web Page
  • LISTSHOTS - List shot numbers with signal over/under a certain amount
  • LIST_PRINTER_UNIX - LIST available printers from lpstat -a
  • LOADBLOBS - calls many routines used for loading blob tracking info into a database and making plots and output files
  • LOAD_FC - Load summary Waveforms for Phantom Fast Cameras into MDSplus.
  • LOAD_NEBAR - Load Ne-bar Waveform into MDSplus.
  • LOGBOOK_LIST - List info from the NSTX logbook (to a screen or file)
  • LOGBOOK_LIST_PLUS - List info from the NSTX logbook (to a screen or file)
  • LOGBOOK_OPTIONS (COPIED FROM LOGBOOK_OPTIONS) - List info from the NSTX logbook (to a screen or file)
  • LONG64DATE2STR - Return date from a 64-bit longword, like 1112308040, as returned from file_info, in a more conventional format.
  • LONGDATE2STR - Return date from a longword, like 20060218, in a more conventional format
  • MAKEN - Make an array of N values, linear between two given limits.
  • MAKENXY - Make 2-d x and y coordinate arrays of specified dimensions.
  • MATCH - Routine to match values in two vectors.
  • MAXSTRUCT - find the maximum of a structure (ignores structures within the input structure)
  • MDIR - Directory listing of MDSplus data files with wild cards
  • MDSDAT - "replacement" for gadat.pro. Get MDSplus signal data without having to open a tree (much faster, if a tree is specified)
  • MDSDATAVSSHOT - Print single values of MDSplus signals vs. shot number. The value can be the max or min, or at a specific time, including time of Max Ip, Max Neutrons, etc. The shot list may be reduced by certain qualifiers, such as to shots where the max of an arbitrary signal is > a given value. Output can be in a format suitable for importing into Kaleidograph, Excel, etc.
  • MDSDECLAREEVENT - set an MDS event with shot number associated with the event
  • MDSEDITBRANCH - Read a branch of MDSplus values, allow editing of scalar values in a widget and write back out.
  • MDSEVENTWAIT - Widget to Wait for an MDSplus event, or the user clicks the CANCEL button.
  • MDSGETSIG - Get a signal, units and axes values easily from MDSplus
  • MDSLARGESTNODE - find largest node in a tree
  • MDSLIST - Print ASCII file containing data for MDSplus signal(s). The "dimension" of one of the signals (typically time) is in the first column, followed by data values at that time. Output may be in the format suitable for importing into Kaleidograph, Excel, etc.
  • MDSLOADSCALAR - Load MDSplus scalar with one simple call (after opening shot)
  • MDSLOADSIG - Load MDSplus signals with one simple call (after opening shot) Optionally add node and/or tag to a shot tree.
  • MDSMKFILE - Write an ascii file containing time and data for MDSplus signal(s). Time is in the first column, followed by data values at that time. Output may be in the format suitable for importing into Kaleidograph, Excel, etc.
  • MDSNODECHANGES - Print times when the last change was made to an MDSplus node.
  • MDSSCALARS - Print ASCII file containing values of MDSplus scalars(s) for a list of shots.
  • MDSSETEVENT - Generates an MDSplus event
  • MDSSHOTDATE - Print time and date of an NSTX shot.
  • MDSSIGINTERP - call TDI to interpolate signals, but handle expressions in which multiple signals are included. (assumes all same timebase within a given TDI expression)
  • MDSTIME2DBTIME - Convert date & time from MDSplus to database format
  • MDSTREECHANGES - Print times when the last change was made to an MDSplus tree, and who did it.
  • MDSUNITS - return units of an MDS tag, or the time, or time units
  • MDSW - Interactively plot MDS signals with Crosshairs and many options
  • MDSW_NOCH - Plot one MDS signal simply (without Crosshairs)
  • MEDSMOOTH - Median smoothing of a vector, including point near it's ends.
  • MEDSMOOTHEDGE - Median smoothing of an array, including handling edges.
  • MINMAX - print the min and the max of an array
  • MKDATEDIR - Make a directory of the form YYYYMMDD (if it doesnt't exist) and move files there if the files were last modified on that date.
  • MK_BITARRAY - Create an array of 1's & 0's corresponding to input bits set (works for negative numbers, too, unlike similar routines)
  • MK_COLOR - Create color tables with 12 fixed colors at the top. These colors can be referenced by name.
  • MK_FILENAME - File names with system independent symbolic directories.
  • MK_HTML_HELP - Given a list of IDL procedure files (.PRO), VMS text library files (.TLB), or directories that contain such files, this procedure generates a file in the HTML format that contains the documentation for those routines that contain a DOC_LIBRARY style documentation template. The output file is compatible with World Wide Web browsers.
  • MK_JPEG - make a bit-map color jpeg file of an IDL window for (viewable) insertion into MS Word, or Powerpoint documents.
  • MK_MPEG - Write a sequence of images from a 3-D array, or a series of tiff files, as an mpeg movie.
  • MK_PDMENU - make a structure for a pull down menu for CW_PDMENU routine
  • MK_PNG - make a bit-map color png file of an IDL window for (viewable) insertion into MS Word, or Powerpoint documents.
  • MK_SCOPE_GIF - make gif files from scope-like output, using a scope file as input
  • MK_SHOTLIST - Parse an input string for shots into an array of shots
  • MONEVENTS - Widget to monitor occurrence of MDSplus events & optional Shot #, if passed with the event declaration. The time of the event can also be displayed.
  • MONEVENTS VERSION TO RUN IN BATCH MODE. - Widget to monitor occurrence of MDSplus events & optional Shot #, if passed with the event declaration. The time of the event can also be displayed.
  • MONITORJOB - Monitor an IDL job, and restart it if not present
  • MONTHNAMES - Returns a string array of month names.
  • MONTHNUMBER - Returns a month number given a month name.
  • MPCURVEFIT - Perform Levenberg-Marquardt least-squares fit (replaces CURVEFIT)
  • MPEG_FROM_SCREEN - Example of creating a color Mpeg animation with text overlayed. Works on both 8-bit and 24-bit monitors. Can read from files, but those returning 24-bit data will not have the text overlaying option.
  • MPFIT - Perform Levenberg-Marquardt least-squares minimization (MINPACK-1)
  • MPFIT2DFUN - Perform Levenberg-Marquardt least-squares fit to a 2-D IDL function
  • MPFIT2DPEAK - Fit a gaussian, lorentzian or Moffat model to data
  • MPFITELLIPSE - Approximate fit to points forming an ellipse
  • MPFITEXPR - Perform Levenberg-Marquardt least-squares fit to arbitrary expression
  • MPFITFUN - Perform Levenberg-Marquardt least-squares fit to IDL function
  • MPFITPEAK - Fit a gaussian, lorentzian or Moffat model to data
  • MPLOTTITLE - write a plot title with NSTX label and a list of shots on left
  • MPTSCAM - Animate several plots, including MPTS variables
  • MPTSOUT - write a table of MPTS data and errors from the edge along with GPI average
  • MPTSSURFACE - A graphical interface for plotting shaded surfaces of NSTX Multi-point Thomson Scattering data (MPTS) from MDSplus. Summary plots of Ip, D-alpha, Neutral Beam and RF input power, and stored energy (W-mhd from EFIT). Times of NB and RF heating are indicated on the surfaces by darker shading. Different controls are provided to change the viewing angle and other plot parameters. Projection of data maxima vs. radius may be projected on the "back wall". (For critical accuracy of values, especially on the edges, please check with the Thomson diagnosticians personally.)
  • MSG_BELL - Print a message to the IDL session and ring a bell
  • MULTIPLOT - Create multiple plots with shared axes.
  • MVSHOTRANGEDIR - Put files fitting a certain partern into a sub-directory of the form nnnn00s, where nnnn00 represents a shot range, e.g., 114100s whould contain shots 114100-114199.
  • NDECIMALS - returns the number of non-zero digits after decimal point. ignores insigificant bits (in principle)
  • NEARESTI - Return index of input array closest to the value of "pt"
  • NEARESTI_ARRAY - Return indices of big input array closest to the values in the little input array.
  • NEXTGOODSHOT - find the next shot that has more than a certain Ip.
  • NICENUMBER - Find a "nice" number close to the given number. Actually, this is for older digitizers, so "rounds" to numbers like 1, 2, 2.5, 5, etc.
  • NNET.PRO - Neural network classifier. This is a standard 3-layer back-propagation net.
  • NODENAME - Return nodename on Linux computer
  • NODESEARCH - Search MDS Plus Trees for a node
  • NONALPHANUM - find position of first character which are not alphanumeric (0-9, a-z, A-Z & _) if none found, returns strlen(input)
  • NONNUMBER - find position of first character which is not a number (0-9). if none found, returns -1.
  • NONVARPOS - find position of characters which are not valid for MDSplus names
  • NSEARCH - Search MDS Plus Trees for a node
  • NSTXCORNER - write NSTX in upper left-hand corner of a plot
  • NSTXLOGO - draw NSTX logo in upper left-hand corner of a plot
  • NSTXLOGS_GET - Get info on NSTX shots from the ENTRIES table in the NSTXLOGS database
  • NSTX_XP - return the NSTX XP for an NSTX shot
  • NUMBERPOS - find position of first character which is a number if none found, returns strlen(input)
  • NUMLINES - Return the number of lines in a file
  • NWORDS - Return the number of words in the given text string or string array.
  • ONALPHA - Tests for running on an alpha computer. You can specify the the desired Alpha computer. Optionally beeps, and prints a message and returns an error if not on the desired Alpha computer.
  • ONCOMPUTER - Return 1 if on the specified computer. First uses enironmental variable HOST has the computer name.
  • ONESURF -
  • OPLOTDASH - Overplot a variety of dashed lines, even if terminal emulator doesn't for different linestyles
  • OPLOTSEP - Overplot separatrix and limiter onto grid with GPI images already drawn. Works with 2010 NSTX shots.
  • OS_FAMILY - Return the current operating system as in !VERSION.OS_FAMILY
  • OVPLOT - Just like oplot, except it calls vcomp to "visually compress" an array for faster delivery of graphs at the expense of CPU time. All data spikes should be retained.
  • PADSTRINGS - pad column widths so each text field takes up same amount of space. Remove any tabs.
  • PARCHECK - To check that a procedure has been called with the minimum of allowed number of parameters.
  • PDSURFACE - This routine provides a graphical interface to the SURFACE and SHADE_SurfRangeACE commands. Different controls are provided to change the viewing angle and other plot parameters. The command used to generate the resulting surface plot is shown in a text window.
  • PECOMP - Interactively compare PCS and EFIT signals for a shot
  • PICKCOLORNAME - The purpose of this program is to provide a blocking or modal widget interface for selecting a color "name". The program uses colors familiar to the FSC_COLOR program, and is often used to select a color name for passing to FSC_COLOR.
  • PICKPLOT - This function allows the user to interactively pick a plot file. It will be plotted in a separate window. Postscript files (with a "ps" extenstion will go to a gv window, and others will be plotted with xv.
  • PINGPLOT - plot ping times to various computers (from sunfire13, probably).
  • PLASMAEDGE - From EFIT or LRDfit, find R and Z values of last closed flux surface (separatrix) for a particular NSTX shot and time. Optionally save to a file.Also will plot limiters and last closed flux surface with axes. Can also return R & Z of limiter interior.
  • PLOT0CHECK - Plots blank axis if no data in !x.range or !y.range
  • PLOT1SIG - plot 1 NSTX signal for many shots stacked vertically
  • PLOT3_MPTS - Make 3 Multi-point Thomson Scattering Plots: 2-D plots of electron Temp and Density and a time history.
  • PLOT7 - plot 7 (or any number) NSTX signals on the same x-axis
  • PLOTBLOBVYVSBIN - plot a series of vertical velocity traces vs. time from the blob database. Each trace will be from a horizontal range
  • PLOTCOLORFILL - Plots colorful bar charts
  • PLOTDASH - Plot a variety of dashed lines, even if terminal emulator doesn't for different linestyles
  • PLOTHIST - Plot the histogram of an array with the corresponding abcissa.
  • PLOTNORMAL - plot a normal curve on top of a histogram of data
  • PLOTNSHOTS - make scope-like plots with overlays from multiple shots.
  • PLOTNSIGS - make scope-like plots with overlays from multiple signals. this is the version of plotnshots that overlays different signals on the same axes
  • PLOTSCOPE - make scope-like plots, optionally with overlays from multiple shots.
  • PLOTSIG1VSSIG2 - plot 1 MDSplus signal vs. another
  • PLOTSUMMARY - Plot vs. time a summary of a shot (Ip, D-alpha, Pinj) in a small frame
  • PLOTSUMMARY4 - Plot vs. time a summary of a shot (Ip, D-alpha, Pinj, Wmhd) in a small frame
  • PLOTSYM - Define useful plotting symbols not in the standard !PSYM definitions.
  • PLOTTSFONT0 - This procedure will plot the fitted profiles of electron temperature,density, and presssure from the NSTX Multi-Pulse Thomson Scattering (MPTS) diagnostic.
  • PLOTTSWALL - This procedure will plot the fitted profiles of electron temperature and density from the NSTX Multi-Pulse Thomson Scattering (MPTS) diagnostic.
  • POLY_SMOOTH - Reduce noise in 1-D data (e.g. time-series, spectrum) but retain dynamic range of variations in the data by applying a least squares smoothing polynomial filter, also called the Savitzky-Golay smoothing filter. The low-pass filter coefficients are computed by effectively least-squares fitting a polynomial in moving window, centered on each data point, so the new value will be the zero-th coefficient of the polynomial. Approximate first derivates of the data can be computed by using first degree coefficient of each polynomial, and so on. The filter coefficients for a specified polynomial degree and window width are computed independent of any data, and stored in a common block. The filter is then convolved with the data array to result in smoothed data with reduced noise, but retaining higher order variations (better than averaging).
  • POPULATEBLOBS - Read a file created from fcplayer.pro with columns of blob characteristics vs time. compute frame-to-frame statistics like x & y velocity and duration, based on "reasonableness" factors, like maximum movement per frame allowed. Velocities are recomputed after parent-child relationships determined, so the velocity tracks can be smoothed. (loadblobs.pro can be used for all the steps needed to populate the database.)
  • PPPL_PRINTERS - return an array of strings of printer descriptions at PPPL
  • PRIME - Return an array with the specified number of prime numbers.
  • PRINTSCOPE - print scope-like output, using a scope file as input
  • PRINT_PATH - prints component directories of an IDL path string.
  • PROGRESSW - show progress bar until done, or the user clicks the STOP button.
  • PRONAME - This function retrieves the name of the currently active procedure.
  • PSF_GAUSSIAN - Create a 1-d, 2-d, or 3-d Gaussian with specified FWHM, center
  • PSIINTERP - From EFIT or LRDfit, get psi of a flux surface contour at a particular shot and time and R & Z. Then, find the R position of that same psi value at Z=0.
  • PSWINDOW - This function is used to calculate the size of a PostScript window that has the same aspect ratio (ratio of height to width) as the current display graphics window. It creates the largest possible PostScript output window with the desired aspect ratio. This assures that graphics output looks similar, if not identical, to PostScript output.
  • PS_FORM - This function displays a form the user can interactively manipulate to configure the PostScript device driver (PS) setup. The function returns a structure of keywords that can be sent directly to the DEVICE command via its _EXTRA keyword
  • PTR_FREE_RECURSIVELY - This routine when passed a pointer will free up any memory associated with that pointer. This includes structures, which could contain pointers, or other structures which could in turn contain more pointers. It also destroys objects it comes across. It can also cope with null pointers that are found on its travels.
  • PWD - print the current working directory
  • QUICKDESPIKE - Quick way (execution-wise) to remove single-element spikes.
  • READCOL - Read a free-format ASCII data file with columns of data into IDL variables. Lines of data not meeting the specified format (e.g. comments) are ignored. Columns may be separated by commas or spaces. Use READFMT to read a fixed-format ASCII file. Use RDFLOAT for much faster I/O (but less flexibility).
  • READ_ARRAY - Read a numeric array (1-D) from a text file
  • READ_FLOATS - Read a list from a text file and return a floating-point array
  • READ_GENERIC - read an image from a variety of types of files
  • READ_LIST - Read a list from a text file and return a string array. Will ignore lines beginning with a semicolon, but will will return blank lines.
  • READ_NUMBERS - Read a numeric array (1-D) from a text file
  • READ_QUOTED - Reads a file and returns anything between first two quotes.
  • READ_TABLE - Reads a table file, like from a spreadsheet.
  • REMCHAR - Remove all appearances of character (char) from string (st)
  • REMOVE - Contract a vector or up to 7 vectors by removing specified elements
  • REM_ELEM - return subscripts of input array remaining after elements in a second array are removed
  • REPCHR - Replace all occurrences of one character with another in a text string.
  • REPSTR - Replace all occurences of one substring by another.
  • RESAMPLE - Resample a vector with triangular smoothing.
  • RESETPLT - This procedure will reset all or a selection of the system plot variables to their initial values
  • RIGHTYAXISLIMITS - Widget to set some Y Axis values for the right-hand axis in mdsw
  • RIGHT_ASPECT - Allow contour (or x-y) plots to have the aspect ratio of the data
  • RMFILESBYDATE - Remove files not modified since a certain date
  • ROUNDEDAXISLIMITS - Find "nice" axis values, like IDL plot routine does.
  • RUNTOT - compute a running total of an array by calling an external routine (this is inefficient in normal IDL)
  • SAMETYPE - make two variables the same numerical type
  • SAVEBLOBS - Save blob tracks, just like FCplayer, but easier and faster. Usually called from LoadBlobs.pro.
  • SCREENDUMP - Postscript file from an IDL window, whether 8- or 24-bit graphics
  • SCREEN_TITLE - write a plot title with shot date and time and NSTX label
  • SDEV - Returns standard deviation of an array.
  • SEARCHMDSNODES - Search MDSplus nodes for string contents
  • SEARCHTEXTNODES - Search MDS Plus Trees for Textual Data
  • SELECT_FONT - Select a Unix hardware font for IDL graphics.
  • SEPVSTIME - Get the separtrix (last closed flux surface) R & Z values vs. time. from EFIT or LRDfit for a particular NSTX or CMOD shot. Can also return R & Z of limiter interior.
  • SETMDSSHOTEVENT - set an MDS event with shot number associated with the event
  • SETPMULTI - partition the screen into different graphs if 7 or less plot boxes, then 1 column of plots if more than 7 plot boxes, then 2 columns of plots
  • SETUP_PS - open postscript file and set system variables for postscript device
  • SETUP_TEK - Set system variables for tektronix device. Use to direct plots to the Tek window in Versaterm, or to XTC.
  • SETUP_XPC - Use to direct postscript plots to the X-windows Plot Controller (XPC).
  • SHADE_SURFRANGE - make SHADE_SURF plots with x & y ranges (correctly)
  • SHOCKVSTIME - Stack plots of a line from the center of .cin file image at various times See http://nstx.pppl.gov/nstx/Software/Help/shockwaves.html for sample images. After plotting, ou will be prompted for times for which calculate the speed of the leading edge of the shockwave.
  • SHOTATTIME - find the NSTX shot number closest to a certain time
  • SHOTDURATION - Return the Shot Duration in seconds
  • SHOTSOFFILES - Return MDSplus shots (based on creation time) of files
  • SHOW3M - Show a 2D array three ways in a display that combines SURFACE, CONTOUR, and an image (color/gray scale pixels).
  • SHOWBITS - Given a byte or integer, return a vector of 8 or 16 values which are the binary representation of the value.
  • SIGN - Gives the sign of X, i.e. 1 for positive, -1 for negative, 0 for 0.
  • SIMP - Does Simpson numerical integration on an array of y values.
  • SIZE_STRUCT - Obtain the size in bytes of an IDL structure definition.
  • SMOOTH2 - Do multiple smoothing. Gives near Gaussian smoothing.
  • SMOOTHEDGE - smooth a 2-D array using /edge_truncate, but then smooth the remaining rows and columns within width/2 of the edge even more.
  • SMOOTHTRUECOLOR - smooth a true color array 1 component at a time.
  • SPAWNPRINT - Spawn command on VMS or Unix to print a Postscript file
  • SPEC_DIR - Provide a complete file specification by appending a default disk or directory if necessary.
  • SQLFIXSPECIALCHARS - Encapsulate special characters so they can work in SQL text insertions The special characters are '%', '^', '$', '*', '@', '#', '(', '!', ')', '?'
  • STACKPLOT - An example of X-window widgets for plotting some GA data
  • STRARRAYSAME - Returns TRUE if two strings, or string arrays, are identical, else FALSE
  • STRCONCAT - Concatenate a string array into single string, or a matrix of strings into a string array.
  • STREP - Edit a string by position. Precede, Follow, Replace, Delete.
  • STRESS - String edit by sub-string. Precede, Follow, Delete, Replace.
  • STRETCHSTEPS - stretch parts of the color tables into steps.
  • STRMATCH - check for string match to a wild card specification
  • STRNUMBER - Function to determine if a string is a valid numeric value.
  • STRPARSE - Parses the string LINE using the characters in DELIM as delimiters. Puts individual pieces into consecutive locations in LIST.
  • STRUCEDIT - Widget to edit a structure of scalars from an IDL save file. The names of the input fields are the names of the structure elements.
  • STRWHERE - a "where" operator for strings matching a set of string wild cards
  • SURFRANGE - make SURF plots with x & y ranges (correctly)
  • SURF_CONTOUR - The purpose of this program is to demonstrate how to create a shaded surface and coutour plot in the same object graphics window. The contour plot should be able to be translated independently of the surface.
  • SYB_ENTRY - : Display/modify/create entries in the NSTX logbook database.
  • TABINV - To find the effective index of a function value in an ordered vector.
  • TAGRANKOF - Return a list of MDSplus signals with a certain rank (that contain data)
  • TAGSEARCH - Search MDS Plus Trees for a tag
  • TAG_EXIST - To test whether a tag name exists in a structure.
  • TDIS - Search MDS Plus Trees for TDI DATA
  • TEMPLATE - Provide a template for IDL routines to be used by others
  • TESTCMD - test batch execution
  • TEXTLINES - Form lines of text for outputing (say, in a table form). If formats are not input, then guess about good formatting for variables of different types.
  • TH_IMAGE_CONT - Plot contours of Images with both contour lines and colors
  • TIME2SEC - Return times in seconds since Ja. 1, 1970
  • TIMESOFSHOTS - return dates and times, like 12:26PM, of NSTX shot
  • TOIDLTIME - Convert a date string to IDL time (output from SYSTIME(1), i.e., seconds since 1/1/1970
  • TOTSTRUCT - find the total of numerical values in a structure (handles structures within the input structure)
  • TREE_EXISTS - Return a true if an MDSplus tree exists for a given shot number
  • TRIMTAGNAMES - Trim tree info from an MDSplus tag name
  • TRISMOOTH - Triangular smoothing of a vector, including points near the ends.
  • TRUNS_GET - List info (in a database) on NSTX TRANSP runs (to a screen or file)
  • TVIMAGE - This purpose of TVIMAGE is to create a device-independent TV command with the power and functionality to be used in sophisticated graphics programs, as well as at the IDL command line. It can be thought of as a "smart" TV command.
  • TVIMAGE_CONGRID - Shrink or expand the size of an array by an arbitrary amount. This IDL procedure simulates the action of the VAX/VMS CONGRID/CONGRIDI function. This function is similar to "REBIN" in that it can resize a one, two, or three dimensional array. "REBIN", however, requires that the new array size must be an integer multiple of the original size. CONGRID will resize an array to any arbitrary size (REBIN is somewhat faster, however). REBIN averages multiple points when shrinking an array, while CONGRID just resamples the array.
  • TVRD_24 - This function reads a 24-bit image from a 24-bit or 8-bit display device, returning a pixel-interleaved byte array of type BYTARR(3, xsize, ysize), where xsize and ysize are the dimensions of the current graphics device.
  • TV_24 - This procedure displays a 24-bit image on the current graphics device, constructing a custom colour table if the device supports less than 257 colours.
  • TWOSCOMPLEMENT - Taking the Two's Complement of an integer
  • TWOSURF -
  • TYPE - Finds the type class of a variable.
  • UNSETUP_PS - close a postscript file (opened by setup_ps) and re-set system variables for previous device.
  • UNSETUP_TEK - undo system variables from setup_tek call.
  • UNSETUP_XPC - Close plots file opened with setup_xpc, and send to the X-windows Plot Controller (XPC) by figuring out next file in the sequence it is looking for.
  • USESIGMATH - parse an MDSplus TDI string, substituting Brian Nelson's Signal Math TDI routines for +,-,* and /, so timebases get adjusted, if necessary.
  • USINGXWINDOWS - Prompt user for switching Plot device to X.
  • VAXIS - shell around AXIS procedure that sees if number of minor y tick marks need to be reduced, and if the number of y tick labels need to be cut in half.
  • VCOMP - "visually compress" (resample) an array for faster plotting of lines. All data spikes should be retained. Will return y points for each x -- the min & max values. IF nFinal GE N_ELEMENTS(inData)*2 will just return inputs
  • VECTORSURF - Shows a fancy way to plot irregulary spaced data from x,y & z vectors.
  • VGDS_TITLE - write a plot title with shot date and time and NSTX label
  • VIEWTEXT - View a string, or string array, of text in a scrollable text widget.
  • VPLOT - Just like plot, except it calls vcomp to "visually compress" an array for faster delivery of graphs at the expense of CPU time. All data spikes should be retained.
  • VT100 - Define the TEK and VT100 commands for use in IDL. Especially useful for MAC users who use Versaterm or users who otherwise want to do Tektronix plots while connected to their UNIX platform of choice.
  • WATCHEVENTS - Widget to monitor occurrence of MDSplus events. If all events do not happen before next occurance of first event, send e-mail.
  • WEBDISPLAY - Display web pages from IDL for Help, or other purposes.
  • WEBPLOTSUM - Plot vs. time a summary of a shot in a small frame Ip, D-alpha, stored energy, NB & RF power are plotted.
  • WEEKDAY - Compute weekday given year, month, day.
  • WFMDSSHOTEVENT - Wait for an MDSplus event, with shot number coming in
  • WHERE_ARR - Return the subscripts where a given set of values equal the values in the input array. It is basically an expansion of IDL where in which the condition to match can be an array.
  • WHICH - Like Unix which, prints the path of an IDL routine.
  • WHICHCOMPUTER - Return name of Linux computer you are running on. First uses enironmental variable HOST, then uname -n
  • WHITEOUT - white-out a portion of the color table -- defaults to the 5 lowest locs.
  • WIDGET_BOTTOM - Move a widget to the bottom of the screen or base widget.
  • WITHRANKOF - Return a list of MDSplus signals with a certain rank (that contain data)
  • WORDARRAY - Convert text string or string array to a 1-d array of words.
  • WRITECAMAVG - For camera files that exist for a particular shot, check for \CAMERAS::TOP.FC_n.RAWDATA:FRAMES_MAX and \CAMERAS::TOP.FC_n.RAWDATA:FRAMES_AVG (tags \PH7_n_FMAX and \PH7_n_FAVG) and write them if need be.
  • WRITELOG - Provide a writeLog for IDL routines to be used by others
  • WRITE_GENERIC - write an image to the appropriate type of file, based on file extension
  • WRITE_IN_BOX - Writes a text message within a box in a graphics window.
  • WRITE_MPEG - Write a sequence of images as an mpeg movie
  • WRITE_TEXT - Write data to a text file
  • XANIMJPEG - animate jpegs (or other image files) in a VCR-like widget, which can make an MPEG Movie.
  • XAXISW - Widget to set some X Axis values via the system variable !X
  • XCDEDIT - A table editor modified from XVAREDIT for ppcc c.d file.
  • XCOLORS - The purpose of this routine is to interactively change color tables in a manner similar to XLOADCT. No common blocks are used so multiple copies of XCOLORS can be on the display at the same time (if each has a different TITLE). XCOLORS has the ability to notify a widget event handler, an object method, or an IDL procedure if and when a new color table has been loaded. Brewer color tables can also be accessed from this program, if the file fsc_brewer.tbl can be found somewhere in your IDL path.
  • XEASYANIM - animate 3-D array and optionally make MPEG Movie
  • XFONT_4 - XFONT_4 is a modal widget for selecting and viewing an X Windows font.
  • XIA - Display an animated sequence of images using X-windows Pixmaps. The speed and direction of the display can be adjusted using the widget interface.
  • XPC - This function allows to interactively pick a plot file. It will be plotted in a separate gv window.
  • XSECTIONW - Widget to display an image and x-y plots of cross-sections. Color palettes may be loaded, adjusted and saved. Images can be saved as 'jpg','tif','tif','bmp','jpeg,'png', 'ppm', 'pgm', or 'gif'
  • XVAREDIT - This routine provides an editor for any IDL variable.
  • XY2RMRSEP - transform pixel locations (say, from a Fast 2-D Camera image) to distance from the Separatrix and distance along field line parallel to flux lines
  • XYANIM - Animate a series of X-Y plots. Makes an animation in a XINTERANIMATE window. An MPEG file can then be saved, or the movie can be played with VCR-like controls
  • X_COMPLAIN - Pops up a one line complaint.
  • YAXISW - Widget to set some Y Axis values via the system variable !Y
  • YMD2DATE - Convert from year, month, day numbers to date string.
  • YMD2JD - From Year, Month, and Day compute Julian Day number.
  • YRMONTHDAY - Return a string of YYYYMMDD from a date string.
  • ZAXISW - Widget to set some Z Axis values via the system variable !Y

Source: src/idl_cvs/quickdespike.pro

 NAME:
 	quickdespike

 PURPOSE:
	Quick way (execution-wise) to remove single-element spikes.

 CATEGORY:
       Smoothing

 CALLING SEQUENCE:
       IDL> smoothedData = despike( data )
 INPUTS:
       input = 1-D or 2-D data array.

  KEYWORDS
	spike - value that is considered a spike (or higher)
		DEFAULT= 3 times the difference between the 
       	average and the minimum.
	downward - if = 0, will not check for downward spikes
	lowest - for downward pointing spikes, fraction of points to 
		 check for ones "percent" below this value (DEFAULT=0.333)
	percent - (see above) DEFAULT = 1%
	replacement - value to replace spikes with 
  EXAMPLE:
	IDL> mdsopen, 'usxr', 130000
	IDL> y=mdsvalue('\USXR_HUP_00:RAW')
	IDL> d=quickdespike( y, spike=20 )
	IDL> plot,y
	IDL> oplot,d,color=mk_color('red')

    To test:
	IDL> s = quickdespike( /plot )

    To test not needing despiking:
	IDL> d = replicate(20,100)+randomu(seed,100)*5
	IDL> s= quickdespike( d, /plot )

  NOTE: 
       if keyword "spike" not present, will use a value 3 times as large
       as the difference between the average and the minimum. Since this
       is not so good if there are no spikes, the maximum of the data set
       must be 4 times this, otherwise, just use 0.9*2^16.

	spikes way below the average will just be flipped around before
	removing ones above. The identification of ones below are not as
	good.  Test your data !!!

  MODIFICATION HISTORY:
	27-Oct-2010 added REPLACEMENT keyword 
	15-Mar-2010 cleaned up
	30-Sep-2009 Written by Bill Davis, PPPL

Source: src/idl_cvs/readcol.pro

 NAME:
	READCOL

 PURPOSE:
	Read a free-format ASCII data file with columns of data into IDL 
	variables.  Lines of data not meeting the specified format (e.g. 
	comments) are ignored.  Columns may be separated by commas or spaces.
	Use READFMT to read a fixed-format ASCII file.   Use RDFLOAT for
	much faster I/O (but less flexibility).

 CATEGORY:
	Files

 CALLING SEQUENCE:
	READCOL, name, v1 [, v2, v3, v4, v5, ...  v25 , status=status, $
             FORMAT = , /DEBUG ,  /SILENT , nSkip = , NUMLINE =, comment= ]

 INPUTS:
	NAME - Name of ASCII data file, scalar string.  In VMS, an extension of 
		.DAT is assumed, if not supplied.

 OPTIONAL INPUT KEYWORDS:
	FORMAT - scalar string containing a letter specifying an IDL type
		for each column of data to be read.  Allowed letters are 
		A - string data, 
		B - byte,  
		D - double precision,  
		F- floating point, 
		I - integer,  
		L - longword, and  
		X - skip a column.
		(G & E equate to F)

		Columns without a specified format are assumed to be floating 
		point.  Examples of valid values of FMT are

	'A,B,I'        ;First column to read as 6 character string, then 
			1 column of byte data, 1 column integer data. 'V' for LONG64
	'L,L,L,L'       ;Four columns will be read as longword arrays.
	' '             ;All columns are floating point

	If a FORMAT keyword string is not supplied, then all columns are 
	assumed to be floating point.

	SILENT - Normally, READCOL will display each line that it skips over.
		If SILENT is set and non-zero then these messages will be 
		suppressed.
	DEBUG - If this keyword is non-zero, then additional information is
		 printed as READCOL attempts to read and interpret the file.
	nSkip - Scalar specifying number of lines to skip at the top of file
		before reading.   Default is to start at the first line.
	COMMENT - skip if a line begins with this
	NUMLINE - Scalar specifying number of lines in the file to read.  
		Default is to read the entire file
	LINESSKIPPED - Ascii array of lines skipped
	TABDELIM - If set, then assume columns are delimitted by tabs

 OUTPUTS:
	V1,V2,V3,...V15 - IDL vectors to contain columns of data.
		Up to 25 columns may be read.  The type of the output vectors
		are as specified by FORMAT.

 EXAMPLES:
	Each row in a file POSITION.DAT contains a star name and 6 columns
	of data giving an RA and Dec in sexigesimal format.   Read into IDL 
	variables.     (NOTE: The star names must not contain internal spaces.)

	IDL> FMT = 'A,I,I,F,I,I,F'
	IDL> READCOL,'POSITION',F=FMT,name,hr,min,sec,deg,dmin,dsec  

	The HR,MIN,DEG, and DMIN variables will be integer vectors.

	Alternatively, all except the first column could be specified as
	floating point.

	IDL> READCOL,'POSITION',F='A',name,hr,min,sec,deg,dmin,dsec 

	To read just the variables HR,MIN,SEC
	IDL> READCOL,'POSITION',F='X,I,I,F',HR,MIN,SEC

 RESTRICTIONS:
	This procedure is designed for generality and not for speed.
	If a large ASCII file is to be read repeatedly, it may be worth
	writing a specialized reader.

	Columns to be read as strings must not contain spaces or commas, 
	since these are interpreted as column delimiters.  
	(UNLESS /TABDELIM is used). Use READFMT to read such files.

	Numeric values are converted to specified format.  For example,
	the value 0.13 read with an 'I' format will be converted to 0.

 PROCEDURES CALLED
	GETTOK(), NUMLINES(), REPCHR(), STRNUMBER(), ZPARCHECK

 REVISION HISTORY:
	14-Apr-2010 added datatype 'V' for LONG64
	16-Oct-2008 added status keyword
	24-Aug-99 Added LINESSKIPPED keyword
    10/99 Added TABDELIM keyword [Bill Davis]
	Written         W. Landsman                 November, 1988
	Modified	     J. Bloch 			June, 1991
	(Fixed problem with over allocation of logical units.)
	Added nSkip and NUMLINE keywords  W. Landsman    March 92
	Read a maximum of 25 cols.  Joan Isensee, Hughes STX Corp., 15-SEP-93.
	Call NUMLINES() function W. Lansdman          Feb. 1996

Source: src/idl_cvs/read_array.pro

 NAME:
       read_array
 PURPOSE:
	Read a numeric array (1-D) from a text file
 CATEGORY:
       Files
 CALLING SEQUENCE:
       IDL> num_array = read_array(filename)
 INPUTS:
       filename = name of file containing lines of ascii data.
 KEYWORD PARAMETERS:
	nskip    - number of lines to skip before reading
	status - odd, if OK
 OUTPUTS:
       num_array = returned array of floating point values
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> num_array = read_array( filename )
 NOTES:;
 MODIFICATION HISTORY:
       01-Aug-2008 Written by Bill Davis, PPPL

Source: src/idl_cvs/read_floats.pro

 NAME:
       read_floats
 PURPOSE:
      Read a list from a text file and return a floating-point array
 CATEGORY:
       Files
 CALLING SEQUENCE:
       IDL> floats = read_floats(filename)
 INPUTS:
       filename = name of file containing lines of ascii data.  
 KEYWORD PARAMETERS:
	HLP - When set, help information is printed.
	nskip - lines to skip 
	status - if even, then read was successful
 OUTPUTS:
       floats = returned array of floats - 1 per line             	out
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> floats = read_floats( 'hans.txt', maxlines=500000 )
 NOTES:
 MODIFICATION HISTORY:
	26-Sep-2008 Written by Bill Davis, PPPL

Source: src/idl_cvs/read_generic.pro

 NAME:
       read_generic
 PURPOSE:
        read an image from a variety of types of files
 CATEGORY:
       Files, Graphics
 CALLING SEQUENCE:
       IDL> data2D = read_generic( filename )
 INPUTS:
       filename - file name to read in
		can be type 'jpg','tif','tif','bmp','jpeg,'png', 'ppm', 'pgm', or 'gif'
 KEYWORD PARAMETERS:
       Optional output:
	  extension - the file extension, eg., 'jpg'
	  inDim - for .raww files, specify x & y dimensions (Default to [256,128])
	  nBytesPer- for .raww files, specify number of bytes per data point (Default=2)
	  center - if set, will only return center columns (1/2 of data)
 OUTPUTS:
       2-D data array from file               			out
 COMMON BLOCKS:
       NONE
 MODIFICATION HISTORY:
	17-Jul-2013 return bad status if fails in read_image
	15-Apr-2009 added support for .raww type (from Photron cameras)
	30-Sep-2008 added channel keyword
	25-Apr-2007 added colortable keyword
	21-Feb-2007 added ppm file type
	19-Apr-2006 replaced keywords with args R,G,B 
	15-Oct-2004 Written by Bill Davis, PPPL

Source: src/idl_cvs/read_list.pro

 NAME:
       READ_LIST
 PURPOSE:
       Read a list from a text file and return a string array. 
	Will ignore lines beginning with a semicolon, but will
	will return blank lines.
 CATEGORY:
       Files
 CALLING SEQUENCE:
       IDL> str_array = READ_LIST(filename)
 INPUTS:
       filename = name of file containing lines of ascii data.  
 KEYWORD PARAMETERS:
	HLP - When set, help information is printed.
	nskip - lines to skip 
	status - if even, then read was successful
 OUTPUTS:
       str_array = returned array of strings - 1 per line             	out
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> str_array = READ_LIST( filename )
 NOTES:
 MODIFICATION HISTORY:
	16-Aug-2008 added skipChar keyword
	01-Aug-2008 added nskip keyword
	13-Apr-2007 added status keyword
	11-Apr-06 added maxlines keyword [BD]
       1-Apr-99 Written by Bill Davis, PPPL

Source: src/idl_cvs/read_numbers.pro

 NAME:
       read_numbers
 PURPOSE:
	Read a numeric array (1-D) from a text file
 CATEGORY:
       Files
 CALLING SEQUENCE:
       IDL> num_array = read_numbers(filename)
 INPUTS:
       filename = name of file containing lines of ascii data.
 KEYWORD PARAMETERS:
	nskip    - number of lines to skip before reading
	status - odd, if OK
 OUTPUTS:
       num_array = returned array of floating point values
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> num_array = read_numbers( filename )
 NOTES:;
 MODIFICATION HISTORY:
       28-Feb-2002 Written by Bill Davis, PPPL

Source: src/idl_cvs/read_quoted.pro

 NAME:
	READ_QUOTED
  PURPOSE:
	Reads a file and returns anything between first two quotes.
 CATEGORY:
       Files
  CALLING SEQUENCE:
	IDL> comments = READ_QUOTED(filename)
 INPUT:        
	filename - e.g., "waveform.DAT"
  RETURNED:
	comments - string array with dimension = # of lines read (& not skipped)
 KEYWORDS
	delim - quote character, defaults to "
	nskip    - number of lines to skip before reading
 RETURNED:
	strings  - string array

 MODIFICATION HISTORY:
	16-Aug-2008 added skipChar & status keywords
 	26-Aug-00 WMD Written

Source: src/idl_cvs/read_table.pro

 NAME:
 	read_table
  PURPOSE:
       Reads a table file, like from a spreadsheet.  

  CATEGORY:
       files

  CALLING SEQUENCE:
   	IDL> data2d = read_table( filename, nskip=nskip, header=header )

  INPUT:        
	filename - e.g., "AMP.DAT"

  OPTIONAL INPUT:
	nskip    - number of lines to skip before reading (will be returned in header)
	nCols - # of data values per line
       maxLines - default=1,000,000
	delim - if not tab-delimited, set this to ' '

  OPTIONAL OUTPUT:
	strings - if set, returns a string array, rather than floats

  RETURNED:
	Data_2D  - nCols x N array

  EXAMPLE:
	IDL> data2d=read_table('/u/bdavis/StrachanDB/HiRadEnergyBal.txt', nskip=1, $
			       header=header, /strings )

  LIMITATIONS:
	Can't handle blanks in fields

  WRITTEN 25-Feb-2011 by Bill Davis for Jim Strachan

Source: src/idl_cvs/remchar.pro

 NAME:
	REMCHAR

 PURPOSE:
	Remove all appearances of character (char) from string (st)

 CATEGORY:
	Strings

 CALLING SEQUENCE:
	REMCHAR, ST, CHAR

 INPUTS:
	ST  - String from which character will be removed.  
	CHAR- Character to be removed from string. 

 EXAMPLE:
	If a = 'a,b,c,d,e,f,g' then 

	IDL> remchar,a, ','

      will give a = 'abcdefg'

 REVISIONS HISTORY
	Written D. Lindler October 1986
	Test if empty string needs to be returned   W. Landsman  Feb 1991

Source: src/idl_cvs/remove.pro

 NAME:
       REMOVE
 PURPOSE:
       Contract a vector or up to 7 vectors by removing specified elements   
 CATEGORY:
	Arrays
 CALLING SEQUENCE:
       REMOVE, index, v1,[ v2, v3, v4, v5, v6, v7]     
 INPUTS:
       INDEX - scalar or vector giving the index number of elements to
               be removed from vectors.  Duplicate entries in index are
               ignored.    An error will occur if one attempts to remove
               all the elements of a vector.

 INPUT-OUTPUT:
       v1 - Vector or array.  Elements specifed by INDEX will be 
               removed from v1.  Upon return v1 will contain
               N fewer elements, where N is the number of values in
               INDEX.

 OPTIONAL INPUT-OUTPUTS:
       v2,v3,...v7 - additional vectors containing
               the same number of elements as v1.  These will be
               contracted in the same manner as v1.

 EXAMPLES:
       (1) If INDEX = [2,4,6,4] and V = [1,3,4,3,2,5,7,3] then after the call

               IDL> remove,index,v      

       V will contain the values [1,3,3,5,3]

       (2) Suppose one has a wavelength vector W, and three associated flux
       vectors F1, F2, and F3.    Remove all points where a quality vector,
       EPS is negative

               IDL> bad = where( EPS LT 0, Nbad)
               IDL> if Nbad GT 0 then remove, bad, w, f1, f2, f3

 METHOD:
       If more than one element is to be removed, then HISTOGRAM is used
       to generate a 'keep' subscripting vector.    To minimize the length of 
       the subscripting vector, it is only computed between the minimum and 
       maximum values of the index.   Therefore, the slowest case of REMOVE
       is when both the first and last element are removed.

 REVISION HISTORY:
       Written W. Landsman        ST Systems Co.       April 28, 1988
       Cleaned up code          W. Landsman            September, 1992
       Converted to IDL V5.0   W. Landsman   September 1997
       Major rewrite for improved speed   W. Landsman    April 2000

Source: src/idl_cvs/rem_elem.pro

 NAME: 
	rem_elem

   PURPOSE: 
	return subscripts of input array remaining after elements in 
	a second array are removed

   CATEGORY: 
	Programming

   INPUT PARAMETERS:
      inarray - array to search/remove from
      remarray - array of elements to search/remove from inarray

   OUTPUT PARAMETERS:
      count - number of elements (subscripts) returned     

   CALLING SEQUENCE:
      ss = rem_elem(inarray,remarray) ; subscripts remaining or -1

   HISTORY:
      slf, 20-jan-1993
      slf,  7-feb-1993 - documentation carification and variable name change

Source: src/idl_cvs/repchr.pro

 NAME:
       REPCHR
 PURPOSE:
       Replace all occurrences of one character with another in a text string.
 CATEGORY:
	Strings
 CALLING SEQUENCE:
       new = repchr(old, c1, [c2])
 INPUTS:
       old = original text string.          in
       c1 = character to replace.           in
       c2 = character to replace it with.   in
            default is space.
 KEYWORD PARAMETERS:
 OUTPUTS:
       new = edited string.                 out
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner.  28 Oct, 1986.
       Johns Hopkins Applied Physics Lab.
       RES 1 Sep, 1989 --- converted to SUN.
       R. Sterner, 27 Jan, 1993 --- dropped reference to array.

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

Source: src/idl_cvs/repstr.pro

 NAME:
       REPSTR
 PURPOSE:
       Replace all occurences of one substring by another.
 CATEGORY:
	Strings
 EXPLANATION:
       Meant to emulate the string substitution capabilities of text editors
 CALLING SEQUENCE:
       result = repstr( obj, in, out )

 INPUT PARAMETERS:
       obj    = object string for editing, scalar or array
       in     = substring of 'obj' to be replaced, scalar 

 OPTIONAL INPUT PARMETER:
       out    = what 'in' is replaced with, scalar.   If not supplied
               then out = '', i.e. 'in' is not replaced by anything. 

 KEYWORDS:
	INSENSITIVE - if set, then replace string regardless of case
		      ("in" will go in without any case changes)
 OUTPUT PARAMETERS:
       Result returned as function value.  Input object string
       not changed unless assignment done in calling program.

 PROCEDURE:
       Searches for 'in', splits 'obj' into 3 pieces, reassembles
       with 'out' in place of 'in'.  Repeats until all cases done.

 EXAMPLE:
       If a = 'I am what I am' then print,repstr(a,'am','was')
       will give 'I was what I was'.

 MODIFICATION HISTORY:
	18-Nov-2008 added keyword INSENSITIVE
	14-Sep-04 made to work! Bill Davis
       Converted to IDL V5.0   W. Landsman   September 1997
       Accept vector object strings, W. Landsman   HSTX,   April, 1996
       Written by Robert S. Hill, ST Systems Corp., 12 April 1989.

Source: src/idl_cvs/resample.pro

 NAME:
       resample

 PURPOSE:
       Resample a vector with triangular smoothing.

 CATEGORY:
	Smoothing

 CALLING SEQUENCE:
       smallerVector = resample( VECTOR, nth )

 INPUTS:
       VECTOR  = The vector to be smoothed
       nth = The full width of the window over which the median is 
               determined for each point (if even, use window+1).

 OUTPUT:
       Function returns every nth point of the smoothed input vector
 KEYWORDS:
	Indices - Optionally returned. Indices of resulting vector
	Guass - if set, will do psuedo-gaussian weighting, rather than triagular

 SUBROUTINES CALLED: 

 PROCEDURE:
       Each point is replaced by triangular weighting of the nearest WINDOW of points.
       The width of the window shrinks towards the ends of the vector.
 LIMITATION:
	This type of looping is inherently slow in IDL. 
	Should make a FORTRAN routine based on 
	BDAVIS$:[IDL.MDS.FOR]BCSMOOTH.FOR or interpwf.for & 
	use a CALL_EXTERNAL
 REVISION HISTORY:
       Written, Bill Davis. 23-Mar-00

Source: src/idl_cvs/resetplt.pro

 NAME:                 
	RESETPLT

 PURPOSE:              
	This procedure will reset all or a selection
       of the system plot variables to their initial values

 CATEGORY:             
	Plotting

 CALLING SEQUENCE:     
			resetplt,/all           ;clear the !p, !x, !y, !z
                       resetplt,/x,/z          ;clear the !x and !z variables
                       resetplt,/x             ;only clear the !x variable
                       resetplt,/x,/invert     ;clear all except the !x
 INPUTS:
       KEYWORDS:
               x,y,z,p = clear the appropriate variable
               all     = clear all, this is equivalent to /x,/y,/z,/p
               invert  = invert the logic. Clear all unselected variables.
                         Therefore "clearplt,/all,/invert" does nothing.
 OUTPUTS:      
	none
 COMMON BLOCKS:
       none.
 SIDE EFFECTS:
      The sytem plot variables are changed.
 MODIFICATION HISTORY:
       Written by: Trevor Harris, Physics Dept., University of Adelaide,
               July, 1990.

Source: src/idl_cvs/rightyaxislimits.pro

 NAME:
       rightYaxisLimits
 PURPOSE:
       Widget to set some Y Axis values for the right-hand axis
	in mdsw
 CATEGORY:
       Graphics, Widgets
 CALLING SEQUENCE:
       IDL> rightYaxisLimits
 INPUTS:
       none required  
 KEYWORD PARAMETERS:
    Inputs (Optional):
	nPlots - # of plots to allow for (def=8)
	GROUP_LEADER - This widget is destroyed if it's GL is destroyed
 OUTPUTS:
 COMMON BLOCKS:
       rightAxis
 EXAMPLE:
	IDL> rightYaxisLimits
 NOTES:
	Upgrade could use a user-defined system variable rather than common
 MODIFICATION HISTORY:
	13-Feb-01 Added multiple axes settings
	07-Feb-01 Written by Bill Davis, PPPL

Source: src/idl_cvs/right_aspect.pro

 NAME: 
	Right_Aspect

  PURPOSE: 
	Allow contour (or x-y) plots to have the aspect ratio of the data

  CATEGORY: 
	Graphics

  USE:
	IDL> RIGHT_ASPECT, xarray, yarray, IN_POSITION=in_position, $
                  MARGIN=margin, POSITION=position

  KEYWORD PARAMETERS:

     MARGIN: (INPUT)  The margin around the edges of the plot. The value 
    	must be a floating point value between 0.0 and 0.5. It is expressed 
    	in normalized coordinate units. The default margin is 0.15.
    	If margin is a 2-element array, the first value is the left and 
    	bottom margin, and the second is the right and top margin. Otherwise,
    	the right and top margin is set to 1/2 the value of margin.

     IN_POSITION: (INPUT) A 4-element floating array of normalized coordinates.
    	The order of the elements is [x0, y0, x1, y1], similar to the
    	!P.POSITION system variable or the POSITION keyword on any IDL
    	graphic command. Fit resulting contour plot within these limits.

     POSITION: (OUTPUT) A 4-element floating array of normalized coordinates.
    	The order of the elements is [x0, y0, x1, y1], similar to the
    	!P.POSITION system variable or the POSITION keyword on any IDL
    	graphic command. If not present, will set system variable !p.position.

     XRANGE_IN & YRANGE_IN: (INPUTS) - hese override ranges in data

     GetWithZ - if set, plots to Z buffer, and reads back X & Y ticks to
		 determine plot range.

  EXAMPLE: 
	IDL> xarray=FINDGEN(41) & yarray=FINDGEN(21)
	IDL> z = DIST(41,21)
	IDL> in_pos = [.1,.4,.9,.9]		; draw in top part of screen
	IDL> Right_Aspect, xarray, yarray, IN_POS=in_pos, POSITION=out_pos
       IDL> CONTOUR, z, xarray, yarray, XSTYLE=1,YSTYLE=1,  $
		      XMARGIN=[0,0], YMARGIN=[0,0], POSITION=out_pos

  LIMITATIONS: 
	if the POSITION keyword is not used, then the 
	!P.POSITION variable will be set after calling this routine. 
	So, after plotting, do this:  IDL> !P.POSITION = [0,0,0,0]

  MODIFICATIONS:
	03-Feb-2010 added GetWithZ keyword.
	07-Dec-2006 Added xrange_in & yrange_in keywords. These override ranges
		  in data
	28-May-03 Added keyword In_Position. Should now work when partial
		  screen specified.
	04-Apr-01 Do like David Fanning routine, ASPECT, so will work with 
		  A4 paper
	14-Mar-01 Take into account !p.multi settings when computing !p.position
		  Also remove adjustment for x & y pixel number differences.
		  Add POSITION keyword (not fully tested)

Source: src/idl_cvs/rmfilesbydate.pro

 NAME:
       rmfilesbydate
 PURPOSE:
       Remove files not modified since a certain date
 CATEGORY:
       Files, Dates
 CALLING SEQUENCE:
       IDL> rmfilesbydate, path=path, prefix=prefix, ext=ext, date=date
 INPUTS:
       none
 KEYWORD PARAMETERS:
       path - directory
       prefix - file prefix for deletion
       ext - file extension for deletion; file search will be path+prefix+'*.'+ext 
       date - date for search, of form yyyymmdd, e.g., 20050617 (default=TODAY)
       daysbefore - optional additional number of days before date
       verbose - if set, will print informational output
       justprint - if set, will not remove files
 OUTPUTS:
       none
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> 
 NOTES:
 	for safety, on Unix, you may wish to create a ~/Trash directory 
	and alias rm to
 	   /bin/mv !* ~/Trash
 LIMITATIONS
 MODIFICATION HISTORY:
       22-Aug-2005 Written by Bill Davis, PPPL

Source: src/idl_cvs/roundedaxislimits.pro

 NAME:
       roundedAxisLimits
 PURPOSE:
       Find "nice" axis values, like IDL plot routine does.
 CATEGORY:
	Plotting
 CALLING SEQUENCE:
       v = roundedAxisLimits(x1,x2)
 INPUTS:
       x1 = Range minimum.                           in
       x2 = Range maximum.                           in
 KEYWORD PARAMETERS:
 OUTPUTS:
       v = 2-element array of "nice" axis limits.          out
 COMMON BLOCKS:
 LIMITATION:
	IDL> print,roundedaxislimits(0.0,.11)
	      0.00000     0.120000		OK, but
	IDL> print,roundedaxislimits(0.0,.12)
	      0.00000     0.125000		why not 0.12?
 NOTES:
	includes routines copyrighted by Johns Hopkins University (see below)
 MODIFICATION HISTORY:
       26-Jul-04 Written by Bill Davis

Source: src/idl_cvs/runtot.pro

 NAME:
       runTot
 PURPOSE:
       compute a running total of an array by calling an external routine
	(this is inefficient in normal IDL)
 CATEGORY:
       Math
 CALLING SEQUENCE:
       IDL> outarray = runTot(inarray)
 INPUTS:
       inarray = a numeric array.  
 KEYWORD PARAMETERS:
       Keywords:
	  HLP - When set, help information is printed.
 OUTPUTS:
       outarray = returned array of running total                 			out
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> print, runtot(findgen(10))

 	IDL> MDSOPEN, 'operations', 100601
	IDL> ip = MDSVALUE( '\operations::ip_ipf1b_1' )
	IDL> V = runTot( ip )
 NOTES:
       When the routine is called with no parameters, or with the
	keyword hlp set, help information is printed.
 MODIFICATION HISTORY:
       04-Oct-99 Written by Bill Davis, PPPL

Source: src/idl_cvs/sametype.pro

 NAME:
       sameType
 PURPOSE:
       make two variables the same numerical type
 CATEGORY:
       Programming
 CALLING SEQUENCE:
       IDL> sametype, x, y
 INPUTS:
       inputs - numerical scalars or arrays
		(not for structures or strings)
 OUTPUTS:
      inputs are re-typed, as needed
 MODIFICATION HISTORY:
       30-Jan-2007 Written by Bill Davis, PPPL

Source: src/idl_cvs/saveblobs.pro

 NAME:
   	saveblobs

 PURPOSE:
  	Save blob tracks, just like FCplayer, but easier and faster. Usually called from
	LoadBlobs.pro.

 CATEGORY:
	blobs

 CALLING SEQUENCE:
       IDL> saveblobs, filename

 INPUTS:
       filename - a .cin or .hdf file containing plasma images
	
 KEYWORD PARAMETERS:
	filename - cine file to analyze
	outfilename - output of text with blob info (default formed from inputs)
  	t1 & t2 - time range to load (in sec)

       aveT1 - start for averaging frame (DEF=t1) (in sec)
       aveT2 - ending time for averaging frame (DEF=t2)   
	horiz - if=0, do not flip frames horizontally
	RotCCW - if set, will rotate frame Counter-clockwise (after horizontal flip)
		default for NSTX, but not for CMOD
	BlobCriteria - structure for blob criteria, like min normalized height, etc.
	nSmooth - amount to smooth image before looking for blobs
	GaussSmooth - if set, will do "gaussian" smoothing (sort of a double smooth)
		      instead of boxcar smoothing
	FrameOffset - if set, subtract this (like a baseline) from all pixels
	FrameAveMin - if set, make close-to-zero pixels this number, 
		      so when dividing into data, as in normalizing, result is near zero
	AveFrameSmooth - smoothing for the averaged frame(s)
	FrameAveDeltaMS - make frames used for normalizing an average of this many millisec

 EXAMPLES:
 saveblobs, T1=0, T2=20, /verb,   $
    '/p/gpi/szweben/Phantom_Data/2009_Phantom_data/1091216/shot_1091216030.cin'

    '/p/gpi/szweben/Phantom_Data/2010_data/1100120/shot_1100120025.cin'

 saveblobs, T1=90, T2=92, /verb,   $
    '/p/gpi/szweben/Phantom_Data/2009_Phantom_data/1110114/1110114026.cin' 

 saveblos, '/u/bdavis/Blobs/solt_012_3.5b.hdf', shot=99901203, norm=0

 MODIFICATION HISTORY:
	12-Nov-2012 added FrameAveDeltaMS keyword and feature to have an average for
		    a particular frame just be over this # of milliseconds.q
	17-May-2012 several updates to receive parameters to output to file
       01-Mar-2012 decided not to smooth average frame
       WRITTEN 09-Feb-2012 by Bill Davis, PPPL, for Stewart Zweben

Source: src/idl_cvs/screendump.pro

 NAME:
       screendump
 PURPOSE:
       Postscript file from an IDL window, whether 8- or 24-bit graphics
 CATEGORY:
       Printing, 24-bit graphics
 CALLING SEQUENCE:
       IDL> screendump, filename, Encapsulated=encapsulated
 INPUTS:
       filename (or will be prompted)  
 KEYWORD PARAMETERS:
       Keywords:
	  Encapsulated - if set, will get encapsulated postscript
	  Right_Aspect - if set, will maintain aspect ration of window
 OUTPUTS:
       just the output file
 MODIFICATION HISTORY:
	09-May-02 Added bits_per_pixel=8 when not true color [BD]
		  still not working in 24-bit color (???)
	27-Jun-02 Added Right_Aspect keyword [BD]
	07-Mar-02 Added landscape determination [BD]
       ?? Written by David Fanning, www.dfanning.com.

Source: src/idl_cvs/screen_title.pro

 NAME:
       screen_title
 PURPOSE:
       write a plot title with shot date and time and NSTX label
 CATEGORY:
       Plotting
 CALLING SEQUENCE:
       IDL> screen_title, mytitle, ishot
 INPUTS:
       mytitle = whatever you want as the main plot title.  
       ishot = shot number.  
 KEYWORD PARAMETERS:
       Keywords:
	  noShot - if set, do not plot shot number
	  noTime - if set, do not plot time
	  charsize - character size
	  logo - if = 0 will not put logo on plot
	  nstx - if - 0 will not put =NSTX= logo on plot, vs. just NSTX
	  ALIGNMENT - alignment of title. Default to 0.5 (centered)
	  HLP - When set, help information is printed.
 OUTPUTS:
       none
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> !Y.OMARGIN=[0,1]
	IDL> plot,indgen(100)
	IDL> screen_title, 'This is my title', 100523 
 NOTES:
       You'll probably want a little more room at the top of your plots, e.g.
	IDL> !Y.OMARGIN=[0,1]
 MODIFICATION HISTORY:
	13-Aug-2009 fixed logic for mptscam.pro
	17-Sep-2008 added logo and alignment keywords
	30-Jun-2008 added charsize and NSTX keywords
       21-Sep-00 Written by Bill Davis, PPPL

Source: src/idl_cvs/sdev.pro

 NAME:
       SDEV
 PURPOSE:
       Returns standard deviation of an array.
 CATEGORY:
	Math
 CALLING SEQUENCE:
       s = sdev(a)
 INPUTS:
       a = input array.               in
 KEYWORD PARAMETERS:
 OUTPUTS:
       s = standard deviation of a.   out
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
	01-Aug-00 Commented-out checks for a major speed up. [BD]
       Written by K. Kostoff, 1/16/85
       Johns Hopkins University Applied Physics Laboratory.
       Modified by B. Gotwols, R. Sterner --- 1 Oct, 1986.

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

Source: src/idl_cvs/searchmdsnodes.pro

 NAME:
        SearchMDSNodes
 PURPOSE:
      Search MDSplus nodes for string contents
 CATEGORY:
       MDSplus, Searching
 CALLING SEQUENCE:
       IDL> paths= SearchMDSNodes( str[, sensitivity, text=text][,path=path])
 INPUTS:
       str - string to search on
	sensitivity - (Optional) if ='Sensitive', then make search case sensitive
 KEYWORD PARAMETERS:
    Input (Optional):
       JustText - if set, just look for Text nodes (no effect if /TAGS set)
	nonNodeStr - exclude nodes in returned array if this string found in name
	tags - if set, just look for nodes with tags
       sizesearch - when searching text, length of string to check (def=1024)
	whatToSearch - = 'NAMES', 'TEXT', or 'TDI'
	treeName - MDSplus tree. Default='NSTX'
	shot - MDSplus shot to search. Default=-1 (the model tree).
	server - MDSplus server. Default is the default NSTX data server.
    Returned (Optional):
       text (contains the full text found), path(returns the full path to the text)
	isSignal - logical array where 1s indicate corresponding node is a signal
	status - status from mdsvalue call
 OUTPUTS:
	result - status of function: 0 = success, -1 = failed to find
 COMMON BLOCKS:
       none
 EXAMPLE:
	IDL> paths=SearchMDSNodes('xray', text=text ) 
 NOTES:
	tree must already be open before SearchMDSNodes can be called
	if no records are found in current tree returns -1 else returns 0
 MODIFICATION HISTORY:
  	06-May-2010 added max2search keyword
	20-Apr-2010 added keyword isSignal 
	11-Nov-05 Added tree keyword
	01-Dec-00 Added capability for wildcards in search string
	10-Nov-00 Added sensitivity [BD]
       7-Feb-00 Written by Dana Mastrovito, PPPL

Source: src/idl_cvs/searchtextnodes.pro

 NAME:
        SearchTextNodes
 PURPOSE:
      Search MDS Plus Trees for Textual Data
 CATEGORY:
       MDSplus, Searching
 CALLING SEQUENCE:
       IDL> result= SearchTextNodes( keyword[, sensitivity, text=text][,path=path])
 INPUTS:
       keyword - string to search on
	sensitivity - (Optional) if ='Sensitive', then make search case sensitive
 KEYWORD PARAMETERS:
       text (contains the full text found), path(returns the full path to the text)

 OUTPUTS:
	result - status of function: 0 = success, -1 = failed to find
   
 COMMON BLOCKS:
       none
 EXAMPLE:
	IDL> result=SearchTextNodes('xray', text=text,path=path)
 NOTES:
	tree must already be open before tsearch can be called
	if no records are found in current tree returns -1 else returns 0

 MODIFICATION HISTORY:
	01-Dec-00 Added capability for wildcards in search string
	10-Nov-00 Added sensitivity [BD]
       7-Feb-00 Written by Dana Mastrovito, PPPL

Source: src/idl_cvs/select_font.pro

 NAME:
    SELECT_FONT
 Purpose:
    Select a Unix hardware font for IDL graphics.
 Category:
    Utility, Fonts

 Usage:
    SELECT_FONT

 Input:
    None required.

 Optional Keywords:
    /HELVETICA    Select a Helvetica font (default)
    /TIMES        Select a Times font
    /PALATINO     Select a Palatino font
    /COURIER      Select a Courier font
    /BOLD         Select a bold font (default is no bold)
    /ITALIC       Select and italic font (default is no italics)
    SIZE          If set to a named variable, sets the font size (default=12)
    NAME          If set to a named variable, returns the font name selected

 Revised:
    17-OCT-1997 Liam Gumley, CIMSS/SSEC
    Created

 Notes:
    (1) This procedure currently only works on Unix IDL platforms.
    (2) The NAME value returned by SELECT_FONT can be used to set the
        default widget font by the command

 Example:
 !P.MULTI=[0,1,2,0,0]
 PLOT,INDGEN(10)
 SELECT_FONT,/BOLD
 PLOT,INDGEN(10)

 NOTE:
     this version is only for Unix at the moment

Source: src/idl_cvs/sepvstime.pro

 NAME:
  	sepvstime

 PURPOSE:
	Get the separtrix (last closed flux surface) R & Z values 
	vs. time.
       from EFIT or LRDfit for a particular NSTX or CMOD shot. 
	Can also return R & Z of limiter interior. 

 CATEGORY:
       EFIT, NSTX

 CALLING SEQUENCE:
	IDL> sepvstime, shot, trange=trange, Redge=Redge, Zedge=Zedge

 INPUTS:
       shot - shot number for MDSplus call

 KEYWORD PARAMETERS:
    Optional Inputs:
	tRange - range of times desired (defaults to all available)
	fit - fit desired. Default is "best fit"
	outer - if set will just return edge values > median value (default)
	inner  - if set will just return edge values <= median value
	verbose - if set, will print many informational messages
	debug - if set, debug output will be printed
    Returned:
	RedgeVsTime - r values of separatrix (edge) points
	ZedgeVsTime - z values of separatrix points
	used_fit - the fit used
	tFit - times of the fit
	nPerTime - # of good values in corresponding time element of arrays

  EXAMPLE:

     to get get R & Z data:
	IDL> sepvstime, 138847, RedgeVsTime=R, ZedgeVsTime=Z  MODIFICATION HISTORY:
  	WRITTEN 05-Jun-2013 by Bill Davis for Stewart Zweben

Source: src/idl_cvs/setmdsshotevent.pro

 NAME:
        setmdsshotevent

 PURPOSE:
       set an MDS event with shot number associated with the event

 CATEGORY:
       MDSplus, Events

 CALLING SEQUENCE:
       IDL> setmdsshotevent, eventName [, shot_num]

 INPUTS:
	eventName - string of MDS event name, e.g., 'NE_DENSITY_CALC'
       shot_num - NSTX shot number (OPTIONAL -- will default to current shot)

 KEYWORD PARAMETERS:
    Optional:
	VERBOSE - If set, print debugging information
	NOCONNECT - if set, will not try to connect to an MDSplus server
	SERVER - if not set, will connect to default server in OpenMDSshot
       STATUS = return status, low bit set = success

 OUTPUTS:
       none -- just sets the event
 COMMON BLOCKS:
       NONE
 EXAMPLE:
 NOTES:
	Works from Unix or VMS
 MODIFICATION HISTORY:
 	17-Dec-2008 don't try to fill valBlk if shot_num not a number [bd]
 	11-Nov-2008 Default to no mdsconnect [BD]
	02-Nov-2008 Added status keword.
	11-Feb-04 use SETEVENT in MDSVALUE on Unix. Add connect option on unix.
   	20-Dec-99 Written [bd]

Source: src/idl_cvs/setpmulti.pro

 NAME:
 	setpmulti

 PURPOSE:
  	partition the screen into different graphs

  if 7 or less plot boxes, then 1 column of plots
  if more than 7 plot boxes, then 2 columns of plots

 CATEGORY:
       Graphics, Color Specification.

 CALLING SEQUENCE:
	setpmulti, nboxes
	setpmulti, nboxes, /SameXTitles
	setpmulti, nboxes, /SameXTitles, /sameXlabels, /SamePTitles
 INPUTS:
       nboxes: number of plot boxes per page
 KEYWORD PARAMETERS:
	CharSize   : Value desired for !P.CHARSIZE, else guesses
       SameXTitles: If set and non-zero, just place xtitle at bottom
		     (This reserves less vertical space between plots)
       SamePTitles: If set and non-zero, just place title at top
		     (This reserves less vertical space between plots)
       SameXlabels: If set and non-zero, just label x-axis at bottom
		     (This reserves less vertical space between plots)
	NRows	   : Maximum number of rows (default is 7) 
 COMMON BLOCKS:
       SetPMulti_Local

 SIDE EFFECTS:
       Leaves !P.MULTI set unless you call UnSetPMulti.
	Changes character sizes, etc.
 MODIFICATION HISTORY:
	01-May-01 fix for # of rows and columns
	24-Jan-01 Don't force !x.margin[1] to 3. Only reduce this for multi-
		  columns if !x.margin[1] = 3.
	11-Jan-01 Undid setting of !y.ticks, because can't force axis then
	21-Nov-00 Fine tuned !y.multi values; if no columns, make x.margin[1]=3
	18-Sep-00 Corrected SamePtitle keyword use
	24-Jun-99 changed charsize when more than one plot (to 1.4 if rows or cols > 2)
	03-Jun-99 added CHARSIZE keyword [BD]
	Jan-99 - Written by Bill Davis

Source: src/idl_cvs/setup_ps.pro

 NAME:
       setup_ps

 PURPOSE:
   	open postscript file and set system variables for postscript device

 CATEGORY:
	Printing

 CALLING SEQUENCE:  
   	SETUP_PS, name, PRINTER=printer

 INPUTS:
    (Optional)
	name - name of file (defaults to IDL)
		(if no extention, will add .ps)

 KEYWORD PARAMETERS:
    Optional Inputs:
	PRINTER  - printer to send file to (else will be default printer)
		  NOTE: if PRINTER begins with postscript', file will not be 
			sent to a printer
	PORTRAIT - If set, print is in portrait mode
	FONT     - font for printing, e.g., TIMES, HELVETICA, AVANTGARDE,
		   BKMAN, BOLD, PALATINO, ZAPFCHANCERY, NARROW (Default is Times)
	COLOR - if set, postscript will be in color
	AspectRatio - if set, Ascpect ratio of image is maintained
	CharMagnification - magnify !p.charsize (or, if !p.charsize=0, use as charsize)
       xsize - size in inches (defaults to page size -1.5)
	ysize - size in inches (defaults to page size -1.5)
	tt_font
	bold
 OUTPUTS:
	none

 CALLING EXAMPLE:
   	 printer = 'picasso color printer'	; or
   	 printer = 'postscript color '		; or
   	 printer = 'b143 Laserwriter in B143'	; or
   	 printer = 'default printer'		; 
   	 setup_ps,'myplot', PRINTER=printer
   	 plot,indgen(11)			; any number of plot commands
   	 unsetup_ps				; send to printer and back to X

 RELATED ROUTINES:
   	unsetup_ps

 SIDE EFFECTS:
	System variables are changed until unsetup_ps is called.

 NOTE:
	If you haven't already, you may wish to plot on a white background, e.g.,
	   IDL> !p.background=MK_COLOR('white')
	   IDL> !p.color=MK_COLOR('black')

 MODICATION HISTORY:
   30-Oct-2009 default to COLOR if postscript output
   07-May-08 fixed when /ASPECTRATIO made plot bigger than one dimension
   19-Apr-04 Added Filename keyword
   03-Aug-01 Append .ps to output filename if not specified
   04-Apr-01 make max paper width 8.25 to account for A4 paper size.
		make margins 3/4" (rather than 1")
   21-May-99 Added Font keyword (default changed to Times) [BD]
    1-Apr-99 Added Portrait Keyword [BD]
   12-Feb-99 Write file in the login area. Don't send to D4D area. [BD]
		Printer can have "color" after the name (following a space)
   27-Jan-99   BD  - change y.margin settings
   10/15/97    BD  - Removed bold fonts and set to landscape mode
   10/13/97    TBT - Added phaser5
    6/11/97    TBT - took out printer from discolor and added as
                     a keyword
    5/22/97    TBT - added phaser4 & phaser4_trans & hpdj2
    5/21/97    TBT - added include discolor to get printer passed in.
    5/21/97    Ted Terpstra - Put in color printer check &
                              added phaser2 and phaser3 to the list.
    5-16-95    K. Greene -- When setting up output file name, check
               operating system.  VMS cannot use Unix format.

Source: src/idl_cvs/setup_tek.pro

 NAME:
       setup_tek

 PURPOSE:
   	Set system variables for tektronix device.
  	Use to direct plots to the Tek window in Versaterm, or to XTC.
 CATEGORY:
	Graphics, Cross-platform plotting

 CALLING SEQUENCE:  
   	setup_tek

 INPUTS:

 KEYWORD PARAMETERS:
    Optional Inputs:
	CharMagnification - magnify !p.charsize (or, if !p.charsize=0, use as charsize)
 OUTPUTS:
	none

 CALLING EXAMPLE:
   	 setup_tek
   	 plot,indgen(11)			; any number of plot commands
   	 unsetup_tek				; send to printer and back to X

   	 setup_tek, /xtc			; use Tektronix simulator on X
   	 plot,indgen(11)			; any number of plot commands
   	 unsetup_tek				; send to printer and back to X

 RELATED ROUTINES:
   	unsetup_tek

 LIMITATIONS:
	Y-axis ticklabels may overlay the axis. If so, you may use:
	   IDL> plot, x, y, YTICKFORMAT='betterticklabels', ...	
 SIDE EFFECTS:
	System variables are changed until unsetup_tek is called.

 NOTE:
   see http://w3.pppl.gov/~pshare/help/xtc.htm
 MODICATION HISTORY:
   12-Sep-2008 change "/bin/ps -auxw" to "/bin/ps auxw"
   28-Jun-2006 allow for different complier loading in .cshrc
   13-Feb-2006 add XTC calls
   26-Oct-2000 Written by Bill Davis

Source: src/idl_cvs/setup_xpc.pro

 NAME:
       setup_xpc

 PURPOSE:
  	Use to direct postscript plots to the X-windows Plot Controller (XPC).
 CATEGORY:
	Graphics, Postscript

 CALLING SEQUENCE:  
   	setup_xpc

 INPUTS:

 KEYWORD PARAMETERS (all optional):
    SETUP_PS Keywords:
	PORTRAIT - If set, print is in portrait mode
	FONT     - font for printing, e.g., TIMES, HELVETICA, AVANTGARDE,
		   BKMAN, BOLD, PALATINO, ZAPFCHANCERY, NARROW (Default is Times)
	AspectRatio - if set, Ascpect ratio of image is maintained
	CharMagnification - magnify !p.charsize (or, if !p.charsize=0, use as charsize)
       xsize 
	ysize
    XPC keywords:
 	scratchDir - defaults to /loca/$USER/tmpdir (or value of $TMPDIR)
		     programs running on different computers will have differnt 
		     areas. This must be the same used by the plotting-control 
		     software, setup_xpc.pro.
	NODELETE - if set, files in sractchDir (from previous invocation) are 
		   not deleted when application is started.
       TITLE:  A scalar string to be used for the window title.  
	NFILES - # of files to show at one time in window (def=10)
	filter - search filter for plots to show in window (def=XPC_*.ps)
	psPlotFile - file with plotting application keeps plotting 
			(def=scratchDir+'/GV2plot.ps')
	psApp - file plotting application (def="gv")
	appSwitch - switch for file plotting application (def="--watch")
	updateTime - time in seconds between checks to see if list needs refreshed (def=0.5)
	ext - file extensions to look for (def='ps')
 OUTPUTS:
	establishes XPC window

 CALLING EXAMPLE:
   	 setup_xpc				; xpc and gv windows should appear
   	 PLOT, indgen(11)		     	; any number of plot commands
	 XYOUT, .2, .3, 'This is a Label'
   	 unsetup_xpc				; close ps file

 PROCEDURE:
	(see xpc.pro)

 RELATED ROUTINES:
	xpc
   	unsetup_xpc

 LIMITATIONS:
	Y-axis ticklabels may overlay the axis. If so, you may use:
	   IDL> plot, x, y, YTICKFORMAT='betterticklabels', ...	
	This system assumes that /local disks are unique to each system.
 SIDE EFFECTS:
	Post script files (default of 10) are written to ~/XPC_scratch

 NOTE:
   This, in conjunction with unsetup_xpc, is supposed to be a replacement for XTC.
   see http://w3.pppl.gov/~pshare/help/xtc.htm
 MODICATION HISTORY:
   09-Jul-2011 don't use /local, so can be used from different computers
   18-Nov-2009 Written by Bill Davis

Source: src/idl_cvs/shade_surfrange.pro

 NAME:
       shade_surfrange
 PURPOSE:
       make SHADE_SURF plots with x & y ranges (correctly)
 CATEGORY:
	2-D Plotting
 CALLING SEQUENCE:
        shade_surfrange, f, x, y, XRANGE=xrange, YRANGE=yrange, _EXTRA =_extra
 INPUTS:
       f, x & y are just as for surf      in
 KEYWORD PARAMETERS 
	Input:
	  XRANGE - array containing min x & max x
	  YRANGE - array containing min y & max y
	  ZRANGE - array containing min y & max y
	  _EXTRA - standard idl EXTRA keyworrd
 OUTPUTS:
	none
 EXAMPLE:
	x=findgen(100)
	y=x 
	f=DIST(100)
	_EXTRA = { title: 'My Title', $		; pass any extra SHADE_SURF keywords here
	           xtitle: 'seconds', $
		   ax : 40  }
	shade_surfrange, f, x, y, xrange=[20,40], yrange=[50,70],  _EXTRA =_EXTRA
 COMMON BLOCKS:
 NOTES:
	If your are using color tables with reserved colors at the the top,
	e.g., if you use mk_color, you should first call:
	  IDL> dum=mk_color(n_nonfixed=ncolors)
	  IDL> set_shading, values=[0,ncolors-1]

	skirt doesn't seem to work
 MODIFICATION HISTORY:
     09-Jul-02 Handle when yrange or xrange reversed (i.e., first > last)
     17-Aug-01 Handle correctly when !z.range set
     17-Oct-00 Written by Bill Davis

Source: src/idl_cvs/shockvstime.pro

 NAME:
       shockvstime
 PURPOSE:
       Stack plots of a line from the center of .cin file image at various times
	See http://nstx.pppl.gov/nstx/Software/Help/shockwaves.html for sample images.
	After plotting, ou will be prompted for times for which calculate the 
	speed of the leading edge of the shockwave.
 CATEGORY:
       Image Processing, CINE files.
 CALLING SEQUENCE:
       IDL> shockvstime, filename
 INPUTS:
       filename - a .cin file 
 KEYWORD PARAMETERS:
    INPUTS:
	filename - .cin filename
	title - will default to 'Shock Wave at various times'
	times - times entered in msec (are seconds in file)
	jline - vertical index in image to use for line plot. Defaults to 25
	addIn - vertical space between plots
	inc - increment between files to plot (defaults to 1, which plots all)
	gradient - if set, uses a gradient color palette
	flatFrac - see leadingedge.pro
	deltaPercent - see leadingedge.pro
	edge - if set, draw symbol at leading edge of shockwave (defined by
		point of increase after a long flat portion.
	cmPerPixel - centimeters per  pixel (Default=0.2423)
	debug - if set, will stop
    RETURNED:
	allData - returns all the data within the time specified
 OUTPUTS:
       none.
 EXAMPLE:
       To get a postscript file:
           IDL> setup_ps, filename='shockvstime.ps', /color
           IDL> shockvstime
           IDL> unsetup_ps

       surftime=findgen(145)/145*(0.00119100-0.000773)*1000 +1.191
       surfx =findgen(128)
       surf = interpPeak(allData)
       for j=1,2 do surf = interpPeak(surf)
       save,surfx,surfTime,surf, file='Surf_50ma.sav'

       shockvstime, /edge, inc=3
 MODIFICATION HISTORY:
       18-Jun-2009 Written by Bill Davis, PPPL, for Lane Roquemore

Source: src/idl_cvs/shotattime.pro

 NAME:
 	shotAtTime 

 PURPOSE:
	find the NSTX shot number closest to a certain time

 CATEGORY:
       Dates, MDSplus

 CALLING SEQUENCE:
       IDL> shot = MDSshotDate( date, time  )

 INPUTS:
  	date - e.g. '2009/2/10' or '15-Oct-2010'
  	time - e.g.,  '12:13'

 OUTPUT:
	shot - NSTX shot number, probably 6 digits

 NOTES:
	Looks up shot range for the year and then does a binary search to find
	the nearest shot number to the input time.

 EXAMPLE:
   IDL> date='2009/2/10'  & time='12:13'
   IDL> print, shotattime( date, time )
	131441

  31-May-2011 WRITTEN by Bill Davis, PPPL, for Doug Darrow

Source: src/idl_cvs/shotduration.pro

 NAME:
       ShotDuration
 PURPOSE:
       Return the Shot Duration in seconds
 CATEGORY:
       MDSplus
 CALLING SEQUENCE:
       IDL> seconds = ShotDuration(ishot, IpNeeded=IpNeeded, IpSignal=IpSignal,   $
                       RoundUp=RoundUp)
 INPUTS:
       ishot - shot number. If not supplied, will use current shot
 KEYWORD PARAMETERS:
       Keywords:
	  IpNeeded - plamsa current in kiloAmps to be considered real (default=50)
	  IpSignal - mdsplus signal to use to determine plasma current
		default = \wf::ip
		NOTE if signal is not in kiloAmps, divide or multiply by correct factor
	  InSignal - input Ip signal, so doesn't have to be read
	  maxValue - returns max plasma current in KA.
	  nSmooth - the amount to smooth Ip signal before checking the value
		    Default = 11 points.
	  RoundUp  - if set, add 0.1 seconds and round up to nearest 0.1 seconds
	  quiet - if not set, quiet
	  realquiet - if set, no "MDSOPEN success" message
	  Verbose  - if set, print debugging information
	  Server   - MDS server (default is for NSTX)
	  HLP - When set, help information is printed.
 OUTPUTS:
         seconds               			out
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> opt = ShotDuration( IpNeeded=5, IpSignal='\engineering::ip2' )

   to load a scalar with the shot duration time, 

	IDL> for i=shot1,shot2 do d=ShotDuration( i, outSig='\nstx::shotduration' )
 NOTES:
 MODIFICATION HISTORY:
	07-Oct-2009 fixed bug recently introduced when reading default signal.
	05-Mar-2008 Allow Ip to be passed in
	18-Feb-2008 Account for WF tree, but no \IP
	06-Feb-2008 replaced openMDSshot with mdsopen [BD]
	25-Apr-2006 added MaxValue (for Ip) keyword
	29-Aug-2005 nSmooth keyword added 
	28-Jul-2004 added realquiet keyword
      	08-Apr-2004 Written by Bill Davis, PPPL

Source: src/idl_cvs/shotsoffiles.pro

>> TIMES RETURNED FROM FILE_INFO AREN'T CORRECT!!!!!!!!

 NAME:
       shotsOfFiles
 PURPOSE:
       Return MDSplus shots (based on creation time) of files
 CATEGORY:
       dates, MDSplus
 CALLING SEQUENCE:
       IDL> shots = shotsOfFiles( rundate )
 INPUTS:
        files - array of files, or scalar string which may contain wild cards
 KEYWORD PARAMETERS:
   	dates - dates (LONG) of files in YYYYMMDD (e.g., 20061231)
   	times - time of day of file, e.g., 23:59:59
   	seconds - seconds since midnight of time of file creation
   	delta_seconds - time of shot minus time of file creation
   	outfiles - files corresponding to shots out (useful when wild cards used)
   	beforeSeconds - seconds before shot to count as that shot (Default=60)
   	verbose - if set, will print informational output
 OUTPUTS:
       shots - array of shot numbers associated with files
 EXAMPLE:
   IDL> shots=shotsOfFiles( '*.dat',dates=dates,times=times,out=outfiles )

   IDL> d=read_cih(filename, shot=120337, filedate=filedate2,filetime=filetime2)
   IDL> print,shotsoffiles( filename)
 NOTES:

   On Windows, in IDL v. 6.2 and before, when running during Daylight Savings time,
   for files created before DST, use keyword addSeconds=-3600

 MODIFICATION HISTORY:
       31-Mar-2006 Written by Bill Davis, PPPL

Source: src/idl_cvs/show3m.pro

 NAME:
	SHOW3m

 PURPOSE:
	Show a 2D array three ways in a display that combines SURFACE, 
	CONTOUR, and an image (color/gray scale pixels).

 CATEGORY:
	2-D Plotting, Graphics, Image Processing.

 CALLING SEQUENCE:
	SHOW3m, Image [, INTERP = Interp, SSCALE = Sscale]

 INPUTS:
	Image:	The 2-dimensional array to display.

 OPTIONAL INPUTS:
	X = a vector containing the X values of each column of Image.
		If omitted, columns have X values 0, 1, ..., Ncolumns-1.
	Y = a vector containing the Y values of each row of Image.
		If omitted, columns have Y values 0, 1, ..., Nrows-1.
 KEYWORD PARAMETERS:
	INTERP:	Set this keyword to use bilinear interpolation on the pixel 
		display.  This technique is slightly slower, but for small 
		images, it makes a better display.

	SSCALE:	Reduction scale for surface. The default is 1.  If this
		keyword is set to a value other than 1, the array size 
		is reduced by this factor for the surface display.  That is, 
		the number of points used to draw the wire-mesh surface is
		reduced.  If the array dimensions are not an integral multiple
		of SSCALE, the image is reduced to the next smaller multiple.
	E_CONTOUR: a structure containing additional keyword parameters
		that are passed to the CONTOUR procedure.  See the example
		below.
	E_SURFACE: a structure containing additional keyword parameters
		that are passed to the SURFACE procedure.  See the example
		below.
       TITLE: Top plot title
       XTITLE: x-axis title
       YTITLE: y-axis title
       FLOOR: if = 0, will not show color contours on floor
       CHARTHICK;  character thickness on color bar
       DRAWLINES: draw lines to indicate a region of interest
       DRAWBOX : draw box around region of interest
       BOXYMID: y-mid point of box, an line location (default=0.1)
       BOXXMID: x-mid point of box, an line location (default=1)
       BOXWIDTH: width of box (default=0.1)
       BAR: if = 0, will not draw color bar
       C_COLOR:   colors for contours
 OUTPUTS:
	No explicit outputs.

 EXAMPLE:
	IDL> gp, '/u/bdavis/MarthRedi/kineticballooning.txt'

 SIDE EFFECTS:
	A new plot is generated.

 RESTRICTIONS:
	The display gets too "busy" when displaying larger (say 50 by 50),
	images, especially if they are noisy.  It can be helpful to use
	the SSCALE keyword or the SMOOTH and/or REBIN functions to smooth the 
	surface plot.

	You might want to modify the calls to CONTOUR and SURFACE slightly
	to customize the display to your tastes, i.e., with different colors,
	skirts, linestyles, contour levels, etc.

 PROCEDURE:
	First, do a SURFACE with no data to establish the 3D to 2D scaling.
	Then convert the coordinates of the corner pixels of the array to
	2D.  Use POLYWARP to get the warping polynomial to warp the
	2D image into the area underneath the SURFACE plot.  Output the image,
	output the surface (with data) and then output the contour plot at
	the top (z=1).

 EXAMPLES:
	A = BESELJ(SHIFT(DIST(30,20), 15, 10)/2.,0)  ;Array for example
	SHOW3, A		;Show it with default display.
	SHOW3, A, SQRT(FINDGEN(30))  ;Make X axis proportional to sqrt
	SHOW3, A, E_CONTOUR={C_CHARSIZE:2, DONW:1} ;Label CONTOUR lines with
		double size characters, and include downhill tick marks.
	SHOW3, A, E_SURFACE={SKIRT:-1, ZRANGE:[-2,2]}  ;Draw a surface with
		a skirt and scale Z axis from -2 to 2.
 MODIFICATION HISTORY:
	DMS. Jan, 1988.
	Added fudges for PostScript, April, 1988.
	Fixed bug where contour plot was occasionally clipped. Dec, 1990.
	Added optional axis variables, and _EXTRA keywords for CONTOUR,
		and SURFACE.  Jan, 1996.
	DD.  Added code to ignore !ORDER for the TV of the image.  Mar 1997.
       SJL  Fixed bug from scaling with polywarp. July, 1998.
	DD.  Add better support for TrueColor devices.
	     Honor !P.BACKGROUND (rather than assuming black or white
            background).  Sept, 2000.
    	Feb/2005 hacked by Bill Davis for Martha Redi:
	     better scaling of bottom image. Added lines and a square to indicate region.
	     When bottom values are zero, make white (transparent). Add color bar.

Source: src/idl_cvs/showbits.pro

 NAME:
       showbits
  PURPOSE:
       Given a byte or integer, return a vector of 8 or 16 values
       which are the binary representation of the value.
  CATEGORY:             
	Bits, Hardware
  USAGE:
	bitarr = SHOWBITS( invalue, /print )
  INPUT:
       invalue - The byte or integer value to check
  OUTPUT:
       bitarr  - The 8-element array with values set
                 if the bit is set
  KEYWORDS:
    (Optional)
	NtoShow - # of bits to show
  HISTORY:
	29-Oct-99 Converted to Function by Bill Davis, ntoshow added
       Written 1988 by M.Morrison
       13-Nov-92 (MDM) - Modified to allow integer*2 values
                         and to allow an array of values.
        7-Apr-94 (MDM) - Allow integer*4 values
       15-Aug-94 (MDM) - Corrected error from 7-Apr-94 mod which
                         did not allow an array of inputs
  LIMITATIONS:
	Only works for non-negative, fixed-point numbers

Source: src/idl_cvs/sign.pro

 NAME:
       SIGN
 VERSION:
       3.0
 PURPOSE:
       Gives the sign of X, i.e. 1 for positive, -1 for negative, 0 for 0.
 CATEGORY:
       Math
 CALLING SEQUENCE:
       Result = SIGN(X)
 INPUTS:
    X
       Numerical, otherwise arbitrary.
 OPTIONAL INPUT PARAMETERS:
       None.
 KEYWORD PARAMETERS:
       None.
 OUTPUTS:
       Returns the value of SIGN(X), see above, as an long integer.
 OPTIONAL OUTPUT PARAMETERS:
       None.
 COMMON BLOCKS:
       None.
 SIDE EFFECTS:
       None.
 RESTRICTIONS:
       For complex X the result is SIGN(REAL(X)), the imaginary part is ignored
 PROCEDURE:
       Straightforward.  Using CAST from MIDL.
 MODIFICATION HISTORY:
       Created 15-JUL-1991 by Mati Meron.
       Modified 25-DEC-1991 by Mati Meron.
       Modified 5-DEC-1993 by Mati Meron.  Output type changed to LONG.

Source: src/idl_cvs/simp.pro

 NAME:
       SIMP
 PURPOSE:
       Does Simpson numerical integration on an array of y values.
 CATEGORY:
 CALLING SEQUENCE:
       i = simp(y, h)
 INPUTS:
       y = array of y values of function.                 in
       h = separation between evenly spaced x values.     in
 KEYWORD PARAMETERS:
 OUTPUTS:
       i = value of integral.                             out
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner, 19 Dec, 1984.
       Johns Hopkins University Applied Physics Laboratory.

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

Source: src/idl_cvs/size_struct.pro

 NAME:
	SIZE_STRUCT
 PURPOSE:
	Obtain the size in bytes of an IDL structure definition.    
 CATEGORY:
	Programming
 CALLING SEQUENCE:
			bytes = size_struct( structure )
	examples:
			print, size_struct( "fdq_sdf" )
 INPUTS:
		structure = a structure variable or
				a string giving the structure name
				as known by IDL (help,/struct,variable).
		/PRINT = to print all sub structure sizes.

 inputs/outputs used recursively:
		struct = the structure VARIABLE currently analyzed.
		Max_Field_Size = size of the largest field found in structure.
 RESULT:
		Function returns the total size in bytes of a structure element.
 EXPLANATION:
	For most applications this function is superceded by use 
	of the /LENGTH keyword to the intrinsic N_TAGS function 
	introduced in IDL V2.3.0

 PROCEDURE:
		Strategy is to call size_struct recursively if
		structure contains sub-structures.
		Otherwise just add up the field sizes.

 MODIFICATION HISTORY:
	written 1990 Frank Varosi STX @ NASA/GSFC (using align_struct).
	Converted to IDL V5.0   W. Landsman   September 1997

Source: src/idl_cvs/smooth2.pro

 NAME:
       SMOOTH2
 PURPOSE:
       Do multiple smoothing. Gives near Gaussian smoothing.
 CATEGORY:
	Smoothing
 CALLING SEQUENCE:
       b = smooth2(a, w)
 INPUTS:
       a = array to smooth (1,2, or 3-d).  in
       w = smoothing window size.          in
 KEYWORD PARAMETERS:
	EDGE_TRUNCATE - as in SMOOTH
 OUTPUTS:
       b = smoothed array.                 out
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner.  8 Jan, 1987.
       Johns Hopkins University Applied Physics Laboratory.
       RES  14 Jan, 1987 --- made both 2-d and 1-d.
       RES 30 Aug, 1989 --- converted to SUN.
       R. Sterner, 1994 Feb 22 --- cleaned up some.
	25-Apr-00 Added EDGE_TRUNCATE keyword. [BD]
	06-Jul-2009 for RGB images, smooth component separately [BD]
	limit smoothing width to dimension of data

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

Source: src/idl_cvs/smoothedge.pro

 NAME:
       smoothedge

 PURPOSE:
	smooth a 2-D array using /edge_truncate, but then smooth the
	remaining rows and columns within width/2 of the edge even more.

 CATEGORY:
       Smoothing

 CALLING SEQUENCE:
       IDL> smarray = smoothedge( array, nsmooth )

 INPUTS:
       array - a 2-D array. (If 2-D array, will just call smooth)
	
 KEYWORD PARAMETERS:
    Inputs:
	any keywords will be passed directly to IDL smooth routine
	nsmooth - a number passed to smooth routine

 OUTPUTS:
	smarray - smoothed array 

 EXAMPLE:
       array = dist(100,100)+randomu(seed,100,100)*20
       !p.multi=[0,2,0]
       thcont, array
       thcont, smoothedge(array, 11)
 NOTES:
 MODIFICATION HISTORY:
	28-Aug-2012 smooth corners, as well
 	04-May-2009 WRITTEN by Bill Davis, PPPL

Source: src/idl_cvs/smoothtruecolor.pro

 NAME:
       smoothtruecolor

 PURPOSE:
       smooth a true color array 1 component at a time.

 CATEGORY:
       Smoothing

 CALLING SEQUENCE:
       IDL> smarray = smoothTrueColor( array, nsmooth )

 INPUTS:
       array - a 3xNXxNY array. (If 2-D array, will just call smooth)
	nsmooth - a number passed to smooth routine

 KEYWORD PARAMETERS:
    Inputs:
	any keywords will be passed directly to IDL smooth routine

 OUTPUTS:
	smarray - smoothed array 

 EXAMPLE:
       array = dist(100,100)+randomu(seed,100,100)*20
       array = [[array], [array], [array]]
       array = reform( array, 3, 100, 100 )
       !p.multi=[0, 2,0]
       thcont, array
       thcont, smoothtruecolor(array, 11)
 NOTES:
 MODIFICATION HISTORY:
      09-Nov-2011 Written by Bill Davis, PPPL

Source: src/idl_cvs/spawnprint.pro

 NAME:
       spawnprint
 PURPOSE:
       Spawn command on VMS or Unix to print a Postscript file
 CATEGORY:
       Printing
 CALLING SEQUENCE:
       IDL> spawnprint, filename, printer=printer
 INPUTS:
       filename (or will be prompted)  
 KEYWORD PARAMETERS:
       Keywords:
	  printer - else will go to the default printer
		  NOTE: if PRINTER begins with postscript', file will not be 
			sent to a printer
 OUTPUTS:
       none
 MODIFICATION HISTORY:
       07-Mar-02 Written by Bill Davis

Source: src/idl_cvs/spec_dir.pro

 NAME:
	SPEC_DIR
 PURPOSE:
	Provide a complete file specification by appending a default disk
	or directory if necessary.

 CATEGORY:
	Files, OS Specific, Strings
 CALLING SEQUENCE:                      
	File_spec = SPEC_DIR( filename, [ extension ] )
 INPUT:
	filename - character string giving partial specification of a file
		name.  Examples for different operating systems include the
			following:
		VMS: '$1$DUA5:TEST.DAT','[.SUB]TEST'
		Unix: pro/test.dat, $IDL_HOME/test
		MacOS: ':Programs:test'
		Windows: '\pro\test.dat','d:\pro\test'

 OPTIONAL INPUT:
	exten - string giving a default file name extension to be used if
		filename does not contain one.  Do not include the period.

 OUTPUT:
	File_spec - Complete file specification using default disk or 
		directory when necessary.  

 EXAMPLE:
	IDL> a = spec_dir('test','dat')

	is equivalent to the commands
	IDL> cd, current=cdir
	IDL> a = cdir + delim + 'test.dat'

	where delim is the OS-dependent separator 
 METHOD:
	SPEC_DIR() decomposes the file name using FDECOMP, and appends the 
	default directory (obtained from the CD command) if necessary.   
	Under VMS, SPEC_DIR() will also try to translate disk and directory 
	logical names.

	SPEC_DIR() does not check whether the constructed file name actually
	exists.
 PROCEDURES CALLED:
	FDECOMP, OS_FAMILY()
 REVISION HISTORY:
	Written W. Landsman         STX         July, 1987
	Added Unix compatibility, W.  Landsman, STX   August 1991
	Added Windows and Macintosh compatibility   W. Landsman  September 1995

Source: src/idl_cvs/sqlfixspecialchars.pro

 NAME:
       sqlfixspecialchars
 PURPOSE:
       Encapsulate special characters so they can work in SQL text insertions
       The special characters are '%', '^', '$', '*', '@', '#', '(', '!', ')', '?' 
 CATEGORY:
	Strings
 CALLING SEQUENCE:
       new = sqlfixspecialchars(old)
 INPUTS:
       old = original text string.          in
       c2 = character to replace it with.   in
            default is space.
 KEYWORD PARAMETERS:
	replace - if set, replace any special characters with an underscore
 OUTPUTS:
       new = edited string.                 out
  EXAMPLE:
	IDL> in_string = 'high $  jog $ !'
	IDL> print,fixspecialchars(in_string)
	high '$$'  jog '$$' '!!'
 COMMON BLOCKS:
 NOTES:
	uses repstr.pro
 MODIFICATION HISTORY:
 	06-Mar-2007 written by Bill Davis

Source: src/idl_cvs/stackplot.pro

 NAME: 
	stackplot

 PURPOSE: 
	An example of X-window widgets for plotting some GA data

 CATEGORY:             
	Plotting, Example, Widgets, GA

 CALLING SEQUENCE: 
	stackplot

 USE:
  	If you have a file named mdsplussig.txt in the directory
	from which you are running IDL, signal names in the file
	will be plotted when you click on "My Signals." The names
	should be one per row.

 MAJOR FUNCTIONS and PROCEDURES:
       PLOT: X-Y plotting.
       SMOOTH: Smooths data and overplots.

 MODIFICATION HISTORY: Written by:  WMD, PPPL, March, 1997
                       based on RSI's Forecast example
	26-Jan-99 Modified for using MDS at PPPL by Bill Davis
       21-Oct-97 WMD Simplified for IDL class example at GA
       15-Apr-97 WMD Changed for remote plotting test

Source: src/idl_cvs/strarraysame.pro

 NAME:
      StrArraySame
 PURPOSE:
      Returns TRUE if two strings, or string arrays, are identical, else FALSE
 CATEGORY:
      Strings
 CALLING SEQUENCE:
      Result = StrArraySame( STRING1, STRING1 )
 INPUTS:
    STRING1 & STRING1
      Character strings.
 KEYWORD PARAMETERS:
      IGNORECASE - if set then ignore case in comparison
 OUTPUTS:
      Returns 1 if the words in two strings, or string arrays are identical, 
	else 0.
       e.g. 'ece1 ece2' is considered equal to ['ece1','ece2']
 OPTIONAL OUTPUT PARAMETERS:
      None.
 COMMON BLOCKS:
      None.
 SIDE EFFECTS:
      None.
 RESTRICTIONS:
      None.
 MODIFICATION HISTORY:
      Created 19-Sep-97 by Bill Davis

Source: src/idl_cvs/strconcat.pro

 NAME:
       strconcat
 PURPOSE:
       Concatenate a string array into single string,
       or a matrix of strings into a string array.
 CATEGORY:
	Strings
 CALLING:
       string = strconcat( string_array )
 INPUTS:
       string_array = array of strings or numbers, if numbers they
                       will be converted to strings before concatenating.
 KEYWORD PARAMETERS:
    Optional:
   	delim - string to insert between parts of array (default to null)
 OUTPUT:
       Function returns a single string.
 HISTORY:
	16-Nov-2004 add delim keyword
       Written: Frank Varosi NASA/GSFC 1994.

Source: src/idl_cvs/strep.pro

 NAME:
       STREP
 PURPOSE:
       Edit a string by position. Precede, Follow, Replace, Delete.
 CATEGORY:
	Strings
 CALLING SEQUENCE:
       newstring = strep(string,cmd,p,ss,[iflg])
 INPUTS:
       string = string to edit.                               in
       cmd = edit command:                                    in
         'P' = precede position p with substring ss.
         'F' = follow position p with substring ss.
         'R' = replace text starting at position p
               with text from substring ss.
         'D' = delete N characters starting at
               position p.  The calling sequence for
               this command is slightly different:
               IFLG = STREP(string,'D',p,n,[iflg])
               Where n = number of characters to delete.
       p = character position to use.                         in
           0 = first char.  Any number larger
           than the string length = last char.
       ss = substring to use.  For 'D' command                in
            n is used instead of ss.
 KEYWORD PARAMETERS:
 OUTPUTS:
       iflg = 0 for a successful edit,                        out
       iflg = -1 for an error and no change to string.
       newstring = edited string.                             out
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       Written by R. Sterner, 27 Dec, 1984.
       Converted to SUN 13 Aug, 1989 --- R. Sterner.
       Johns Hopkins University Applied Physics Laboratory.

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

Source: src/idl_cvs/stress.pro

 NAME:
       STRESS
 PURPOSE:
       String edit by sub-string. Precede, Follow, Delete, Replace.
 CATEGORY:
 CALLING SEQUENCE:
       new = stress(old,cmd,n,oldss,newss,ned)
 INPUTS:
       old = string to edit.                               in
       cmd = edit command:                                 in
         'P' = precede.
         'F' = follow.
         'D' = delete.
         'R' = replace.
       n = occurrence number to process (0 = all).         in
       oldss = reference substring.                        in
       oldss may have any of the following forms:
         1. s	  a single substring.
         2. s...    start at substring s, end at end of string.
         3. ...e    from start of string to substring e.
         4. s...e   from subs s to subs e.
         5. ...     entire string.
       newss = substring to add. Not needed for 'D'        in
 KEYWORD PARAMETERS:
 OUTPUTS:
       ned = number of occurrences actually changed.       out
       new = resulting string after editing.               out
 COMMON BLOCKS:
 NOTES:
       Notes: oldss and newss may be arrays.
 MODIFICATION HISTORY:
       Written by R. Sterner, 6 Jan, 1985.
       Johns Hopkins University Applied Physics Laboratory.
       RES --- 23 May, 1988 fixed a bug in SSTYP = 2.
       Converted to SUN 13 Aug, 1989 --- R. Sterner. (FOR loop change).
       --- 8 Dec, 1992 added recursion so that OLDSS and NEWSS may be arrays
       T.J.Harris, University of Adelaide.

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

Source: src/idl_cvs/stretchsteps.pro

 NAME:
       stretchsteps

 PURPOSE:
       stretch parts of the color tables into steps.

 CATEGORY:
       Colors, Image processing

 CALLING SEQUENCE:
       stretchsteps, Low, High, steps=n [, /CHOP]

 INPUTS:
       Low:    The lowest pixel value to use.  If this parameter is omitted,
               0 is assumed.  Appropriate values range from 0 to the number 
               of available colors-1.

       High:   The highest pixel value to use.  If this parameter is omitted,
               the number of colors-1 is assumed.  Appropriate values range 
               from 0 to the number of available colors-1.

 OPTIONAL INPUTS:
       Gamma:  Gamma correction factor.  If this value is omitted, 1.0 is 
               assumed.  Gamma correction works by raising the color indices
               to the Gamma power, assuming they are scaled into the range 
               0 to 1.
       steps:  number of steps/colors of the resulting color table (default=16)
 KEYWORD PARAMETERS:
       CHOP:   If this keyword is set, color values above the upper threshold
               are set to color index 0.  Normally, values above the upper 
               threshold are set to the maximum color index.

 OUTPUTS:
       No explicit outputs.

 COMMON BLOCKS:
       COLORS: The common block that contains R, G, and B color
               tables loaded by LOADCT, HSV, HLS and others.

 SIDE EFFECTS:
       Image display color tables are loaded.

 RESTRICTIONS:
       Common block COLORS must be loaded before calling stretchsteps.

 PROCEDURE:
       New R, G, and B vectors are created by linearly interpolating
       the vectors in the common block from Low to High.  Vectors in the 
       common block are not changed.

       If NO parameters are supplied, the original color tables are
       restored.

 EXAMPLE:
       Load the STD GAMMA-II color table by entering:

               LOADCT, 5

       Create and display and image by entering:

               TVSCL, DIST(300)

       Now adjust the color table with stretchsteps.  Make the entire color table
       fit in the range 0 to 70 by entering:

               stretchsteps, 0, 70

       Notice that pixel values above 70 are now colored white.  Restore the
       original color table by entering:

               stretchsteps

 MODIFICATION HISTORY:
	26-May-2006 Fixed green & blue switch & get color table rather than
		relying on common block [BD]
	18-Dec-2002 Modified RSI STRETCH.PRO [BD]
       DMS, RSI, Dec, 1983.
       DMS, April, 1987.       Changed common.
       DMS, October, 1987.     For unix.
       DMS, RSI, Nov., 1990.   Added GAMMA parameter.

Source: src/idl_cvs/strmatch.pro

 NAME:    
	strmatch

  PURPOSE:    
	check for string match to a wild card specification

 CATEGORY:             
	Strings

  USAGE:     
	result=strmatch(str,spec)

  INPUT:
    	str       string
   	spec      wild card specification

  OUTPUT:    1 if STR matches SPEC
             0 if STR does not match SPEC

  LIMITATIONS:
             Currently the only wild card character is asterisk, "*"
             which matches 1 or more arbitrary characters.

  
  EXAMPLE:    
             print,strmatch('string','st*ng')      ;  => 1
             print,strmatch('string','*st*ng')     ;  => 0
             print,strmatch('string','*t*ng')      ;  => 1
             print,strmatch('string','st*ng*')     ;  => 0
             print,strmatch('string','st*n*')      ;  => 1

  AUTHOR:  Paul Ricchiazzi                            jan94
           Institute for Computational Earth System Science
           University of California, Santa Barbara

Source: src/idl_cvs/strnumber.pro

 NAME:
	STRNUMBER
 PURPOSE:
	Function to determine if a string is a valid numeric value.
 CATEGORY:             
	Strings
 CALLING SEQUENCE:
       result = strnumber(st,val)
 INPUTS:
       st - string
 OUTPUTS:
       1 is returned as the function value if the string st has a
       valid numeric value, otherwise, 0 is returned.
 OPTIONAL OUTPUT:
       val - (optional) value of the string.  real*8
 WARNING:
       Note that (as of Version 2.0.10) a blank string (e.g. " ") is not
       a valid numeric value, although an empty string ("") is.
 HISTORY:
       version 1  By D. Lindler Aug. 1987

Source: src/idl_cvs/strparse.pro

 NAME:
       STRPARSE
 VERSION:
       3.0
 PURPOSE:
       Parses the string LINE using the characters in DELIM as delimiters.  
       Puts individual pieces into consecutive locations in LIST.
 CATEGORY:
       Strings
 CALLING SEQUENCE:
       Result = STRPARSE( LINE, DELIM [, LIST])
 INPUTS:
    LINE
       Character string.
    DELIM
       Character string.  Each Character of DELIM is used as a delimiter.
 OPTIONAL INPUT PARAMETERS:
       None.
 KEYWORD PARAMETERS:
       None.
 OUTPUTS:
       Returns the number of pieces found minus one i.e. the index of the last
       element of LIST if LIST is provided.  If LINE is a null string or not a
       string, the function returns -1l.
 OPTIONAL OUTPUT PARAMETERS:
    LIST
       Character array.  If name is provided, the pieces of LINE resulting 
       from the parsing process are returned in consecutive locations in LIST.
 COMMON BLOCKS:
       None.
 SIDE EFFECTS:
       None.
 RESTRICTIONS:
       None.
 PROCEDURE:
       Straightforward.  Using the function TYPE from MIDL.
 MODIFICATION HISTORY:
       Created 15-JUL-1991 by Mati Meron.

Source: src/idl_cvs/strucedit.pro

 NAME:
       strucedit
 PURPOSE:
       Widget to edit a structure of scalars from an IDL save file.
 	The names of the input fields are the names of the structure elements.
 CATEGORY:
       Widgets, structures
 CALLING SEQUENCE:
       IDL> strucedit
 INPUTS:
       input = whatever.  
 KEYWORD PARAMETERS:
    Optional Keywords:
	inStrc - IDL structure of variables to edit 
	labels - labels for input fields. If not specifie, name of variable
		 will be used.
	savefile - name of IDL save file with initial structure 
	           not used if inStrc input specified, if neither user
		   will be prompted for a file name.
	title - title of widget
	GROUP_LEADER - This widget is destroyed if it's GL is destroyed
 OUTPUTS:
       a new IDL save file is created
 LIMITATIONS:
	Will only work on a structure containing scalars.
	Does not ask any "are you sure" type of questions.
 COMMON BLOCKS:
       NONE
 EXAMPLE:
	IDL> strucedit,  savefile='/u/bdavis/SpecFit/modespecstrc.sav'
     or
	IDL> strucedit,  instrc={a:0, b:1.0, c:'label name'}, $
			labels=['Value of A', 'Value of B']
 NOTES:
 MODIFICATION HISTORY:
	29-Apr-2005 Written by Bill Davis, PPPL

Source: src/idl_cvs/strwhere.pro

 NAME:  
	strwhere

 PURPOSE:  
	a "where" operator for strings matching a set of string 
       wild cards

 CATEGORY:             
	Strings, Searching

 USAGE:  result = strwhere( starr, wildcard )
         result = strwhere( starr, wildcard, nfound )

 INPUT:    
   starr   an array of strings                   

   wildcard  wild card specifier composed of regular and special
           characters.  The special characters are  asterisk '*'
           and vertical bar '|'.  The asterisk matches any number of
           characters the vertical bar indicates an "or" operation
           between different wild card specifications.

 KEYWORD INPUT:

   orchar  character used to indicate "or" wildcard operation.
           (default = '|')

   notequal - if set, return indices where values are NOTEQUAL
   ignoreCase - if set, will ignore case 
 OUTPUT:
   result  an index array such that starr(result) = those elements of
           STARR that match the wild card specification in WILDCARD
   

 EXAMPLE:  

  f=findfile(/home/paul/arm/arese/bsrn/sgpbsrnC1.a1.*.cdf)
  clrdays='*1018*|*1022*|*1030*'
  print,f(strwhere(f,clrdays))

 AUTHOR:   Paul Ricchiazzi                        14 Jan 97
           Institute for Computational Earth System Science
           University of California, Santa Barbara
           paul@icess.ucsb.edu

 REVISIONS:
 	20-Dec-04 added notEqual and ignoreCase keywords
	22-Apr-03 if no matches, see if need to strip quotes from wildcard
	03-Jan-03 Replace sep_str with breakstring [Bill Davis]
	21-Jan-00 Make work for no matches. Add nfound. [Bill Davis]

Source: src/idl_cvs/surfrange.pro

 NAME:
       surfrange
 PURPOSE:
       make SURF plots with x & y ranges (correctly)
 CATEGORY:
	2-D Plotting
 CALLING SEQUENCE:
        surfrange, f, x, y, XRANGE=xrange, YRANGE=yrange, _EXTRA =_extra
 INPUTS:
       f, x & y are just as for surf      in
 KEYWORD PARAMETERS 
	Input:
	  XRANGE - array containing min x & max x
	  YRANGE - array containing min y & max y
	  ZRANGE - array containing min y & max y
	  _EXTRA - standard idl EXTRA keyworrd
 OUTPUTS:
	none
 EXAMPLE:
	x=findgen(100)
	y=x 
	f=DIST(100)
	_EXTRA = { title: 'My Title', $		; pass any extra SURF keywords here
	           xtitle: 'seconds', $
		   ax : 40  }
	surfrange, f, x, y, xrange=[20,40], yrange=[50,70],  _EXTRA =_EXTRA
 COMMON BLOCKS:
 NOTES:
	logic is still not perfect. See, e.g., 
	AUSER4:[BDAVIS.TEST.NDD]NDD3D.PRO for a working example of overlaying
	surface plot on a shaded surface plot with ranges set.
 MODIFICATION HISTORY:
     09-Jul-02 Handle when yrange or xrange reversed (i.e., first > last)
     17-Aug-01 Handle correctly when !z.range set
     17-Oct-00 Written by Bill Davis

Source: src/idl_cvs/surf_contour.pro

 NAME:
       SURF_CONTOUR

 PURPOSE:
       The purpose of this program is to demonstrate how to
       create a shaded surface and coutour plot in the same
       object graphics window. The contour plot should be
       able to be translated independently of the surface.

 AUTHOR:
       FANNING SOFTWARE CONSULTING
       David Fanning, Ph.D.
       2642 Bradbury Court
       Fort Collins, CO 80521 USA
       Phone: 970-221-0438
       E-mail: davidf@dfanning.com
       Coyote's Guide to IDL Programming: http://www.dfanning.com

 CATEGORY:
       Widgets, IDL 5 Object Graphics.

 CALLING SEQUENCE:
       SURF_CONTOUR, data, x, y

 REQUIRED INPUTS:
       None. Fake data will be used if no data is supplied in call.

 OPTIONAL INPUTS

       data: A 2D array of surface data.

       x: A vector of X data values.

       y: A vector of Y data values.

 OPTIONAL KEYWORD PARAMETERS:

       _EXTRA: This keyword collects otherwise undefined keywords that are
        passed to the surface initialization routine.

       GROUP_LEADER: The group leader for this program. When the group leader
       is destroyed, this program will be destroyed.

       XTITLE: A string used as the X title of the plot.

       YTITLE: A string used as the Y title of the plot.

       ZTITLE: A string used as the Z title of the plot. COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 EXAMPLE:
       To use this program with your data, type:

        IDL> Surf_Contour, data

 MODIFICATION HISTORY:
       Written by David Fanning, 20 September 98.

Source: src/idl_cvs/syb_entry.pro

 NAME: SYB_ENTRY

 PURPOSE : Display/modify/create entries in the NSTX logbook database.

 CATEGORY:
	Database

 CALLING SEQUENCE:  
	IDL> SYB_ENTRY
	IDL> syb_entry, font=find_font(/courier,/bold, size=12)

 KEYWORD PARAMETERS: 
	DEFAULT='save_file' to restore settings.
	FONT = a font
	FSIZE = font size (default=14)
	WARNING - if=0, will not display intial warning of  "RUN_INFO has not been run today"
	INITAL_QUERY - the initial query of the database, e.g. 
		'rundate=20070523 and VOIDED IS NULL'
	        defaults to current user, last day with 
		entries, topic in ('PHYS OPS','SESSION LEADER')) and  VOIDED IS NULL

 LIMITATIONS 

 About

  - ENTRY_DISPLAY is a widget based IDL procedure for
   looking at entries in the LOGBOOK database.  Its primary
   purpose is to display an up-to-date set of logbook entries
   during a run.

   The user specified the record selection criteria

   (Options->Display Options).  Whenever a new logbook
   entry is made, the display is automatically updated to
   include the new record(s) if they meet the criteria 
   (unless one is in a blocking entry widget).

   This tool allows the user to create new logbook entries.
   Chose 'Make Final Entry' from the Entry menu.

   In addition this tool can be used to void and edit
   existing logbook entries.  Select part of an entry in
   main display, and then choose 'Edit Entry' or
   'Void Entry' from the Entry menu.
   NOTE:  you may only void or edit entries which you have
          entered into the database! Send email to dbadmin to have other 
	   entries changed.
 
 NOTES
   To get a white background on text, you need certain commands in a .Xresources
   file. You can have these loaded under the file menu in syb_entry.

   use add_topic_logbook.pro to add topics. 

   to void a topic:
	IDL> cmd = "DELETE FROM topics WHERE topic='BOLOMETERS'"
	IDL> count = DSQL(cmd, stat=stat)

 MODIFICATION HISTORY:
	02-Aug-2010 added timer to refresh every n seconds (DEFAULT=60)
	04-Jun-2010 increased default max rows to 300
	02-Apr-2010 added help on pattern matching syntax
	12-Mar-2009 use common to pass display options, because structures 
		    within structures have bugs, and are too convoluted. [BD]
	02-Oct-2008 only do an mdsconnect if mds_event_server not defined.
	20-May-2008 fixed Make Entry Options.
	12-May-2008 calling mdssetevent breaks the connection needed for the widget to 
		    recognize events, so now just spawn "setevent".
		    Requires that environmental variable mds_event_target be set.
		    (e.g. to birch.pppl.gov:8501) Tidied up several other issues
		    like consistancy of "Auto Updates" checkbox.
	27-Jul-2007 Added WARNING and INITIAL_QUERY keywords.
		    Added UPDATE button to MAKE_ENTRY widget, so entries can be made
		    in steps. Help added to CUSTOM QUERY window to aid searches.
	02-May-2007 changed default printing to your default printer. Added debug printing
	30-Apr-2007 fixed auto updates on Linux
	09-Apr-2007 Get Current shot from MDSplus, rather getting the largest
		    shot number from the database [BD]
	05-Mar-2007 Allow text with special characters 
		    ('%', '^', '$', '*', '@', '#', '(', '!', ')', '?', ';') to go 
		    into the logbook.
		    added some color buttons. [BD]
	22-Jan-2007 Make sure connect to an event server (default to europa:8501).
	18-Jul-2005 change !version.os to !version.os_family to pick up linux
	05-Mar-2004 Upon startup update the screen with a query [BD]
	02-Mar-2004 Font keyword added, and changed options to ascending order and
		    auto scroll = off (Bill Davis)
       Josh Stillerman 9/20/96  initial version
       Lew Randerson 1999-11-04 Convert from ENTRY_DISPLAY to SYB_ENTRY by 
                                  mimicking Stan Kaye's mods to create VMS SYB_ENTRY
                                ... Convert entry_display to syb_entry (*** default file = $HOME/SybEntry.dat ***)
                                                                       (*** strayed from sk default file handling ***)
                                ... Add GetCurrentDate
       Lew Randerson 1999-11-08 Change 'logbook' to 'nstxlogs'
       Lew Randerson 1999-11-16 Check for os when handling print options
	Lew Randerson 1999-11-17 Add event handling stuff
	Lew Randerson 2000-01-11 Fix typo in get_entry_text parameters
	Lew Randerson 2000-01-11 Put back 'RUN_INFO' check
	Lew Randerson 2000-01-11 Handle unix printing
                                Check hand.key exists