Previous iTool User's Guide: Working with Contours Next

Displaying Contours

The iContour tool's primary purpose is to display contours, though the tool is capable of much more once the data is displayed. The iContour tool can display regular-grid data or irregular-grid data. Gridding is the creation of uniformly-spaced planar data from data points. These points may initially be irregular.

Displaying Regular-grid Data

Regular-grid data points are presented by two-dimensional arrays. The following example shows one way of importing and displaying this type of data into the iContour tool. The 248-by-248 two-dimensional array contained within the convec.dat binary file in the examples/data directory is imported into IDL with the READ_BINARY function. The iContour tool then displays this data as contours.

At the IDL Command Line, enter:

file = FILEPATH('convec.dat', SUBDIRECTORY = ['examples', 'data'])  
data = READ_BINARY(file, DATA_DIMS = [248, 248])  
iContour, data  

 

Figure 12-1: Earth Convection Contours in the iContour Tool

Figure 12-1: Earth Convection Contours in the iContour Tool

 


Note
The examples/data directory of your IDL 6.3 distribution contains a text file named index.txt. This file lists all data files available in the example directory and also lists their dimensions and values.

Displaying Irregular-grid Data

Irregular-grid data points are presented by three one-dimensional vectors, usually known as fields. The following example shows one way of importing and displaying this type of data into the iContour tool. The three fields contained within the irreg_grid1.txt ASCII file in the examples/data directory is imported into IDL with the File  Open option in the iContour tool. This option uses the ASCII Template wizard to import the data, which is then gridded into contour data with the Gridding Wizard. The iContour tool then displays this data as contours.

  1. At the IDL Command Line, enter:
  2. ICONTOUR  
    

     

  3. Select File  Open from the pulldown menus of the empty iContour tool. The Open dialog will appear.
  4.  

  5. Use the Open dialog to find and select the irreg_grid1.txt file in the example/data directory. The ASCII Template wizard will appear.
  6.  

    The irreg_grid1 file contains three columns of data points. These columns represent the x-locations, y-locations, and the elevation (respectively) of this data. These columns are specified as three fields (vectors) of data with the ASCII Template wizard.

     

  7. Click Next on the first and second step of the wizard, then click Finish on the third (last) step of the wizard. The IDL iTools Create Visualization dialog will appear.
  8.  

    Figure 12-2: The iTools Create Visualization Dialog

    Figure 12-2: The iTools Create Visualization Dialog

     

    The IDL iTools Create Visualization dialog contains the following choices:

    • Launch the gridding wizard
    •  

    • Select a visualization and specify parameters
    •  

    • Do not create a visualization

     

  9. Select the Launch the gridding wizard radio button, then click OK. The IDL Gridding Wizard Step 1 of 3 dialog will appear.
  10.  

    Figure 12-3: The IDL Gridding Wizard Step 1 of 3

    Figure 12-3: The IDL Gridding Wizard Step 1 of 3

     

    The Gridding Wizard allows you to specify the method of gridding while showing you the possible results for that method. The IDL Gridding Wizard Step 1 of 3 dialog contains the following items:

    • Number of points entered
    •  

    • X Coordinates X coordinate range
    •  

    • Y Coordinates Y coordinate range
    •  

    • Data values — Data values are shown here
    •  

    • Spherical data checkbox — Check to make data spherical
    •  

    • Coordinate diagram — Shows coordinates of grid data
    •  

    • Show points checkbox — Select to show all points (default is checked)
    •  

    • Help — Obtain help on this dialog
    •  

    • Back — Return to previous step
    •  

    • Next — Proceed to Step 2 of 3
    •  

    • Cancel — Dismiss the Gridding Wizard

     

  11. In the Gridding Wizard Step 1, click Next to accept the interpolation of data values and locations. The IDL Gridding Wizard Step 2 of 3 dialog will appear.
  12.  

    Figure 12-4: The IDL Gridding Wizard Step 2 of 3

    Figure 12-4: The IDL Gridding Wizard Step 2 of 3

     

    The IDL Gridding Wizard Step 2 of 3 dialog contains the following items:

    • X Coordinates — modify dimension, start or end
    •  

    • Y Coordinates — modify dimension, start or end
    •  

    • Coordinate diagram — Shows coordinates of grid data
    •  

    • Show points checkbox — Select to show all points (default is checked)
    •  

    • Help — Obtain help on this dialog
    •  

    • Back — Return to previous step
    •  

    • Next — Proceed to Step 3 of 3
    •  

    • Cancel — Dismiss the Gridding Wizard

     

  13. At Step 2, click Next to accept the dimensions, start and spacing. The IDL Gridding Wizard Step 3 of 3 dialog will appear.
  14.  

    Figure 12-5: The IDL Gridding Wizard Step 3 of 3

    Figure 12-5: The IDL Gridding Wizard Step 3 of 3

     

    The IDL Gridding Wizard Step 3 of 3 dialog contains the following items:

    • Choose gridding method — Choose from pull-down list of methods
    •  

    • Preview — Click to preview selected method and data
    •  

    • Auto preview — Checkbox to turn auto preview on (default = off)
    •  

    • Statistics tab — Shows data statistics
    •  

    • Options tab — Set options for missing values, smoothing, weighting, and between axes
    •  

    • Search tab — Set options for using search ellipse
    •  

    • Coordinate diagram — Shows coordinates of grid data
    •  

    • Show points checkbox — Select to show all points (default = checked)
    •  

    • Help — Obtain help on this dialog
    •  

    • Back — Return to previous step
    •  

    • Finish — Dismiss the Gridding Wizard with data gridded
    •  

    • Cancel — Dismiss the Gridding Wizard

     

  15. At Step 3, select Inverse Distance as the gridding method and click Finish to display the surface.
  16.  

  17. The resulting contours are displayed in the iContour tool.
  18.  

    Figure 12-6: Irregular-grid Elevation Contours in the iContour Tool

    Figure 12-6: Irregular-grid Elevation Contours in the iContour Tool

  IDL Online Help (March 01, 2006)