Skip to content

chetstar/idlsave

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE

  IDLSave has now been merged into Scipy, and can be used as
  scipy.io.readsav. See:

    http://docs.scipy.org/doc/scipy/reference/generated/scipy.io.readsav.html

  for more details. IDLSave 1.0.0 is equivalent to scipy.io in Scipy 0.10.1

INTRODUCTION

  IDLSave is a pure python module to import variables from IDL 'save' files
  (e.g. .sav) into python, and does not require IDL to work. It has a very
  simple command-line interface, and converts all IDL variables to python
  types. Arrays are converted to Numpy arrays, and Structures are converted to
  Numpy record arrays.

  The following example demonstrates how to read a .sav file into python. This
  is done using the idlsave.read method, which returns a dictionary-like
  object with attribute access:

    import idlsave
    s = idlsave.read('myidlfile.sav')

  This will print out a list of the contents of the IDL save file, including
  variable names. To access a variable named 'mydata', simply use:

    s.mydata

  IDL Structures are converted to recarrays. To access a given field in a
  structure, use

    s.mydata.field_name

NOTES

  There are certain records in 'save' files cannot be read by IDLSave. These
  include system variables, compiled code and procedures.

  IDLSave has been tested with a number of files generated by IDL versions 5
  to 8, and up to 5Gb in size. However, it is possible that you encounter
  problems when parsing files, in which case Exceptions should be raised. If
  that is the case, please let me know by sending a report to

                      thomas.robitaille@gmail.com

  There are no plans to allow IDLSave to write out save files from python in
  the near future.

ACKNOWLEDGMENTS

  Many thanks to Craig Markwardt for publishing the Unofficial Format
  Specification for IDL .sav files, without which this Python module would
  not exist.

  Thanks to Christian Lupien for several patches, and for many users for
  helping me to identify bugs

IDL(r) is a registered trademark of ITT Visual Information Systems, Inc.

About

IDLSave - a python module to read IDL 'save' files

Resources

License

Stars

Watchers

Forks

Packages

No packages published