IDL interface for the Julia language
IDLCall is an interface to call IDL from the Julia language. Note that you must have a valid IDL license to use IDL from julia.
Within Julia, use the package manager:
IDLCall should find and load the IDL library automatically on Mac and Linux. It has not been tested on Windows so please file an issue if you use Windows and want to help make it work.
IDL can be called using either the
Callable interface. On windows only the
interface is available. You can set an environmental variable
to force the use of that interface.
Alternatively you can set
ENV["JL_IDL_TYPE] within julia before starting IDLCall.
Note that by default IDLCall uses the
on Mac and Linux and
Callable on Windows. The biggest difference between these is that:
CallableIDL runs in one program space and thus arrays can be shared between julia and IDL. In
RPCall arrays are copied between processes. Note that I have run into issues with IDL loading DLM's while using
RPCis not supported on windows
Callableis always managed by IDLCall while
RPCcan be managed by IDLCall or the user. By managed we mean that it is opened it when you load IDLCall and closed it when you close julia. To manage
idlrpcin a shell before starting IDLCall. This allows the
idlrpcsession to persist and julia can be restarted without killing the
I recommend you start your code with
import IDLCall idl = IDLCall
Then you can add a julia variable to the IDL process with
and you can retrieve variable into julia using
x = idl.get_var("x")
You can run an arbitrary chunk of code in IDL using
idl.execute("any valid idl code")
Note that only primitive data types are supported at this time (e.g., structure variables are not supported yet).
You can drop into an IDL REPL by typing
> at the julia prompt. Then you can type any valid
IDL commands, including using continuation characters
$ for multi-line commands. One
experimental feature I have added is the use of
%var will auto-magically import the julia
var into the IDL process. This works at the IDL prompt or in strings passed into the
Make more flexible to install on all platforms
Add more variable types to be transferred between julia and IDL.