PDL::IO::IDL (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
PDL::IO::IDL -- I/O of IDL Save FilesDESCRIPTION
Currently, only reading is implemented. Scalars, arrays, and structures are all supported. Heap pointers, compiled code, and objects are not supported. Of those three, only heap pointers are likely to be supported in the future.
This code was not developed by
NOTES
These things seem to work:- BYTE, SHORT, LONG, FLOAT,andDOUBLEnumeric types and arrays
-
All of these types seem to work fine. The corresponding variable is
stored as a PDLin the hash element with the same name as the original variable in the file. Arrays are byteswapped as needed and are read in so that the dim list has the same indexing order withinPDLas it did withinIDL.
- STRINGs and arrays of STRINGs
- String types are stored as Perl list refs, in the hash element with the same name as the original variable in the file.
- Structures
- Structures are stored as hash refs. The elements of the hash may be accessed as values within the hash.
- Common blocks
- Variables that are notated as being in a common block are read as normal. Common-block names are collected in the special hash value '+common', which contains a hash each keyword of which is the name of a common block and each value of which is an array of variable names.
These things are known to be not working and may one day be fixed:
- COMPLEXnumbers
- These could be implemented as 2-arrays or as PDL::Complex values, but aren't yet.
- PTRtypes
- These could be implemented as perl refs but currently aren't.
- writing
- Maybe one day --- but why bother writing a broken file format? NetCDF is better.
These things are known to be not working and will probably never be fixed
- Compiled code
-
Decompiling IDLcode is a violation of theIDLend-user license. To implement this, someone who does not hold anIDLlicense would have to reverse-engineer a set of .SAV files sent to that person by someone else with anIDLlicense.
- Objects
-
IDLobjects contain compiled code.
FUNCTIONS
ridl
$a = ridl(``foo.sav'');Read an
Upon successful completion, $a is a hash ref containing all of the variables that are present in the save file, indexed by original variable name.
Numeric arrays are stored as PDLs, structures are stored as hashes, and string and structure arrays are stored as perl lists. Named structure types don't exist in perl in the same way that they do in
AUTHOR, LICENSE, NO WARRANTY
This code is based on the analysis of the