What's New in the Jan 1996 JHU/APL/S1R IDL library update --------------------------------------------------------- Besides the usual minor upgrades and small bug fixes are the following. HSET, HGET are two new routines to save and get values from handles. These routines give a slightly different, in some cases more convenient, user interface for using handles. In particular, HGET is a function so handle values may be used directly in expressions. A number of widget routines that had label problems under IDL 4.0.1 have been fixed by adding the /DYNAMIC_RESIZE keyword to the widget_label call. GIFADD will add color GIF images by R,G,B component. Used with masking that makes complimentary areas of two images black, GIFADD may be used to combine the images. PRWINDOW, which sends a screen window to a printer (like a color postscript printer), has been modified to optionally allow the window to be split across 2 or 4 printer pages. Multipage printouts are useful for making mosaics. XVIEW, the general image viewer, now allows multipage printouts. Also now supports Sun Raster File images. A number of other minor upgrades have also been done. XOPTION, a widget based menu routine, now allows suboptions. This was added to support the multipage printouts. Try the print button in xview to see one example. LINCAL is a new routine that creates linear calendars down the page. A number of months may be printed on a single page. This is very useful for items that must be checked off every day or so. For example, the months from November through May may be printed on a page and used to check off how many buckets of coal are used in a coal stove each day. Boxes for totals are included along the bottom of the page. SWINDOW, a scrolling window routine, has had the option /noextend removed. (This option extended the window by 32 pixels by default). SET_SCALE has had its /LIST option greatly upgraded. set_scale is used after put_scale has embedded the IDL window and scaling info into a screen window image. This is very useful and if not familiar with these routines take a look. Any time a plot command is used to create a figure on the screen that is to be saved as an image, a call to put_scale will allow all the needed scaling info to be restored at any later time. Then more data could be plotted on the same plot, or coordinates read off using a cursor. Anyway, the /LIST option of set_scale displays this info in a number of new and useful ways. XVIEW automatically sets the scaling from the embedded info if it is available. To demonstrate the usefulness of this technique take a look at one of my state maps at http://fermi.jhuapl.edu/states/states.html. Download a shaded relief map and then load it into IDL. After displaying it in a screen window do set_scale (or if loaded using a recent copy of xview skip the set_scale). Now new data may be plotted on the map, or positions read using a cursor. CBAR, which makes a color bar in the screen window, now restores the scaling as found on entry. It used to destroy it. LS, which scales an image based on its histogram, now allows an optional array to be given on which to do the scaling. IMGSCALE is a new, interactive routine to do contrast stretching on an image. Intended mostly for black and white images. Allows both brightness and contrast adjust just by dragging the mouse. Optionally flags byte underflow and overflow with green and red colors. PLURAL is a new routine to help avoid cases such as the following. Suppose a message is printed something like: "Processing 3 images". It is not uncommon to see something like "Processing 1 images". By default, plural when given a number returns '' for 1 and 's' for anything else. Also the correct singular and plural forms may be given: single='ox', pural='oxen'. SUNPOS is a new routine to compute the sun's azimuth and altitude for a given time and set of longitudes and latitudes. This routine opens up numerous fun and useful ideas. I tried to make it easy to use. It understands time as either date/time, or in Julian Seconds. For example, time may be given using the systime() function. Ex: sunpos,systime(),-75,40,az,al & help,az,al AZ DOUBLE = 131.11476 ; Azimuth (degrees eastward from north). AL DOUBLE = 11.818654 ; Altitude (degrees above the horizon). CROSSI, the cross-hair cursor routine, now allows dotted cross-hairs for use when the best color is not known ahead of time. Also now allows pixel values to be displayed as R,G,B. Also may list coordinates with y=0 at top of window using the new /order keyword. XCURSOR, another cursor routine, fixed to return the cursor position. WEBSHADOW is a new routine to spice up your World Wide Web pages by adding shadows to your inline images. To see an example take a look at http://fermi.jhuapl.edu/sar/theme_06.html WEBTILE is a new routine to help make a background image that can be used as a web page background image. It works much like plots but makes plotted values spatially periodic. Random periodic images may be generated using the function makez with the /periodic keyword. COMMALIST is a new routine to routine a given numeric array as comma delimited list useful for display. Ex: print,commalist(indgen(10)) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 DETAB is a new function to replace tab characters in a given text string with the correct number of spaces. BOXAREA is a new routine to select a rectangular area of the screen. Press a button to fix a corner and drag box open. SEEDFILL and SEEDFILLR, region filling routines, have been greatly speeded up by using the IDL built-in routine label_region. These routines fill a region of constant color value or out to a specified set of boundary values. Both start from a specified seed point. FILLJUMPS is a new routine to help fill in large jumps in data values. This routine returns the indices needed by the IDL interpolate routine. For example, suppose x and y define some curve but y has large jumps. This routine could be applied to limit the max jump in y to some value. A set of indices sutiable for use in the IDL built-in routine interpolate is returned. Then both x and y may be interpolated to avoid large jumps in the curve. EVENT_LOG, useful for logging processing steps, has had a number of useful upgrades. DT_TM_MAK, a routine for creating a date/time string from Julian Day number and seconds after midnight, now allows monthday numbers to have leading 0s, like Jul 06. GET_COUNT is a new routine to return a count given some text string. Counts are remembered across IDL sessions. For example, print,get_count('cat') gives 1 the first time, 2 the second time, and so on. Counts are stored in a local or a specified file. Useful for creating a series of files as one example. UPCASE1 is a new routine that just forces the first character of a given text string to upper case. One example use is: print, upcase1(getenv('USER')) DATA_BLOCK is a new routine to read a block of inline data. Reads data from the routine lines following the data_block call. This is somewhat like a FORTRAN data statement except that it is done everytime the routine with the data_block call is called. Should be useful for initializing tables. See built-in help for details on capabilities and restrictions. An example call: data_block, t ; 1, 2, 3 ; Line 1. ; 11,22,33 ; Line 2. ; eod SHOWPATH is a new routine to show the path of the routine that calls it. WHOAMI is a new routine that returns the directory and filename of the routine that calls it. This is very useful if the calling routine would like to access auxiliary files in the same directory as itself. This was previously done by forcing the user to define a system variable to point to the desired directory. The whoami routine can make the use of auxiliary files transparent. It can also be useful for a routine to know its own name without having to hardcode it in. This will allow more portable code where the routine name must be known such as for error messages. WHOCALLEDME is a new routine to allow a routine to determine what routine called it. Uses help,calls=c and breaks information into a more useful format. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -