Introduction%20to%20IDL - PowerPoint PPT Presentation

About This Presentation
Title:

Introduction%20to%20IDL

Description:

IDL has both numeric and nonnumeric data types. IDL is an array-oriented language ... iMap. iVector. IDL Virtual Machine. Simple, no-cost method of distribution ... – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 17
Provided by: Hong1
Learn more at: https://www.utsa.edu
Category:

less

Transcript and Presenter's Notes

Title: Introduction%20to%20IDL


1
Introduction to IDL
  • Lecture 2

2
ITT solutions for data visualization and image
analysis
  • http//www.ittvis.com/
  • IDL, programming language
  • ENVI, image processing based on IDL

3
IDL
  • Data visualization and image analysis
  • IDL has both numeric and nonnumeric data types
  • IDL is an array-oriented language
  • Build-in functions
  • Command Line and Development Environment

4
(No Transcript)
5
Array-oriented language
  • One dimension array (or vector)
  • array1.0, 2.0, 4.0, 8.0 or array (4)
  • Two dimension array (or matrices, one band
    image)
  • Array1,2,3, 5,7,8 or (Array (3,2))
  • Three dimension array (multiple bands image)
  • Arrayfindgen(500,300,6) or an image of 500
    columns, 300 rows, and 6 bands
  • Any operation on an array is performed on all
    elements of the array, without the need for the
    user to write an explicit loop. The resulting
    code is easier to read and understand, and
    executes more efficiently.
  • For example, you have a landsat image of (500,
    300, 6) (i.e. column, row, bands) and you wish
    to divide each pixel (or element) by 2 or do
    other calculations
  • Imageimage/2
  • Print, total(image) / n_elements(image)
  • Print, mean(image) the same as above

(c, r, b) BSQ (b, c, r) BIP (c,
b, r) BIL
6
(No Transcript)
7
  • Compact syntax without using loops. This makes
    simpler coding and the processing much faster
    than loops
  • npts1000000L
  • datarandomu(0L, npts)
  • sumtotal(data)
  • sum0.0
  • for i0L, (npts-1L) do sumsumdatai

Randomu Return a array of uniformly distributed
random numbers (0,1) of the specified dimensions
Needs 0.11 second
Needs 2.64s
8
Functions for array creation
  • Zeroed array ( arr() )
  • bytarr(), intarr(), uintarr(), ulonarr(),
    ulong64arr(), fltarr(), dblarr(), complexarr(),
    strarr()
  • Index array
  • bindgen() byte index array
  • indgen() integer index array
  • ul64indgen() unsigned integer array
  • ulindgen() unsigned long integer array
  • lindgen() long integer index array
  • l64indgen() 64-bit integer array
  • findgen() Floating-point index array
  • dcindgen() double precision floating-point index
    array
  • cindgen() complex index array
  • dcindgen() complex, double-precision index array
  • sindgen() spring array

9
Array indexing
  • array dimension myarr(),
  • array indexing myarrindex
  • Two dimension can be
  • 1-d linear indexing
  • Arr1456
  • 2-d indexing
  • Arr2,356

Arr indgen(4,4)4 Print, arr 0 4
8 12 16 20 24 28 32 36 40 44
48 52 56 60 Print, arr3,2
44 Print, arr11 44 Print, arr(,2),
arr(2,) ?
10
Array properties-build in functions
  • n_elements(), size(), min(), max(), mean(),
    variance(), stddev(), moment(), total()

11
Other operations for an array
  • Locating values within an array
  • Array reordering
  • reform(), reverse(), rotate(), transpose(),
    shift(), sort(), uniq()
  • Array resizing
  • rebin(), congrid(), interpolate(),

Arr indgen(9)10 Index where(arr gt
35) Print, arrindex ?
12
Other build-in functions and procedures
  • FFT(image, -1), forward fast Fourier transfer
  • FFT(image, 1), inverse FFT
  • ROT(image, angle, scale, /sampling methods)
  • interpolate, bilinear, cubic,
  • map_image
  • read_binary
  • correlate
  • .
  • plot
  • tv, tvscl
  • contour
  • .

13
Command Line and Development Environment
14
iTools
  • Allow you to more quickly and easily open,
    analyze and visualize your data than even before.
  • http//www.ittvis.com/idl/itools_tutorials.asp
  • iPlot (plot)
  • iSurface (surface)
  • iContour (contour)
  • iImage (tv, tvscl)
  • iVolume (volume)
  • iMap
  • iVector

15
IDL Virtual Machine
  • Simple, no-cost method of distribution
  • Run IDL6.0 .sav file programs without license
    requirements
  • Commercial and non-commercial applications

16
IDL/ENVI programming
  • Combine the ENVI/IDL together, extending the ENVI
    interface in IDL in order to implement new
    methods and algorithms of arbitrary
    sophistication is both easy and fun (M. Canty,
    2007)
  • See an example and will give more examples as the
    class moving forward

DEMO!
Write a Comment
User Comments (0)
About PowerShow.com