IDL 8.5: IDL kernel for Jupyter notebook
posted Tue 1 Sep 2015 by Michael Galloy under IDLThe IDL 8.5 feature that I am most excited about is the Jupyter notebook kernel for IDL. For a certain type of analysis, the notebook is a great tool for both recording an interactive session as well as presenting it to others. From the Jupyter documentation:
The Jupyter Notebook is a web application for interactive data science and scientific computing. It allows users to author documents that combine live-code with narrative text, equations, images, video and visualizations. These documents encode a complete and reproducible record of a computation that can be shared with others on GitHub, Dropbox and the Jupyter Notebook Viewer.
The IDL kernel provided in IDL 8.5 works well. The only issue I had with the notebook was that only the first direct graphics plot was displayed. The workaround was simple, though a bit tedious – I just needed a WINDOW
command before each plot. I had no issue with function graphics plots, widgets, or non-graphical commands in my first explorations.
I’m still uncertain of the exact use cases for which the notebook will be valuable, but I intend to spend some time trying to find them. As a simple example, here is a notebook (and HTML representation) of the first section of my book, Modern IDL.
September 2nd, 2015 at 2:40 pm
This is great! I had been wondering if Jupyter would work with IDL, but did not get a chance to find out.
February 17th, 2016 at 7:43 pm
Follow up: I have used Jupyter+IDL occasionally, and it seems to work well. I have seen a few use cases it opened up: as an interface for running jobs on clusters, where the Jupyter session is a job running in a compute node, and to set up complicated applications in a server, so that users can just go to the server with a browser and use the applications.
March 23rd, 2016 at 10:35 pm
Hi Michael,
Thanks for the informative post. I’m an avid Python user and a reluctant IDL user and as such am looking for a good way to integrate the two. This seems promising!
The Jupyter kernel packaged with v8.5 seems to work pretty well. However, I am looking for a way to add some sort of custom setup (i.e. .csh script or even an IDL startup file) prior to the IDL kernel starting. Have you looked into this or had any luck with it? Looking at the idl_kernel.py and idlpy.py source, this doesn’t seem straightforward.
I see that you’re working at NCAR right now. Specifically what I’m looking to do is set up the SolarSoft environment inside of a notebook which involves a lot of setting environment variables and such. Any light you can shed on this would be very helpful!
Will
March 23rd, 2016 at 10:44 pm
I use SolarSoft routines, but I do not use
sswidl
. I just put the routines in my IDL!path
. Would that work for you?March 23rd, 2016 at 10:53 pm
Ah I see. This would certainly work, but once you install a few instrument packages plus CHIANTI plus POA etc., the paths start to get a bit hairy. Since
sswidl
does all of this already, I was trying to avoid reinventing the wheel. This open source IDL kernel seems like a promising alternative though.March 24th, 2016 at 9:17 am
I did try that out before the official IDL one came out and back then it had some issues. I wonder what they have done since IDL has officially supported Jupyter.