This file describes Samuel Haimov's (haimov@ieee.org) IDLTOOLS library. This library includes generic type of routines useful for wide range of applications. It also includes routines contributed/developed by other people (Ray Sterner, David Fanning and others) used by me or occasioanlly called in some of my routines. Ray Sterner's library (sterner@jhuapl.edu) is kept separately (due to large number of useful routines) and I have named the library JHUAPL. All contributions are highly appreciated. IDLTOOLS library contains idl routines classified below in different categories for your convinience. Each routine in IDLTOOLS has a help text that can be displayed within idl, in most cases (all my routines) by, executing, ,/help or print,(/help). Contributed routines might not have help keyword and the help text can be displayed by using RSI routine doc_library,''. In order to access any of the idl routines from IDLTOOLS you need to add the idltools directory containing them to the idl path. If you use UNIX/LINUX you may use an example for a source file attached at the end of this document to set up idl. This file, called .idl_set, could be sourced from, e.g., .cshrc or .login. Naming convention. Wherever possible the routine names are kept different than the ITT IDL library and built in routines. Nevertheless duplication is possible and difficult to avoid for various reasons. We recommend that the user arrange the search path to all routines in the order that will allow idl to find the desired routines first. For example IDLTOOLS and JHUAPL libraries offer mean.pro. JHUAPL mean is more efficient and IDLTOOLS mean is also more comprehensive than the mean.pro introduced by RSI in idl5.1. By puting the idltools directory before $IDL_DIR/lib and jhuapl directories in the search path you can secure access to IDLTOOLS mean.pro. One can also rename mean.rpo. I have not done that because of the exstensive use in other idltools routines. Following is a list of the available idl routines with short descriptions. The same information is accessable within idl by executing idltools.pro (IDL> idltools). All routines are tested in IDL under UNIX and 8-bit color display. Some of the graphics routines have not been tested with 24-bit video cards and under MS Windows. ___________________________________________________________________________ Readme - this file idltools.pro - displays one-line description of the available idl routines **** idltools general routines: errorfinv.pro - Returns inverse of the error function findequal.pro - Finds multiple occurences of identical array values isample.pro - Image digitizer. Samples the current graphics window num2str.pro - Converts a numerical var/array to a string (array) padstrarr.pro - Return padded with spaces string array that matches the longest string in the array pause.pro - Pauses the program until any key is pressed rebin1.pro - Resizes a vector/array (modified RSI rebin routine) (Starting with idl5.5 this routine is obsolete; the standard idl rebin routine can be used just like rebin1) replicarr.pro - Replicates N-dim. array to (N+1)-dim. array resample.pro - Resize 1-D or 2-D array sec2str.pro - Convert seconds after midnight to a time string of the form: [DDD/]hh:mm:ss[:nnn/ddd] sec2time.pro - Returns time given in seconds as hhmmss.dd after midnight sec2timestr.pro - Returns time after midnight given in seconds as a string/array 'hh:mm:ss' srtm2hll.pro - Extract terrain elevation data (in meters) from SRTM data strarr2str.pro - Concatenates the elements of a string array to a string (this routine is obsolete; use IDL routine strjoin.pro) stradj.pro - Adjust a string or string array to the left, right or center timeaxis.pro - Plot a time axis (slightly modified Ray's JHUAPL version) time2sec.pro - Returns time after midnight or unix seconds given hhmmss.dd in seconds, and (for unix secs) yyyymmdd integer time2timestr.pro - Returns time after midnight given in hhmmss.dd as a string/array 'hh:mm:ss' timestr2sec.pro - Returns time given in 'hh:mm:ss[.dd]' as seconds after midnight. undefine.pro - Delete or undelete an IDL variable within an idl routine (more powerful version of RSI delvar command line function) unixtime2us.pro - Returns unix seconds,us,(double) given standar unix date/time string. The reverse of this procedure is systime(0,us,/utc) ) UNIX seconds are defined here as seconds from Jan 1 1970 00:00:00 UTC us2unixtime.pro - Returns unix date/time string given unix seconds in UTC This identical to the upgraded RSI function systime(0,us,/utc) and is preserved for compatibility xmessage.pro - Widget based message display (similar to RSI dialog_message) **** idltools graphics routines: cleanplot.pro - Reset system variables !P,!X,!Y,!Z colintrp.pro - Linearly interpolates colors given in rgb colorwyo51.tbl - Extended version colors1.tbl with 10 additional color tables createct.pro - Create color table datestamp.pro - Print date/time stamp on the top-left corner of a page fcolors.pro - Finds the number of discrete colors in a color table and the starting color table index for every color grid.pro - Adds grid to the current active plot loadct1.pro - Modified version of RSI loadct routine modifywyo_32.pro - Creates a 3-color table with black/white back/foreground resetps2x.pro - Closes the graphics device and reset it to x device setps.pro - Set postscript device setxpswin.pro - Set X- or PS- device (many options available) wyoctind.pro - Returns starting black color index for dual color tables separated by a black color strip, e.g. WYO12(ct=45), WYO23(ct=46) xcolors.pro - change color tables in a manner similar to XLOADCT It provides additional features and lists the color table number xcolort.pro - Changes a color table for given color indices xcreatect.pro - Creates a color table for given color indices **** idltools image processing routines: aximage.pro - Plot one or more images and draw axes and colorbar to X/PS-device edge.pro - For a given binary image returns its boundaries rawimage.pro - Plots 2-D array displayed with its bigger size mapped on x axis showprof.pro - Interactively draw row or column profiles of an image zoom.pro - Display part of an image (or graphics) from the current window enlarged in another window **** idltools netcdf routines: ncdf_attload.pro - Returns string/string array of attribute value(s) ncdf_addnew.pro - Add new dimension(s), variable or attribute(s) in an existing netCDF file ncdf_dimnames.pro - Return string array with all the dimension names in a netCDF file. It can also return the dimension sizes. ncdf_fcopy.pro - Copy vars from a source netCDF file to a new netCDF file ncdf_rename.pro - Rename existing dimension(s), variable(s) or attribute(s) in a netCDF file ncdf_update.pro - Update existing variable(s) or attribute(s) in a netCDF file ncdf_vardef1.pro - Add a new variable to an open netCDF file in define mode ncdf_varinq1.pro - Returns a structure with information about netCDF variable ncdf_varload.pro - Returns a hyperslab of values from a netCDF variable ncdf_varnames.pro - Returns a string array with all var names in a netCDF file **** idltools printer routines: printidlps.pro - Prints idl.ps file and rename/remove the file (UNIX) printps.pro - Prints PS file(s) (UNIX) **** idltools signal processing routines: autocorr.pro - Returns normalized autocorrelation or autocovariance bartlett.pro - Returns n-point Bartlett data window bartlett2.pro - Returns 2-D Bartlett data window blackman.pro - Returns n-point Blackman data window blackman2.pro - Returns 2-D Blackman data window crosscorr.pro - Returns normalized cross-correlation or cross-covariance detrend.pro - Removes linear trend from a 1-D or 2-D array hamming.pro - Returns n-point Hamming data window hamming2.pro - Returns 2-D Hamming data window hann.pro - Returns n-point Hanning data window hann2.pro - Returns 2-D Hanning data window linaverage.pro - Averages dependent variable y and independent variable x in nlint equally (linearly) spaced bins of x logaverage.pro - Averages dependent variable y and independent variable x in nlint equally,log10 scale, spaced bins of x specfft.pro - Estimates 1-D power spectra (psd) specfft2.pro - Estimates 2-D power spectra (psd) specplot.pro - Plots the results from specfft spectrogram.pro - Estimates fft spectrogram (PSD as a function of freq and time) **** idltools statistics routines: kurt.pro - Returns the kurtosis of an array mean.pro - Returns mean value for a random variable pdfmom.pro - Computes the first 5 moments of a given distribution skew.pro - Returns the skewness of an array std.pro - Returns unbiased standard deviation/variance for a random variable ___________________________________________________________________________ #-------------------------------------------------------------------------- # # .idl_set = defines environmental variables used by IDL. # S. Haimov, February 2007 # # This files sets up the environmental variables needed to run IDL. # Copy this file to your home directory and add to your .cshrc file # or to .login (the latter works better for me): source $HOME/.idl_set # #--------------------------------------------------------------------------- # setenv IDL_DIR /usr/local/itt/idl # this is default idl directory for Linux # setenv IDL_DEVICE X # this is the default device for Linux #------- Point to your own startup file --------------------------------- # IDL executes any IDL statements from this file when IDL is called. #--------------------------------------------------------------------------- setenv IDL_STARTUP $HOME/.idl_startup #------- Pointers to IDLTOOLS and JHUAPL IDL libraries --------- setenv IDL_IDLTOOLS $HOME/idl/idltools setenv IDL_JHUAPL $HOME/idl/jhuapl #------- Set up Initial IDL search path ---------------------------------- # This is a list of directories separated by colons (:). # To add all subdirectories containing *.pro files under a given # directory put a + at the front. Note that while IDL preserves the order # of the path list when searching for routines it does not provide a # deterministic search order within the subdirectories specified with + #--------------------------------------------------------------------------- # Set IDL path with added idltools and jhuapl libraries setenv IDL_PATH +$IDL_IDLTOOLS:+$IDL_JHUAPL:$IDL_PATH #-------------------------------------------------------------------------- DISCLAIMER: The above described routines may be used, copied, or redistributed as long as they are not sold and the copyright notice (included in the routine) is reproduced on each copy made. If results using these routines are published appropriate acknowledgment is expected. The software routines are provided as is and without any expressed or implied warranties whatsoever. All warranties including, but not limited to, performance, merchantability or fitness for a particular purpose are hereby disclaimed. You assume the entire risk and liability of using the software to include use in compliance with any third party rights. You are advised to test the software thoroughly before relying on it. In no event shall Samuel Haimov or UWyo/DAS be held responsible for any direct, indirect, consequential or inconsequential damages or lost profits arising out of the use or inability to use the software.