Post

Translate IDL to Python

Translate IDL to Python

IDL programming language

IDL, short for Interactive Data Language, is a programming language used for data analysis. It is popular in particular areas of science, such as astronomy, atmospheric physics and medical imaging. (Wikipedia)

IDL to python (numpy) document

idlwrap API

idlwrap helps you port IDL code to python by providing an IDL-like interface to numpy and scipy.

Note

  • Array
    • IDL a[i, *] is the same as Python a[:,i] There are two different ways of storing a matrix/array in memory: column-major and row-major.
    • IDL array index include the last element:
      IDL> (FLTARR(10))[3:5]
       0.00000      0.00000      0.00000 ; -> three elements
      
      1
      2
      
      >>> np.zeros(10)[3:5]
      array([0., 0.]) # -> two elements
      
This post is licensed under CC BY 4.0 by the author.