Part of the Practical IDL Programming
Web
Acknowledgements
Chapter 1: Introduction
Who Should Read This Book?1.1 About IDL
Why Write This Book?
What About Objects?
Supporting Materials
Typographic Conventions
Special Characters
IDL in Perspective1.2 Running IDL
Obtaining IDL
On-line Help1.3 Chapter Outline
Chapter 2: Fundamentals of IDL Syntax
2.1 Interactive and Compiled Modes
Interactive Mode2.2 Variables
Compiled Mode
Data Types2.3 Introduction to Arrays
Keeping Track of Variable Types
Type Conversions
Converting Floats to Integers
Converting between String and Numeric Types
Variable Names
Creating Arrays2.4 Array Indexing
Array Storage Format
Functions for Creating Arrays
Floating Point Grid Arrays
Array Indexing Examples2.5 Expressions and Arithmetic Operators
Multi-dimensional Array Indexing Examples
One-dimensional Indexing
Index Sampling
Multi-dimensional Index Sampling
Type Conversion in Expressions2.6 Relational and Boolean Operators
Guarding Against Division by an Integer
Operators
Operator Precedence
Arithmetic Operations on Arrays
Operator Precedence and Efficiency of Array Operations
Minimum, Maximum, and Modulo Operators
Array and Matrix Multiplication Operators
Relational Operators2.7 Structures
Boolean Operators
not Operator
and Operator
or Operator
xor Operator
Combining Relational and Boolean Operators
Bit Manipulation
Anonymous Structures2.8 Pointers
Arrays of Structures
Named Structures
Working with Structures
Types of Pointers2.9 Array Properties
Creating Pointers
Freeing Pointers
Checking Pointer Validity
Pointer De-Referencing
Avoiding Pointer Problems
Number of Array Elements2.10 Locating Values Within an Array
Array Size and Type
Minimum and Maximum Values
Mean, Variance, and Standard Deviation
Finding Values Which Meet Selection Criteria2.11 Array Reordering
Working with 1D indices from where
Finding Values Which Don?t Meet Selection Criteria
Changing Array Dimensions2.12 Array Resizing
Reversing Array Elements
Rotating Arrays
Transposing Arrays
Shifting Arrays
Sorting Arrays
Finding Unique Array Values
Resizing by an Integer FactorChapter 3: Writing IDL Programs
Resizing to Arbitrary Size
Resizing to Arbitrary Size with Custom Interpolation
Removing Rows or Columns
3.1 Defining and Compiling Programs
Procedures3.2 Control Statements
Functions
Naming and Editing Source Files
Manual Compilation
Automatic Compilation
Returning to the Main Level after an Error
if Statement3.3 Parameters and Keywords
case Statement
for Statement
while Statement
repeat Statement
return Statement
goto Statement
switch Statement
break Statement
continue Statement
Parameters3.4 Checking Parameters and Keywords
Keywords
Using Parameters and Keywords
Argument Passing Mechanism
Extra Keywords
Extra Keyword Precedence
Extra Keyword Passing Mechanism
Checking Input Parameters3.5 Scripts, Include Files, and Journaling
Don?t Modify Input Parameters
Checking Boolean Keywords
Checking Output Parameters and Keywords
Scripts3.6 Global Variables
Include Files
Journaling
Read-only System Variables3.7 Error Handling
Writable System Variables
User-Defined System Variables
Common Blocks
Intercepting Errors3.8 Efficient Programming
Math Errors
Resetting the IDL Session
Conserving MemoryChapter 4: Input and Output
Using Efficient Methods
4.1 Standard Input and Output
Writing to Standard Output4.2 Working with Files
Reading from Standard Input
Free Format Input
Reading from a String
Writing to a String
Legal and Illegal read Arguments
Opening Files4.4 Reading and Writing Formatted (ASCII) Files
Selecting a File
Obtaining Information about Files
Closing Files
Reading a Formatted File4.5 Reading and Writing Unformatted (Binary) Files
Writing a Formatted File
Reading an Unformatted File (Single Data Type)4.6 Scientific Data Formats
Reading an Unformatted File (Mixed Data Types)
Reading a FORTRAN-77 Unformatted File
Repositioning the File Pointer
Byte Swapping (or Big-endian versus Little-endian)
Writing Binary Data to an Unformatted File
Programs to Write and Read Portable Binary Data
Reading Binary Data via an Associated Variable
Saving and Restoring IDL Variables
Specialized Formats4.7 Reading and Writing netCDF Files
Reading a Variable from a netCDF file4.8 Reading and Writing HDF Files
Reading an Attribute from a netCDF file
Discovering the Contents of a netCDF file
Writing to a netCDF file
Standard Attributes
Coordinate Variables
Reading a Variable from a HDF fileChapter 5: Direct Graphics
Using a Wrapper Procedure to Read a Variable
Reading an Attribute from a HDF file
Discovering the Contents of a HDF file
Writing to a HDF file
Coordinate Variables
5.1 Graphics Devices
Selecting a Graphics Device5.2 Display Modes
Configuring the Graphics Device
8-bit Display Mode5.3 Graphics Windows
24-bit Display Mode
Display Mode Comparison
Obtaining Display Mode Information
Selecting a Display Mode: Windows and MacOS platforms
Selecting a Display Mode: UNIX platforms
Selecting a Display Mode via a Startup File
Creating a Window5.4 Working with Colors
Working with Existing Windows
Invisible Graphics Windows (Pixmaps) and Animation
Scrolling Graphics Windows
Color Modes5.5 Display Mode Troubleshooting
Indexed Color
Working with the Color Table
Color Table Updates in 24-bit mode
Decomposed Color
Chapter 6: Plotting Data
6.1 Plotting Overview
Line Plots6.2 Plot Positioning
Overplotting
Scatter Plots
Polar Plots
Plot Coordinates
Coordinate Conversions
Plotting in Normal and Device Coordinates
System Variables
Specifying a Plot Position6.3 Plot Customization
Computing a Plot Position
Positioning Multiple Plots
General Plot Properties6.4 Plot Colors
General Axis Properties
Configuring Axis Range and Style
Creating Axes
Logarithmic Axes
Tick Marks and Labels
Indexed Colors6.5 Titles, Labels, and Symbols
Decomposed Colors
Titles6.6 Error Bar, Histogram, and Bar Plots
Labels
Mathematical Symbols
Error Bar Plots6.7 Contour Plots
Histogram Plots
Bar Plots
Contour Plotting Overview6.8 Mesh and Shaded Surface Plots
Contouring Irregularly Spaced Data
Filled Contours
Irregularly Spaced Data6.9 Mapping
Shaded Surface Plots
Combined Mesh and Shaded Surface Plots
Creating a Map ProjectionChapter 7: Displaying Images
Configuring a Map Projection
Selecting Map Limits
Continental Outlines
Map Grid Lines
Contour Plots on Map Projections
Displaying Regularly Gridded Images on Map Projections
7.1 Image Fundamentals
PseudoColor Images7.2 Image Display Routines
TrueColor Images
Displaying Unscaled Images: tv7.3 Customizing Image Scaling
Displaying Scaled Images: tvscl
Bottom-up vs. Top-down display
Keywords for tv and tvscl
Image Scaling via bytscl7.4 Sizing the Image to Fit the Display
Color Table Splitting
Displaying Multiple Images with Separate Color Tables
Histogram Clipping
Histogram Equalization
Computing Image Size and Offset Automatically7.5 Displaying TrueColor Images
Displaying TrueColor Images in 24-bit Display Mode7.6 Displaying Images on the PostScript and Printer Devices
Displaying TrueColor Images in 8-bit Display Mode
Displaying PseudoColor Images on the PostScript Device7.7 An Image Display Procedure
Displaying PseudoColor Images on the Printer Device
Displaying TrueColor Images on the PostScript Device
Displaying TrueColor Images on the Printer Device
Chapter 8 Creating Graphical Output
8.1 Bitmap and Vector Output
Bitmap and Vector Formats8.2 Creating Bitmap Output Files
Reading from the Display: tvrd8.3 Creating PostScript Output
Reading from an 8-bit Display
Reading from a 24-bit Display
A Wrapper Function for tvrd
Selecting a Bitmap Output Format
Saving an 8-bit Image to a Bitmap Output File
Saving a 24-bit Image to a Bitmap Output File
A Program for Saving the Screen to a Bitmap Output File
Introduction to the PostScript Device8.4 Creating Printer Output
Configuring the PostScript Device
Setting Size and Offset Manually
Setting Size and Offset Automatically
Color PostScript Output
Using the Color Table in PostScript Mode
Reversed Background and Drawing Colors
Fonts
PostScript Device Fonts
TrueType Fonts
Positioning Graphics in the Drawable Area
Adding an EPS Preview
Selecting a PrinterChapter 9: Graphical User Interfaces (GUIs)
Configuring the Printer Device
Setting Size and Offset Manually
Setting Size and Offset Automatically
Color Printer Output
Fonts and Positioning
9.1 Introduction to GUI Programming
GUI Components (Widgets)9.2 Creating Widgets
GUI Programming vs. Procedural Programming
GUI Design
Widget Basics9.3 Working with Existing Widgets
Widget Attributes
widget_base function
widget_button function
widget_draw function
widget_droplist function
widget_label function
widget_list function
widget_slider function
widget_table function
widget_text function
Widget Layout
Naming Buttons
Compound Widgets
Setting Widget Properties: widget_control9.4 Events and Event Handling
Getting Widget Information: widget_info
Event Structures9.5 A GUI Application
Event Management
Event Handlers and Application State Information
Multiple Instances of an Application
Design ImplicationsAppendix A: IDL on the Internet
Startup Procedure
Event Handler Procedures
Service Procedures
Compiling and Running imgui
Resources by the AuthorAppendix B: Mathematical Routines
RSI Information
IDL Newsgroup
IDL Libraries
IDL Library Searchable Database
IDL People
IDL Applications
Complex NumbersAppendix C: Widget Event Structures
Correlation Analysis
Curve and Surface Fitting
Differentiation and Integration
Eigenvalues and Eigenvectors
Gridding and Interpolation
Hypothesis Testing
Linear Systems
Mathematical Error Assessment
Miscellaneous Math Routines
Multivariate Analysis
Nonlinear Equations
Optimization
Probability
Signal Processing
Sparse Arrays
Special Math Functions
Statistical Fitting
Statistical Tools
Time Series Analysis
Transcendental Functions
Transforms
Base WidgetsAppendix D: Widget Properties
Button Widgets
Draw Widgets
Droplist Widgets
Label Widgets
List Widgets
Slider Widgets
Table Widgets
Text Widgets
Base WidgetsAppendix E: Graphics Device Properties
Button Widgets
Draw Widgets
Droplist Widgets
Label Widgets
List Widgets
Slider Widgets
Table Widgets
Text Widgets