Jan 19 2008
IDL Procedures to do Simple but Hard to Figure out Things
Until I get around to making a dedicated section on this site for IDL-related stuff, I have to post this here. Most, if not all, of you will not care about this at all. I’d suggest simply ignoring it.
Apply_hanning.pro
A function that takes a time series and applies a Hanning filter to it. You can actually do this in IDL in one line, but this adds a few checks for errors. It can handle 1D and 2D arrays.
Contour_on_map.pro
A procedure that will take a 2D array of values, with corresponding 1D arrays of latitudes and longitudes and then plot it on a map. This may sound simple, and it is, but it’s trickier than it sounds because IDLs documentation is not so good.
Cumulative_correlation.pro
A procedure that will plot the cumulative correlation of two time series. This makes it easier to see over what temporal, or spatial, frequencies the time series correlate than, for instance, a power spectrum from a Fourier transform.
Interpolate_bad_points
Exactly as it sounds. It finds the “bad” points in a time series and does a linear interpolation to fill them in.
Plot2axis.pro
Plot two time series on the same plot, but with different vertical axis. Allows lots of customization using keywords. Important note: This procedure will not work as currently written unless you have a function called numtostring() which takes a number (integer, float, or double), and converts it into a string variable. This is a function I wrote that I have not released yet. If you wish to use this procedure, just replace all occurrences of “numtostring(” with string(”; without the quotes.
Silence_math_errors.pro
Again, exactly as it sounds. Will make it so IDL doesn’t display those silly math error, like the floating underflow. Note: there really isn’t a good reason to use this; the displaying of the errors doesn’t hurt anything, and it’s better to actually fix the error than just ignore it.
