IDL is used extensively by the HDF and HDF-EOS community for scientific visualization, data analysis, and application development. This presentation will provide an update on the development for IDL featuring the IDL 8.0 release.
1. September 30, 2010
HDF & HDF-EOS Workshop XIV
IDL 8.0 & Update on IDL
Development for HDF
Beau Legeer – Director Product Management (ITT-VIS)
The information contained in this document pertains to software products and
services that are subject to the controls of the Export Administration Regulations
(EAR). The recipient is responsible for ensuring compliance to all applicable U.S.
Export Control laws and regulations.
2. IDL 8.0 Goals
• Fine tuned the IDL application so it is “simple-to-drive”
• With emphasis on the ad-hoc scientist user
• Major IDL language enhancements that are intuitive
• New control features, core data types and modern scripting syntax
• Powerful graphics that are modern and easy-to-use
• The best of direct graphics, object graphics and iTools
• Redesigned the Help to make it easier to learn IDL
• Focus on tasks and “how to”
• Backward compatibility for existing code
Visual Information Solutions
9. New Graphics
A Clean UI With Powerful Graphics
• Native look & feel to the graphics window
• Intuitive toolbar with interactive controls for the graphics
• Programmatic control that is easy to understand for the
direct graphics user
• Cylindrical Equal Area map projection
& other map improvements
• New symbols for object graphics
• PDF output from new graphics
& object graphics
Visual Information Solutions
10. Language Features
Features of Modern Languages
!NULL
• Simplifies a complex, confusing operation. Other uses:
• Comparison with undefined variables or null objects/pointers
• Structure concatenation
• Assign to variables or function results to free memory
A = [ ]
; or !NULL or { }
For i=0, 100 do begin
A = [A, getData()]
Endfor
Garbage Collection
• Automatic object/pointer deletion means user no longer needs to
keep track of objects/pointers
Visual Information Solutions
11. Language – List & Hash
Methods to manage IDL variables of different types together
• Arrays demand same types for each element
List
• Combine any IDL type together in a single data type
L1 = LIST(‘spectrum', 5, 2, [1,2,3], LIST(1,2))
L1[0] = ‘Hello’
myVar = L1[0]
Hash (Dictionary)
• Combine any IDL type together. Elements referenced via a key
H1 = HASH(‘dog', 100, ‘pig’, 200, ‘data’, findgen(100))
myVar = H1[“dog”]
H1[“mykey”] = ‘Hello’
Visual Information Solutions
12. Other Language Features
Control Statement
• Addition of a “For Each” operator
FOREACH element, variable do begin
print, element
ENDFOREACH
New Behavior
• Negative Array Indices – “Wrap-around” the end of an array
A[ 0 : -1 ] ; goes from the first element (0) to the last element (N-1)
A[ -3 : 0 : -1 ] ; goes from element N-3 down to element 0
Visual Information Solutions
13. Language – Operator Overloading
Advanced Feature
Perform a specific object method when an operator is performed on that object
Example: Combining the values of two “length objects” to return a new value
Current Syntax:
length = a->GetLength() + b->GetLength()
c = obj_new(‘idl_length’, length) ;; make new object
With Operator Overloading:
Operator overloading allows you to hide this operation. Resulting in a normal statement:
c = a + b
The operation is placed in a method that is called when the “+” operator is used on the object:
FUNCTION idl_length::_overloadPlus, lenA, lenB
length = a->GetLength() + b->GetLength()
return, obj_new(‘idl_length’, length) ; make new object
END
Visual Information Solutions
14. What’s Overloadable
EQ NE GE GT LE LT
+ – * /
[ ] left [ ] right
NOT AND OR XOR
~ ^ mod
<
>
#
##
&& ||
Help, Print
SIZE, N_ELEMENTS
FOREACH
“.” is Get/SetProperty
Just inherit from IDL_Object
Visual Information Solutions
15. Language – Objects Before & After 8.0
A Simple Object Interaction Layer
IDL 7.0
IDL 8.0
Create & Destroy
Create
myObject = OBJ_NEW(‘MyClass’)
myObject = MyClass( )
OBJ_DESTROY, myObject
myObject.Cleanup
Properties:
Properties:
myObject->SetProperty,color=[255,0,0]
myObject->GetProperty, color=myColor
Calling Methods:
myObject->MyMethod, a, b, c
Key Points
• Strange syntax, difficult to learn
Visual Information Solutions
myObject.color = ‘red’
myColor = myObject.color
Calling Methods:
myObject.MyMethod, a, b, c
Key Points
• Standard, intuitive syntax
16. IDL 8.0 Summary
• Fine tuned the IDL application so it is “simple-to-drive”
• Major IDL language enhancements that are intuitive
• Powerful graphics that are modern and easy-to-use
• Redesigned the Help to make it easier to learn IDL
• Backward compatibility for existing code
Visual Information Solutions
18. HDF, netCDF & CDF Support in IDL 8.0
• HDF5 1.8.4
• netCDF 4.1
• CDF 3.3
• HDF-EOS 2.8
• Is the market for HDF-EOS5 growing?
• HDF 4.2r3
Are there more recent significant fixes?
Visual Information Solutions
19. HDF, HDF5, HDF-EOS future in IDL
• Continue to update library versions
• Incorporation of HDF-EOS5 based on demand
• Visual data browsing for all IDL Scientific Data Formats
• Implement a Common Data Model
• Integration directly with IDL Workbench and Language
• Incorporation of IDL 8.0 language enhancements to Scientific
Data Formats
• Easy to use object syntax for simple programmatic access
• Reduce level of procedural calls
• “Drill into” HDF objects programmatically
19