93/02/09 Local IDL stuff: ~~~~~~~~~~~~~~~~ Here in Code 916 at the NASA Goddard Space Flight Center, we have developed a number of routines of general utility. Install these routines anywhere you wish; the best place is probably somewhere under /usr/local/lib/idl/. Some environment variables need to be defined: IDLDIR = the root IDL directory (/usr/local/lib/idl on our system) IDLDAT = a directory for data files needed by our routines IDLCOL = a directory for our "tg" color table files While we tried to avoid naming our procedures the same as those supplied in the IDL users library, one notable exception exists: our JULDAY routine takes out 'yymmdd' date foprmat and returns the day number within a year (i.e., JULDAY('911231') returns 365), rather than the true Julian date as returned by the userlib JULDAY routine. For compatibility with existing programs, we are unable to rename our JULDAY to something else. A partial list of these routines follows at the end of this file, grouped by categories. However, three sets of procedures deserve special mention: the "tg" routines, the mapping routines, and the fake widget routines. The TG Routines: ~~~~~~~~~~~~~~~~ A problem exists when one tries in IDL to put line plots and labels overlaying a color image on a graphics terminal. In the first place, imaging coordinates and plotting coordinates are not the same on some devices; second, there is an inconsistency from device to device with restpect to such coordinate differences. For example, on a Tektronix 4100 series terminal, two different coordinate systems are used for vector plotting (1024x780) and image pixel setting (640x480); on the Z-buffer device, the same coordinates are used for both plotting and imaging: both are 640x480. What one would like is to be able to call a set of plotting routines which would put an image on the screen (any screen, in fact--if we are using a 4014, which can do only vector plots, we would like a contour plot of the image data automatically instead of an image) and then plot and/or label on top of that image WITHOUT worrying about setting and resetting screen coordinates and scaling factors. The TG routines do this. They set the IDL plotting viewport to correspond to the area the image occupies on the screen. Some kind of plotting is done, and the viewport is then restored to what it was. The idea is to set up an "image viewport" on the screen: a sort of potential viewport which takes effect only when doing image plots, and which does not interfere with your setting of the IDL viewport for other purposes. All this takes place with no calculation or intervention on the part of the user. You simply slap your image on the screen and use a "tg" routine to plot on top of it. While we are at it, it would be nice to be able to set up these viewports and plot without regard to the device being used. Therefore, the TG routines impose a universal screen whose dimensions of 640 by 480 are mapped to the actual dimensions of the current device. No matter what device you are using, you can think of it a being made up of 640 pixels across and 480 pixels vertically (These pixels are referred to as "universal pixels," or "u-pixels," in the documentation for some of the routines. The "universal screen" on which these "u-pixels" are found is referred to as the "u-screen." So, how do you use the tg routines? First, the TG routines have got to know somehow what sort of device you are plotting to. Simply call one of a set of initialization routines: TVSINIT -- the local 256-color imaging device (i.e., a workstation display, such as X Windows. TVPINIT -- PostScript TVZINIT -- Internal IDL Z-buffer TVKINIT -- Tektronix 4107 series color graphics terminals TV4INIT -- Tektronix 4014 (vector-plotting only) TV0INIT -- Tektronix 4010 (vector-plotting only) TVTINIT -- Tektronix 4014 terminal, but with imaging simulated by hatching. Simply call one of these IDL routines anytime before you make your plot, and the rest of your programs (using the TG routines) will be device-independent. If you really need to know what device you are using, TGQUERY will return the device type and some of its capabilities (see the source code for more detailed documentation). Of course, before they make a plot on the image viewport, that image viewport must somehow be defined. This is done by one of two ways: (1) Use TG (the equivalent of the built-in TV imaging procedure) to put an image on the screen. For example, TG,img,x,y will put the array IMG on the screen with its lower left-hand corner at u-screen coordinate (X,Y). TG knows how big the IMG array is in each direction, so it knows the location and size of the desired viewport. This information is stored in a common block, and the user never has to worry about it. In other words, call TG to put your image up, and subsequent calls to the TG routines will work automatically, and you don't have to worry about setting the image viewport yourself. (2) Use SET_IMG. For those users who like complete and detailed control, this routine sets the image viewport explicitly. It takes a single parameter, a 4-element vector. The elements are: (0) the x-u-screen-coordinate of the lower left hand corder (1) the y-u-screen-coordinate of the lower left hand corder (2) how many pixels the viewport extends in the x direction (3) how many pixels the viewport extends in the y direction Of course, these pixel coordinates are all in u-pixels! Regardless of how the tg viewport has been set, there is also a way of finding out where it is: use GET_IMG. This routine works the same as its SET_IMG counterpart described above, except it returns the values instead of setting them. (If no image viewport has been set, this GET_IMG routine will set up a 370x370 pixel image viewport whose lower left-hand corner is at (50,50). Thus, if you are not sure if an image viewport has been set at some point in your program, you can always call GET_IMG to insure that one has been set before you try to TGplot. ) Once your image is up, how do you do overplotting? Most of the built-in IDL graphics procedures take a POSITION keyword. For these procedures, simply use POSITION=tgposit(0) as part of the calling sequence. The tgposit function will return the appropiate values to make the plot over the image viewport. XYOUTS, however, does not take the POSITION keyword, so use the TGOUT2 routine to place text relative to the univeral screen. In special, complicated cases wher the above methods do not work, try calling the SAVE_PLT procedure just before your plot to set the current viewport to the image viewport, and REST_PLT immediately afterwards to restore the original viewport. There are also tg routines which correspond to IDL plotting routines: tgplot, tgoplot, and so on. These are obsolete now and are used only for compatibility with old, IDL Version 1 tg routines. Example: ; We have an array of temperatures in TMP(47,50) ; and windspeeds in array WNDS(47,50). ; ; First, initialize the X Windows screen TVSINIT ; ; If we tried to image the array TMP directly, we would have an ; image 47 pixels wide by 50 pixels high--not very large. So expand ; the image to 300 by 300 pixels using CONGRIDI: TIMG = CONGRIDI(TMP,300,300) ; ; Since our data run from 170 Kelvin to 250 Kelvin (this is just an ; example), and since the imaging routine prefers a byte array ; for an input image, use BYTSCL: TIMG = BYTSCL( TIMG, 190., 250.) ; ; Now put the image in the middle of the screen: TG, TIMG, (640-300)/2, (480-300)/2 ; ; Next, we want to make a contour plot of windspeed on top of this: ; First, make sure we don't erase our image when we contour: !noeras = 1 ; ; Now contour contour,wnd,position=tgposit(0) ; (Note that we did not have to do a CONGRIDI on WND, since the ; contouring routine fills the viewport no matter how small the ; data array is.) ; ; Let's see, what else? Oh, let's put up a label just above the image: TGOUT2, (640-300)/2 + 20, (480-300)/2 + 300 + 10, 'Test Label' ; ; Ok, now we are done. If we like what we see, we can simply change ; the first line to, say, TVQINIT to get a gray-scale image on the ; QMS laser printer. Or if we prefer a Tektronix color terminal, ; we'll change it to TVKINIT. Anyway, no other changes are necessary. The Mapping Routines ~~~~~~~~~~~~~~~~~~~~ Until recently, IDL had no built-in procedures for doing geographical map projections. That need was met by a set of routines written locally. Now that IDL has such funtions built-in, there is less need for these local routines, but they still exist for compatibility with existing programs. putmap is the basic routine to take a 2D array of data on longitudes and latitudes and make a color image from the data. It takes all sorts of parameters and keywords to get the plot looking just like you want it, including continental outlines and/or longitude/latitude lines. drawmap simply draws continents and/or longitude/latitude lines without plotting any data. mapproj converts (longitude,longitude) coordinate pairs to (x,y) map coordinates (usually ranging from -1 to +1 in both directions). jorppam (mapproj spelled backwords) converts in the opposite direction. To make your own custom plot on a map projection (i.e, not using putmap or drawmap), call the set_map_coords procedure first, then convert your longitude and latitude paris to map coordinates and plot the resulting (x,y) values. You can plot vectors using putvec, and perform your own vector mapping using vecproj (which maps the vector direction along a great circle route to get the direction right). The Fake Widget Routines ~~~~~~~~~~~~~~~~~~~~~~~~ Before IDL implemented its widgets on the Silicon Graphics Iris machines, we needed them. So we wrote our own cheap versions to implement radio buttons, sliders, scroll lists, and so on. We included two widgets IDL did not: a thumbwheel for selecting integer values and a dial (a sort of circular slider). There is really no reason for you to use these fake widgets instead of true IDL widgets, and the routines are listed here only for completeness ============================================================================= LIST OF LOCAL IDL GENERAL-PURPOSE ROUTINES, ARRANGED BY CATEGORY ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ============== DOCUMENTATION callseq Reminds the user what is the calling sequence for routine 'pname' catalog prints out the calling sequence and documentaion for a procedure/function or a set of procedures/functions print_doc prints out the calling sequence and documentaion for a procedure or function in a file ============== DEBUGGING/CHECKING check does a help of the variable, and if it is an array prints out the max and min check_date Performs idiot check on date of form 'yymmdd' check_var Checks a variable for correct type and dimensions closeall closes and frees all files strnum Checks if a string has all numeric (0-9) characters ============== MATH avg Calculate the average value of an array, or calculate the average value over one dimension of an array as a function of all the other dimensions. ceiling returns the first integer greater than or equal to the floating point parameter x congridm Same as congridi (2D linear interpolation in an expansion of an array) but fixes the end-pixel problem: It insures that the original field is properly interpolated at the right and top edges of the output array. deriv_array Numerical Differentiation of an array using 3 point Lagrangian interpolation contained in deriv. deriv_b Numerical Differentiation of a vector which does not differentiate across bad value points. ev Restricts values to be evenly divisible by a given number fill fills in gaps in vector fillgap2d fills in gaps in the array "inarr" genfit3 performs a least squares fit to up to 7 arbitrary functions the data points being fit are not necessarily independent. hermit Cubic Spline Interpolation interp given a set of input coordinates, xin and yin, and a set of desired abscissa values, xout, which are not, in general, equal to xin, at which you want to know the corresponding ordinates, this function will do a third order polynomial fit where xout lies within the range of xin, and a linear interpolation if xout lies outside the range of xin. interp2d interpolates a 2D array in x and y to a set of irregularly spaced points interpol Linear interpolation for vectors. Regular or irregular grid. linear3d does linear interpolation. note that this version does interpolation of a 2D layer from a 3D array, with the interpolation variable being the third dimension. max2d finds the maximum element's indices in a 2D array meden finds the median value of an array min2d finds the minimum element's indices in a 2D array mknice creates "nice" intervals for graph axes, contour levels, etc. monotonic Determine if a vector is monotonic msmooth (mrs:) "smooths with a mask" appears to perform possible circular convolutions nice make a nice value out of val nice_range given min and max values, determines a range that encompassed "nice" values for plotting pos_angle returns an angle which has been phase shifted to 0-360 degrees reconcile3 co-locates THREE data strings round rounds a floating point number to the nearest whole integer sfft get amplitudes and phases from idl fft sgn returns sign of argument spline1d does cubic spine interpolation spline2d does cubic spine interpolation. note that this version does interpolation of a 1D line from a 2D array, with the interpolation variable being the second dimension. spline3d does cubic spine interpolation. note that this version does interpolation of a 2D layer from a 3D array, with the interpolation variable being the third dimension. splprep1d sets up variables for cubic spline interpolation splprep2d sets up variables for cubic spline interpolation. note that this version sets up for interpolation of a 1D line from a 2D array, with the interpolation variable being the second dimension. splprep3d sets up variables for cubic spline interpolation. note that this version sets up for interpolation of a 2D layer from a 3D array, with the interpolation variable being the third dimension. stmedian determines the median of the vector x sum Total up an array over one of its dimensions. twodinterp 2D bilinear interpolator (interpolates one 2D array to another 2D array) ============== ARRAY OPERATIONS chorder reverses the order of dimensions in an array A(4,5,3) becomes B(3,4,5). sort of like transpose, but for more than 2 dimensions delet Finds and deletes element ele from vector arr. If arr2 is present, the element in arr2, corresponding to the position of ele in arr, is deleted from arr2. delete_element This procedure deletes an element from a linked list. If parameter index_num is passed, then the element specified by index_num is deleted. Otherwise, the last element in the list is deleted. difkind returns a vector of the DIFFERENT values contained in x imerge2 Combines two vectors together, resolving duplicates in Checks if a value is found in a specified set. Returns the position of the value in the set. Returns -1 if the value is not in the set. in_interval Determine if a quantity is within a given interval indx finds the index into vector x whose element is closest to the value t. insert_element This procedure inserts a new element into a linked list. If parameter index_num is passed, then the new element is inserted after the element specified by index_num. Otherwise, it is inserted after the last element. The index of the new element is returned as an output keyword. insrt Inserts ele into vector arr in sequence. If arr2 and ele2 are present, ele2 is inserted into arr2 in the same position that ele is inserted into arr. notwhere Returns a vector of element indices into x which are NOT included in the vector oo. regroup Supplies an index to regroup an array that is made up of several groups of elements that are strung together. reorder transfer and reorder array elements Reorder will rearange a 2-D array in the most optimal fashion scal2vec Convert scalar to a vector of length 1 swhere Same as 'where' function, except always returns a scalar, never a vector thinout thin out an array by taking every nb elements starting with the first element unique returns the vector of unique values from the vector x vec2scal Convert vector of length 1 to a scalar vexist determines whether a variable is a vector vwhere Same as 'where' function, except always returns a vector, never a scalar ============== STRING OPERATIONS cleanstrup converts the input variable to a string, upshifts it, and trims blanks off the front and back of it. firstlet retrieves first character from upshifted, blank-trimmed string print_error prints the error message saved in parameter error_str, waits for the user to press the return key (if keyword nowait is not passed), and then returns pstr Utility to format a variable or array for printing as a string query query asks the question in the string a and looks for the answers Y or N read_char Gets a character from the keyboard. The user is limited to a set of characters specified. std_string Convert a string variable to standard length and case, or remove padding str converts a number to a string str_parse breaks an input string up into component parts str_replace replaces occurences of one substring with another strchar Checks if a string has all alphabetic (a-z,A-Z) characters strepl, Replaces 1 substring with another strfndswit finds places in an uppercase string where alphabetic characters should be shifted to lowercase stringflip flips the case of alphabetic characters in a string stroccur Determines no. of occurrences of a sub-string in a string ============== TIME/DATE FUNCTIONS date1900 Converts the day number since 1 Jan 1900 to a date in form YYMMDD. date_to_nums Changes a 'yymmdd' or 'yymmddhh' date string to separate numbers for year, month, day, and hour datearr produces an array of dates from start to end in (yymmdd) string format day1900 Converts a date in form YYMMDD to the day number from 1 Jan 1900. daydiff returns number of days between any two dates (on modern calender), including the first day, i.e. if first and last days are the same, the difference returned is 1. dayjul given a day number within a year and the year, returns a 'yymmdd'-format date string. fmt_date formats a 'yymmdd' or 'yymmddhh' date string into a nice-looking string gendate generates a date string from a day number and its fraction (e.g. 287.456) and year; the date string is returned as YYMMDD HH.MM.SS getday gives the date for the day number in a year isleap determines if the year is a leap year julday return the day number of the year for a given date monstr given a month number (1-12), returns a string with the month name ndmon returns number of days in month of year nextday gets the next date after the given date nums_to_date Changes numeric year, month, and day (and perhaps hour) to a 'yymmdd' or 'yymmddhh' date string prevday gets the previous date before the given date strmon given a month string (1-12), return the numerical month value timediff returns the number of hours between any two times timestr returns parameter time (specified in seconds) converted to the string hh:mm:ss (hours, minutes, and seconds). today returns today's date (or any other date) in 'yymmdd' format or in 'yymmddhh' format (date can also be returned in GMT time). yearlen returns the number of days in a given year ============== GRAPHICS FUNCTIONS arrow draw a little arrow center_str_x calculates the x device coordinate to use when printing a string centered on the current window create_symbol creates the vertices of the specified symbol drawbox draws a box whose end coordinates are X(0),Y(0) ;X(1),Y(1) gpxscl scales an array from a range [xmin,xmax] to the byte array [0,omax] hardcopy prints the contents of the screen or of the current IDL graphics window on the printer determined by the device name ('TEK' or 'X') and keywords (only if device name is 'X') or saves them to a file logo prints a logo at the lower left corner of the window or at the position specified by the user makccw Given 3-D positions of polygon vertices, rearranges the order of the vertices so that they all run counterclockwise from the observer's viewpoint. makvertices creates (for data array dat) a list of rectangle polygon vertices suitable, for example, for use with the POLYSHADE procedure mcontour this routine does special contouring the zero line is bold, and less than zero dashed the max and min are also printed out multi_plot Make plots of multiple variables using the same x-axis plclose closes a Tek 4014 plotting file plopen opens a Tek 4014 file for plotting plot_mxmn To plot max and min values on a contour plot. This routine should be called immediately after CONTOUR, using the same data array. plot_symbol plots the specified symbol at coordinates x,y. plotss plots y vs x, using ip as a pen-up/pen-down flag (idlv2 replacement for the idlv1 PLOTS procedure) rectfill fills a rectangle resetp resets all graphics system variables to their defaults showsymb displays symbols possible with symb symb generates a plotting symbol for use with the psym parameter tbox displays an image with a box (w/tickmarks) drawn around it txaxis draws an x axis tyaxis draws a y axis velovect Produce a two dimensional velocity field plot. Draw a directed arrow at each point showing the direction and magnitude of the field. velvec Produce a two dimensional velocity field plot. Draw a directed arrow at each point showing the direction and magnitude of the field. windbarb draws a meterological wind barb ============== COLOR TABLE OPERATIONS cmy_rgb converts an CMY color triplet into RGB form colintrp interpolates a color table to indices evenly spaced in the current device's available color indices. hls_rgb converts an HLS color triplet into RGB form hsv_rgb converts an HSV color triplet into RGB form iqy_rgb converts an NTSC IQY color triplet into RGB form near_std_col finds nearest colors to a standard set of colors rd_coltab_lst reads a list of all available color tables readhsv_hsv reads in a *.hsv format color table and returns the color vectors readtgc_rgb reads a TGC color table and converts to RGB vectors. rgb_bw converts an RGB color image to a black and white (NTSC) image (to be printed on a black and white printer) and returns the black and white image rgb_iqy converts an RGB color triplet into NTSC IQY form stdcolor defines eight standard colors and loads them into the current graphics device ============== X-WINDOWS FUNCTIONS animate Display an animated sequence of images using Xwindows Pixmaps, or the SunView display. Has multiple images per pixmap animatet Display an animated sequence of images using Xwindows Pixmaps, or the SunView display. Has multiple images per pixmap corner_window displays a new window on one of the corners of the screen delwindows deletes all windows get_from_menu Read a user-selected value from a screen menu read_cursor Reads the cursor position on the current IDL window and returns it in x and y (x and y will be set to values in the coordinate system specified by one of the input keywords). If the nowait keyword was not passed, then returns the cursor position immediately after the "cursor" procedure returns. Otherwise, loops until the value of the system variable !err is set to the same value by the "cursor" procedure enough times (this is done to account for problems with using a mouse). dial simulates a dial widget in conjunction with the IDL 'cursor' procedure. A dial is a circle whose circumference represents a portion of the integer number line, with a rotating indicator needle attached. As the cursor is used to move the indicator needle around the dial, it indicates an integer value corresponding to its position on the circle. error_window creates a window, displays the error message saved in parameter error_str, and optionally waits for the user to click on a button before returning hardcopy_box put up a little decision box to make hardcopies of image islider simulates a slider widget in conjuction with the IDL 'cursor' procedure. A slider is a line representing a portion of the integer number line, with a sliding marker attached. As the marker slides up and down the line, it indicates an integer value corresponding to its position on the line. multi_buttons simulates a multi-choice buttons widget in conjuction with the IDL 'cursor' procedure. A multi-choice buttons widget is a collection of buttons representing a finite number of NON-mutually exclusive choices. Pressing one of the buttons makes a choice. numbox create a fake widget box for getting an integer >0 okbox put up a little decision box okbox3 put up a little decision box with 3 buttons options_window allows the user to select one of many mutually exclusive choices radio_buttons simulates a radio-buttons widget in conjuction with the IDL 'cursor' procedure. A radio-buttons widget is a collection of buttons representing a finite number of mutually exclusive choices. Pressing one of the buttons makes a choice. (Think of the pre-set station buttons on a car radio.) scroll_list simulates a scrollable list selector widget (e.g., for filename selection) slider simulates a slider widget in conjuction with the IDL 'cursor' procedure. A slider is a line representing a portion of the real number line, with a sliding marker attached. As the marker slides up and down the line, it indicates a real value corresponding to its position on the line. slider2 Identical to 'slider.pro', except slider interval may be any value thumbwheel simulates a thumbwheel-like widget in conjuction with the IDL 'cursor' procedure. A thumbwheel is a collection of digits which can be independently incremented or decremented by clicking above or below each digit. Together, the digits specify an integer number. x_err_msg prints an error message and waits for a user response ============== MAP FUNCTIONS cursormap reads the current cursor position and transforms the coordinates into a longitude and latitude. This is most useful after putmap, putvec, or drawmap have been called. drawmap draws a map on the screen (over the last tg image viewport) jorppam takes an array of x and y points and does an inverse map projection to obtain latitudes and longitudes latlon_to_xy converts the latitude and longitude to x and y latlonintrp interpolates a 2D array in latitude and longitude to a set of irregularly spaced points (handles longitudinal wraparound correctly) mapproj takes latitudes and longitudes and converts them to map projections putmap makes an image of data using a geographic map projection putvec displays vectors on a geographic world projection scale_lon to scale longitude(s) between -180.0 and 180.0 set_map_proj Sets up data-coordinate definitions to enable overplotting on top of the output of putmap, putvec, or drawmap. vecmapdir transforms a vector direction from lat-lon coordinates to map coordinates vecproj project vectors onto a map projection xy_to_latlon converts x and y to latitude and longitude ============== TG ROUTINES dev_to_tg_x converts an x device coordinate to an x tg coordinate (u-screen) dev_to_tg_y converts an y device coordinate to an y tg coordinate (u-screen) get_img Returns limits for putting an image on the screen and plotting over it image2d interpolates a 2D array to a color image and overplots other data arrays upon it rest_plt Restores current plotting parameters saved by SAVE_PLT save_plt Saves current plotting parameters for later restoration set_img Sets up limits for putting an image on the screen and plotting over it tg To place an image on the screen tg_to_dev_x converts an x tg coordinate (u-screen) to an x dev coordinate tg_to_dev_y converts an y tg coordinate (u-screen) to an y dev coordinate tgbox displays an image with a box (w/tickmarks) drawn around it tgcolbar puts a color bar on the screen tgcoltab reads color table and loads it into current device tgconvert_coord converts from tg universal coordinates to device or normalized units tgeras device-independent graphics screen erasure tgoplot corresponds to OPLOT tgout corresponds to XYOUT; x and y are in u-pixels relative to image corner tgout2 corresponds to XYOUT; x and y are in u-pixels relative to screen corner tgouts corresponds to XYOUTS tgplot corresponds to PLOT or PLOTS if the only params are x and/or y, it's PLOT if extra parameters are given, it's PLOTS tgplots corresponds to PLOTS tgpolyfill corresponds to POLYFILL tgpolyfills corresponds to POLYFILLS tqposit returns a vector, suitable as the argument for the plotting POSITION= keyword, which will set the plotting area to be the image window tqquery returns the type of terminal being used tgsplot corresponds to TKPLOT tgvelovect like VELOVECT Produce a two dimensional velocity field plot. Draw a directed arrow at each point showing the direction and magnitude of the field. tgvelvec like VELVEC Produce a two dimensional velocity field plot. Draw a directed arrow at each point showing the direction and magnitude of the field. This differs from TGVELOVECT in that the arrows are allowed to lie off the plotting area (i.e., the underlying image area) tv0init initializes tg package for Tektronix 4010 graphics tv4init initializes tg package for Tektronix 4014 graphics tvkinit initializes tg package for Tektronix 411X color graphics tvpinit initializes tg package for PostScript output tvr puts a color image on a Tek 411X terminal or Tek 4510A rasterizer using panel rather than pixel commands. tvrinit initializes tg package for Tektronix rasterizer tvsinit initializes tg package for the Workstation screen (X Windows) tvt uses hatching to create a psuedo-image on a Tek 4014 terminal tvtinit initializes tg package for Tektronix 4014 pseudo-imaging graphics tvxinit initializes tg package for Tektronix 4211 (256-)color graphics ============== MISCELLANEOUS STANDALONE PROCEDURES forstrip program to truncate lines from an input file to 72 columns and then strip blanks off the remaining strings. Good for removing sequence numbers from IBM card images. poster This is a procedure to create a pretty viewgraph and use idl fonts for equations and symbols if you wish. ============== MISCELLANEOUS FUNCTIONS getdir retrieves a symbolic directory name and returns it in a form suitable for appending to a filename in an open statement idl to humiliate the user when (s)he forgets (s)he is already in IDL quiet suppress normal compiler success messages qworkst determines whether this is a workstation terminal read_ascii_file Read and convert data from an ASCII file topogrd Returns an array of topography, including the ocean floor. ============== TEKTRONIX TERMINAL CONTROL copyrast issues a copy command to a tek terminal COPY HO:,TO,P0: i.e., copy everything further from the host to Port 0 endcrast issues and EOF to the terminal, to stop rasterizer copy mode erasrast erases all 4107 graphics segments lock lock command for 411x terminals preprast sets up terminal for a visible 4107 terminal/4510 rasterizer plot all plotting following this goes into segment 1 in the 4107, so that the segment may later be copied to a rasterizer. sendrast closes 4107 graphics segment and sends it to Port 0 tekerase clears a Tektronix graphics screen teki convert intergers to tektronic code integer code tekstring goes into graphics mode, prints out string (usually control codes), and returns to text mode tekxy returns tektronix xy coordinate encoding to_text resets a graphics terminal to text mode