IDL, short for Interactive Data Language, is a programming language used for data analysis. It is popular in particular areas of science, such as astronomy, atmospheric physics and medical imaging. IDL shares a common syntax with PV-Wave and originated from the same codebase, though the languages have subsequently diverged in detail. There are also free or costless implementations, such as GNU Data Language (GDL) and Fawlty Language (FL).
Overview
IDL is vectorized, numerical, and interactive, and is commonly used for interactive processing of large amounts of data (including image processing). The syntax includes many constructs from Fortran and some from C.
IDL originated from early VMS Fortran, and its syntax still shows its heritage:
<syntaxhighlight lang="idl">
x = findgen(100)/10
y = sin(x)/x
plot,x,y
</syntaxhighlight>
The function in the above example returns a one-dimensional array of floating point numbers, with values equal to a series of integers starting at 0.
Note that the operation in the second line applies in a vectorized manner to the whole 100-element array created in the first line, analogous to the way general-purpose array programming languages (such as APL, J or K) would do it. This example contains a division by zero; IDL will report an arithmetic overflow, and store a NaN value in the corresponding element of the array (the first one), but the other array elements will be finite. The NaN is excluded from the visualization generated by the command.
As with most other array programming languages, IDL is very fast at doing vector operations (sometimes as fast as a well-coded custom loop in Fortran or C) but quite slow if elements need processing individually. Hence part of the art of using IDL (or any other array programming language, for that matter) for numerically heavy computations is to make use of the built-in vector operations.
History
The predecessor versions of IDL were developed in the 1970s at the Laboratory for Atmospheric and Space Physics (LASP) at the University of Colorado at Boulder. At LASP, David Stern was involved in efforts to allow scientists to test hypotheses without employing programmers to write or modify individual applications. The first program in the evolutionary chain to IDL that Stern developed was named Rufus; it was a simple vector-oriented calculator that ran on the PDP-12. It accepted two-letter codes that specified an arithmetic operation, the input registers to serve as operands, and the destination register. A version of Rufus developed on the PDP-8 was the Mars Mariner Spectrum Editor (MMED). MMED was used by LASP scientists to interpret data from Mariner 7 and Mariner 9. Later, Stern wrote a program named SOL, which also ran on the PDP-8. Unlike its predecessors, it was a true programming language with a FORTRAN-like syntax. SOL was an array-oriented language with some primitive graphics capabilities.
Stern left LASP to found Research Systems Inc. (RSI) in 1977. The first RSI product was IDL for the PDP-11.
Arrays are passed by reference, and this mechanism is an advertised feature of the language to pass data back out of a subroutine – in contrast, array slices are copied before being passed, so that data modifications do not flow back into array ranges (after the subroutine exits), violating the principle of least surprise.
Many historical irregularities survive from the early heritage of the language, requiring individual workarounds by the programmer. As an example:
- Array indexing and subroutine entry can both be carried out with exactly the same syntax (parentheses); this ambiguity, coupled with the single namespace for all variables and subroutines, can cause code to stop working when newly defined subroutines or language extensions conflict with local variable names. IDL programmers can avoid many of these problems by using square brackets for array indexing, thereby avoiding conflicts with function names which use parentheses.
The preceding issue can be alleviated using this compiler option:
COMPILE_OPT STRICTARR
ITT Visual Information Solutions (ITT VIS), the developers of IDL, have taken explicit steps to prevent bytecode compatibility with other environments. Files containing compiled routines use a binary tagged-data-structure format that has not been officially published but has been investigated and documented by users but also contain the following notice as ASCII text embedded within each saved file:
<blockquote> IDL Save/Restore files embody unpublished proprietary information about the IDL program. Reverse engineering of this file is therefore forbidden under the terms of the IDL End User License Agreement (IDL EULA). All IDL users are required to read and agree to the terms of the IDL EULA at the time that they install IDL. Software that reads or writes files in the IDL Save/Restore format must have a license from NV5 Geospatial Solutions, Inc. explicitly granting the right to do so. In this case, the license will be included with the software for your inspection. Please report software that does not have such a license to your account manager or sales representative.</blockquote>
, the statement has not been tested in a court of law.
Also, that provision of the IDL EULA has no effect in Australia, as a result of sections 47D and 47H of that country's Copyright Act.
Examples
The following graphics were created with IDL (source code included):
- Image of random data plus trend, with best-fit line and different smoothings
- Plots of delta-o-18 against age and depth (from EPICA and Vostok)
- coyote IDL gallery examples of IDL imaging
See also
- List of numerical-analysis software
- ENVI – an image processing software package built in IDL
- IRAF – a free, graphical data reduction environment produced by NOAO
- MATLAB – a technical computing environment providing similar capabilities to IDL
- NumPy – an extension for Python that gives it array math capabilities similar to those of IDL
- Perl Data Language (PDL) – An extension to Perl that gives it array math capabilities similar to those of IDL
- Scilab - a high-level, numerically oriented programming language designed for Scientific computing and interfaces
- Solarsoft – library for solar data analysis and spacecraft operation activities written predominately in IDL
- GDL – GNU Data Language, a free implementation similar to IDL.
- Fawlty Language – Fawlty Language is an IDL8 (Interactive Data Language) compatible compiler.
References
External links
- IDL home page
- Coyote's Guide to IDL Programming
- The IDL Astronomy User's Library at NASA Goddard
- Fawlty Language home page
