The following IDL procedures and functions are utilities that I have developed over time and find useful in conducting my research on a daily basis. I am the author of these source codes. I have placed these source codes in the public domain. You can use, modify, and distribute these source codes and executable programs based on these source codes.
Color Science | |
| SRGB2XYZ | This function converts a provided sRGB color triplet to tristimulus values. The sRGB values are assumed to be in the range [0,1]. A non-linearity adjustment for the monitor response is applied to the provided color data. |
| XYZ2LAB | This function returns the converted CIE L*a*b* values for a provided tristimulus value assuming a particular illuminant |
| XYZ2SRGB | This function converts a provided set of tristimulus values to sRGB. The tristimulus values are assumed to be in the range [0,1] and computed with illuminant D65. A non-linearity adjustment for the monitor response is applied (gamma = 2.2). |
General | |
| ANGLE_BETWEEN_TWO_VECTORS | This function will compute the angle between two provided vectors (or arrays of vectors) in n-space. |
| ARRAYS_ARE_SAME_SIZE | This function will check if two provide arrays are the same size. This routine only checks the dimensions (no other characteristics are considered). |
| DOT_PRODUCT | This function will compute the dot product between two provided vectors (or arrays or vectors) in n-space. |
| MAGNITUDE | This function will compute the magnitude (length) of the provided n-dimensional vector. |
| NORMALIZE | This function will normalize or compute the unit vector equivalent for the provided vector. |
| REPLICATE_VECTOR | This function will replicate a provided vector as either the rows or columns of a 2-dimensional array. This provides a utility similar to the REPLICATE functions provided in IDL for scalar values. |
| TAG_EXISTS | This function will search a structure for the existence of a specified tag. |
Graphics | |
| FACET_VERTICES_TO_PLANE_COEFFICIENTS | This function will compute the coefficients of a plane equation of the form Ax + By + Cz + D = 0 from a set of triangilar facet vertices. The surface normal can also be computed if desired. |
| PLOT_ENHANCED | This procedure serves as a wrapper around the IDL PLOT procedure that adds the ability to produce encapsulated Postscript versions of the plots using the original IDL plot format or with the popular GNUPLOT package which is available for most platorms (this package must be installed separately and available in your path before this capability will be functional). |
| POINT_INSIDE_TRIANGULAR_FACET | This function determines whether a provided point (or set of points) falls within the boundaries of a triangular facet. This function uses the technique based upon the barycentric coordinate test described at http://www.devmaster.net/wiki/Ray-triangle_intersection. |
| RAY_INTERSECTS_FACET | This function determines whether a given ray (or set of rays) intersect a provided triangular facet in 3-space. |
Image Processing | |
| READ_ENVI_HEADER | This function serves to read an ENVI header directly into an IDL program. |
| READ_ENVI_IMAGE | This function serves to read an ENVI image/header directly into an IDL program without the need to first open that image in ENVI and use the ENVI_* routines to do so. |
Radiometry | |
| BB_RADIANCE | This function will return either the spectral radiance(s) at a specific wavelength or at a discrete set of wavelengths provided in an array or it will return the spectrally integrated radiance across a bandpass specified by the wavelength limits for a provided absolute temperature. |
| BB_TEMPERATURE | This function will return the blackbody temperature corresponding to either the provided spectral radiance or the spectrally-integrated radiance at the specified wavelength or within the specified bandpass. |
Statistics | |
| GENERATED_CORRELATED_DATA | This function will return a list of k normally-distributed, correlated, n-dimensional random points [with a specified mean vector and set of univariate standard deviations]. |