During my PhD I created several routines for IDL. They form for me a great addition to the already existing Astronomy, Markwardt and Coyote (Fanning) libraries. Some of my routines require some of the routines below or (some of or part of) the aforementioned libraries installed, others are entirely self-contained. Although not tested with GDL (a free IDL compatible incremental compiler), I do not expect any problems there, except those routines that involve graphics and/or interactions. All routines have extensively been tested on IDL Student Edition 6.0.3 on a Fedora Core 4 system.

Please let me know if you use my routines. My email address is . Inclusion in a free (i.e. gratis, non-commercial and/or open-source) library of the routines is permitted as long as you have my written/email permission and leave the descriptive header of the routine intact. Under no circumstance inclusion in a closed-source library is allowed.

RoutineDescription
ANGSTROM (view)Returns the Angstrom symbol
DIFF (view)Returns the difference of the input values
DRAWBOX (view)Plots a box with a set of coordinates
DRAW_LIMITS (view)Draw left-, under-, right-, upper-limits to a point in the form of an arrow
ENLARGE (view)Enlarge an array for the purpose of being displayed with tv, but not to loose the separate pixel information, which is when one uses the IDL REBIN function. Is only useful when a direct tv command is given. Otherwise one should rather use xsize and/or ysize with tv.
FIXIMAGES (view)Remove cosmic rays from a set of images, using the median and then summing them in combining
FORCEFIT (view)Force a fit in either slope or zero-point of a line
FORCEFIT_SIGCLIP (view)Force a fit in either slope or zero-point of a line where the points lying outside a certain sigma are not included in the fit. This occurs iteratively until no points are rejected anymore.
HISTO (view)Wrapper for the IDL HISTOGRAM routine, which has the option of giving back the bins. The bins returned are in the central values of the bin, not the edges. If too many parameters are given and they are conflicting, then the parameters are used in the order of importance, min, binsize, nbins, max
HIST (view)Wrapper for the IDL HISTOGRAM routine, which has the option of giving back the bins. The bins returned are in the central values of the bin, not the edges. If too many parameters are given and they are conflicting, then the parameters are used in the order of importance, min, binsize, nbins, max
INDICES_ARRAY (view)Does the inverse of ARRAY_INDICES
JACKKNIFE (view)Applies the jackknife estimator to a user-defined function and array to which the function is applied.
MAX_VAL (view)Get the maximum value of each row in the input 2D matrix as a value in the return array
MINMAX (view)Returns minimum and maximum value of an array and, if wanted, the corresponding indices
MIN_VAL (view)Get the minimum value of each row in the input 2D matrix as a value in the return array
MKARR (view)Creates an array with constant increments
MKSURFACE ; (view)This function returns an array with values given input-coordinates and a two-dimensional polynomial fit. It allows to have unequal degrees of polynomial functions in the x- and y-direction. In IRAF speak (http://iraf.net) you get an xorder=xdegree+1 and yorder=ydegree+1 with xterms=full (full cross-terms) surface fit.
NL (view)Returns a newline
OPLOTLINE (view)Plot a straight line on a existing plot
RANGE (view)Returns a range encompassing all values of an array and a certain percentage of the difference between the minimum and maximum value of the array, which is ideal for plotting purposes
READFILE (view)An easier way of reading in columned ascii files where the contents of the ascii file can be mixed, i.e. strings, floats, doubles, integers, etc. The results are returned as a struct.
SAVEPLOT (view)Save the results of a routine as a postscript. Uses gv and gawk.
SFIT_XY ; (view)This function determines a two-dimensional polynomial fit to a surface sampled over any kind of grid. It allows to have unequal degrees of polynomial functions in the x- and y-direction, unlike the intrinsic SFIT function that can only do fitting in equal degrees in the x- and y-direction. In IRAF speak (http://iraf.net) you get an xorder=xdegree+1 and yorder=ydegree+1 with xterms=full (full cross-terms) surface fit.
STRREPLACE ; (view)The STRREPLACE procedure replaces the contents of one string with another. The first occurrence of the search substring, Find within the source string, String is replaced by the string, Replacement. Created and written by Han Wen, needed for READFILE
TOSTRING (view)Converts argument into a string according to desired format and trims white space.
UNMATCH (view)Remove the given indices from all indices of a vector with the given length
WIN (view)The replacement for !P.MULTI for handling multi-plot pages. It is based on the solid SuperMongo routine 'window'. Consecutive plots need the /NOERASE. It does *not* handle tick values, axis names, etc. This is left to the user.