f



IDL kernel for IPython/Jupyter Notebooks

Hello,

In recent weeks, the IPython team has decided to split the IPython project =
into two separate projects. The language agnostic portions of IPython i.e. =
the console, qtconsole, and notebook will become Project Jupyter. The pytho=
n specific parts of IPython will still be called IPython but will be a lang=
uage kernel for Jupyter. Here is a link to the [announcement](https://www.y=
outube.com/watch?v=3DJDrhn0-r9Eg&t=3D4m10s).

In preparation of this split, wrapper kernels were introduced into the curr=
ent development version of IPython as an easy way to make language kernels.=
 Using this new feature I made an IDL/GDL kernel.=20

The kernel has basic functionality such as inline plots but there is room f=
or improvement.=20

I would appreciate testers since I did not have IDL available when I made t=
he kernel.

I would also appreciate contributors to help improve the kernel.

I hope this will be a useful tool for the IDL community.=20

Regards,
Luke Stagner


Source: https://github.com/lstagner/idl_kernel

Demo Notebook: http://nbviewer.ipython.org/github/lstagner/idl_kernel/blob/=
master/demo.ipynb

Wrapper Kernels: http://ipython.org/ipython-doc/dev/development/wrapperkern=
els.html
0
Luke
8/5/2014 9:30:35 AM
comp.lang.idl-pvwave 12260 articles. 2 followers. Post Follow

6 Replies
589 Views

Similar Articles

[PageSpeed] 38

Hi Luke,

this looks terrific! I'll try it when possible.

Cheers,

Fabien
0
Fabien
8/5/2014 10:57:59 AM
On 8/5/14, 3:30 AM, Luke Stagner wrote:
> Hello,
>
> In recent weeks, the IPython team has decided to split the IPython
> project into two separate projects. The language agnostic portions of
> IPython i.e. the console, qtconsole, and notebook will become Project
> Jupyter. The python specific parts of IPython will still be called
> IPython but will be a language kernel for Jupyter. Here is a link to
> the
> [announcement](https://www.youtube.com/watch?v=JDrhn0-r9Eg&t=4m10s).
>
> In preparation of this split, wrapper kernels were introduced into
> the current development version of IPython as an easy way to make
> language kernels. Using this new feature I made an IDL/GDL kernel.
>
> The kernel has basic functionality such as inline plots but there is
> room for improvement.
>
> I would appreciate testers since I did not have IDL available when I
> made the kernel.
>
> I would also appreciate contributors to help improve the kernel.
>
> I hope this will be a useful tool for the IDL community.
>
> Regards, Luke Stagner
>
>
> Source: https://github.com/lstagner/idl_kernel
>
> Demo Notebook:
> http://nbviewer.ipython.org/github/lstagner/idl_kernel/blob/master/demo.ipynb
>
>  Wrapper Kernels:
> http://ipython.org/ipython-doc/dev/development/wrapperkernels.html
>

Awesome! I got this working with IDL 8.3 and using the current Anaconda 
Python distribution. In addition to idl_kernel, I had to install:

   IPython 3.0-dev (get from https://github.com/ipython/ipython)
   pexpect 3.3 (download from https://pypi.python.org/pypi/pexpect)
   jsonpointer (easy_install)
   jsonschema (easy_install)

It is working for my basic examples. There are three small issues I see 
so far:

   1. There are a few error messages at the command line where I
      launched IPython.

   2. It prints debug type messages like

        .run /var/folders/3l/5497218j7x99gbh9xdh8fn500000gp/T/tmppbCisE

      in the notebook after I execute a command.

   3. I see a red flash before inline graphics appear in the notebook.

Mike
-- 
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation

0
Michael
8/5/2014 5:53:31 PM
Thanks Mike,

>    1. There are a few error messages at the command line where I
>=20
>       launched IPython.

I believe these are IPython errors. I expect they will be fixed before the =
3.0 release

>    2. It prints debug type messages like
>=20
>         .run /var/folders/3l/5497218j7x99gbh9xdh8fn500000gp/T/tmppbCisE
>=20
>       in the notebook after I execute a command.

What the kernel does is that it writes the contents of a cell into a tempor=
ary file and then runs it. This allows the kernel to compile functions and =
procedures. I do not have the debug messages though since I have the kernel=
 set !quiet=3D1. I'm not sure why you see it.=20
=20
>    3. I see a red flash before inline graphics appear in the notebook.

This is actually an IDL graphics window popping up and then being destroyed=
.. In the kernel a png of the plot is produced and is then sent to the noteb=
ook. I tried writing the png directly but it caused some issues.=20

     1. Plot colors were not correct

I am not sure what caused this. It may have been a shortcoming of GDL

     2. The ability to compile functions and procedures were lost.

Expressions needed to produce the png were written to the file before the c=
ell input which is not allowed if the cell contains procedures. This could =
be solved by parsing the cell input and writing the procedures to the tempo=
rary file first or perhaps by using multiple execute statements

Inline plotting is an area that needs improvement. In addition to the issue=
s I mentioned, if there are multiple plots in a cell then only the last one=
 will be displayed (the rest will be in graphics window).

-Luke


0
Luke
8/5/2014 7:14:01 PM
> >    3. I see a red flash before inline graphics appear in the notebook.
> 
> 
> This is actually an IDL graphics window popping up and then being destroyed. In the kernel a png of the plot is produced and is then sent to the notebook. I tried writing the png directly but it caused some issues. 
> 

Have you thought of using the function call 'w = window(/buffer)'?  This should give you the same results, but no window popping up.
0
pierre
8/14/2014 12:56:35 AM
Thanks for the info. At the moment however I am trying to keep everything backwards compatible with the last version of IDL i.e. 7.0 . When version 9.0 comes out I may use your solution.

I think I may be able to solve the problem using pixmaps. Any suggestions on how to effectively do this would be welcome.


-Luke

On Wednesday, August 13, 2014 5:56:35 PM UTC-7, pierre.v...@gmail.com wrote:
> > >    3. I see a red flash before inline graphics appear in the notebook.
> 
> > 
> 
> > 
> 
> > This is actually an IDL graphics window popping up and then being destroyed. In the kernel a png of the plot is produced and is then sent to the notebook. I tried writing the png directly but it caused some issues. 
> 
> > 
> 
> 
> 
> Have you thought of using the function call 'w = window(/buffer)'?  This should give you the same results, but no window popping up.

0
Luke
8/14/2014 9:54:24 AM
On 8/14/14, 3:54 am, Luke Stagner wrote:
> Thanks for the info. At the moment however I am trying to keep
> everything backwards compatible with the last version of IDL i.e. 7.0
> . When version 9.0 comes out I may use your solution.
>
> I think I may be able to solve the problem using pixmaps. Any
> suggestions on how to effectively do this would be welcome.

Very easy. Use "window, /pixmap" to create and tvrd to get contents of 
window into an array that you could write into an image file.

Mike
-- 
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation

0
Michael
8/14/2014 2:21:06 PM
Reply:

Similar Artilces:

IDL and IDL-PVWAVE disambiguation
Hi I've noticed that a few open source IDL projects are finding themselves on sourceforge. However, the IDL category seems to have a mixture of both "Interface Definition Language" and "Interactive Data Language". Would it make more sense to have an IDL-PVWAVE category, or perhaps an IDL-ENVI category? https://sourceforge.net/tracker/?func=detail&atid=350001&aid=1821007&group_id=1 Robbie ...

IDL in IPython notebooks
IPython notebooks are really great for sharing work with others. Now you can use IDL instead of Python in them: http://michaelgalloy.com/2014/06/03/idl-ipython-notebook.html Here's the first section of my book converted to a notebook: http://michaelgalloy.com/wp-content/uploads/2014/06/ModernIDL-Section1.1.html Looks like there are still some issues with it, specifically the string handling, but the code is on GitHub. Mike -- Michael Galloy www.michaelgalloy.com Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com) Research Mathematician Tec...

Should iPython Notebook replace Idle
In future releases of Python should ipython Notebooks replace idle as the default tool for new users to learn python? This would as I see it have many benefits? 1. A nicer more usual web interface for new users. 2. Would allow the python documentation and tutorials to be distributed as ipython notebooks which would allow new users to play and interact with the tutorials as they proceed. No download separate code retyping just edit run and play. 3. Would allow teachers to setup notebooks knowing that all users have the same default environment, no need for setting up virtualenvs etc. 4...

Idle time, idle thoughts
http://ohlandl.kev009.com/SCSI/scsi_bus_competitiors.html -- Reply to me at louis little punctuation mark ohland with the same ISP You ain't a-kidding. Louis Ohland schrieb: > > http://ohlandl.kev009.com/SCSI/scsi_bus_competitiors.html > Lacks ESDI which is a bus with up to 4 drives (according to specs) even using the separate data and control lines like St506. Not to mention IBMs DBA ESDI solution for the 50/55/70 series. Gereon The DBA ESDI is akin to IDE as to the electronics being on the drive, and none being required on the planar. When I get s...

distributed IDL or IDL on a Grid
Hi, We just concluded a little project which explored how one can make IDL work in a distributed environment. In particular, we investigated ways to create IDL clients for Web Services (examples dealt with accessing remote astronomical data and visualizing it locally via IDL). The prototype was implemented using Globus. In addition, we can run parallel IDL sessions on Grid nodes (nodes connected over WAN). Now we are supposed to submit Phase 2 proposal to NASA and are seeking for the community feedback. In particular, we have the following questions: Do you have scenarios when grid-IDL m...

idle with ipython
Hello, I was wondering if there is a way to configure idle to call ipython instead of python? I am working with the Enthought edition of Python (Enthon 1.0.0). I use ipython in Linux all the time, but in windows I like the "Run Module" button in Idle, and would like to have both. thanks, Brian Blais -- ----------------- bblais@bryant.edu http://web.bryant.edu/~bblais ...

IDL
Hello all So I have made some progress but I am stuck again being new to IDL So I got it to display a color image using the following code data = read_binary('avhrr_pf.ndvi.1nmegl.8207.bin', data_type = 4, data_dims = [360, 180], endian = 'big') device, decomposed = 0 xloadct window, 0, xsize = 360, ysize = 180 !order=1 tv, data However, I was trying to create a procedure so that I can just call it up. I keep getting this error File does not exist: 'homework1a.pro'. pro Homework1a, ^ % Syntax error. At: F:\GMUMAY2010\...

Stopped at idle+0x20: jmp idle
Hi, I have an OpenBSD 3.5-stable (GENERIC) i386. It acts as a firewall/router. This is the second time that this idle+0x20 error happened to my OpenBSD machine. A reboot seems to clear up the problem. But I'd like to know why I have the problem and how can I solve it. I did some searching, but not much information came out. I'd appreciate any URL, guide or explanation. Thank you in advance. The hardware: Pentium-II 350MHz 128MB RAM 2 GB IDE HDD 3 NICs: * xl0 3Com 3c905B 100Base-TX rev 0x30 * xl1 3Com 3c905B 100Base-TX rev 0x30 * fxp0 Intel 82557 rev 0x05 As...

IDL calls C calls IDL?
Hey again, I've been thinking, I have code that does LINKIMAGE 'func' ,..... for t=0,tmax-1 func(data) idl_function(data) endfor Is it possible to call idl_function from within C ? I want it to be like this In IDL: func(data) Then it passes onto C which does for (t=0; t<tmax;t++) { do whatever it does with data CALL IDL_FUNCTION(data) } This eliminates me calling func a few million times Can it be done? On Sep 11, 11:53=A0am, "hotplainr...@gmail.com" <hotplainr...@gmail.com> wrote: > Hey again, > > I've been thinking, I have cod...

IDL nested structures in Callable IDL
Hi everybody, I am trying to create a IDL nested structure from C and I am going a bit nuts because I can't find the way. The application fails when I try cDef=IDL_MakeStruct(NULL,cTags). I am trying to create an equivalent of: data={N_ITEMS:2, DATA1:data1, DATA2:data2} where data1 and data2 data1={x:dblarr(numberPoints1), y:dblarr(numberPoints1)} data2={x:dblarr(numberPoints2), y:dblarr(numberPoints2)} just only trying to include data1 static IDL_MEMINT dataInDims[]={1,1}; static IDL_MEMINT x_dim[] = {1,numberPoints1}; static IDL_MEMINT y_dim[] = {1,numberPoints1}; ...

problems with IDL-IDL bridge spawning
Hi all, Recently I've started using the IDL-IDL bridge to parallelize some simulations. Only certain parts of the algorithm are suitable for this, so my approach is to alternate, thus: - run Do_Stuff_1 in main IDL session, - spawn 8 bridges, each of which runs a copy of Do_Stuff_2 - when they're done, back in the main session, obj_destroy all the bridges, run Do_Stuff_3, and then loop back to the start for the next iteration. Thus the code alternates between running bridged code and just regular IDL. At first I thought things were working fine, but for some reason, part ...

IDLE
Newbie question. Installed Python 2.4 successfully. However, double clicking on the IDLE icon activates the hour glass cursor and then dies. The IDLE window does not come up. I am sure it is something trivial that I am not doing Any thoughts George george schreef: > Newbie question. > > Installed Python 2.4 successfully. > However, double clicking on the IDLE icon activates the hour glass > cursor and then dies. The IDLE window does not come up. > I am sure it is something trivial that I am not doing Happended to me too. Idle is trying to get access to tcp/ip services and...

Comparing IDL to C++ with IDL to C++11
Hi, We have posted the first version of a new presentation that compares the IDL to C++ with the IDL to C++11 language mapping. You can obtain a free copy from our slideshare account at http://www.slideshare.net/RemedyIT/comparing-idl-to-c-with-idl-to-c11 Best regards, Johnny Willemsen Remedy IT http://www.theaceorb.nl ...

Idle
Hi there, I have a OnIdle function that processes wxIdleEvents. Sometimes, this function performs long tasks (1s). In that case, my application freeze: the GUI is not repainted, I can't quit nor click anywhere. The only solution I found is to call Yield(), but I would like to avoid this since is introduces instability. And by the way, I don't understand why other events that wxIdleEvents are not processed, even if the wxIdleEvents processing is a bit slow. Events are queued, aren't they? G. On Thu, 05 Jun 2008 17:13:56 +0200 Guillaume GOURDIN <trash@hotmai...

Web resources about - IDL kernel for IPython/Jupyter Notebooks - comp.lang.idl-pvwave

The Notebook (film) - Wikipedia, the free encyclopedia
The Notebook is a 2004 romantic drama film directed by Nick Cassavetes , based on the romance novel of the same name by Nicholas Sparks . The ...

Springpad Integrates With Facebook, Allows Users To Organize Likes Into Notebooks
... books, music, and restaurants into one handy timeline box following new Facebook integration features launched Thursday by “smart notebook application” ...

Washington Notebook - News and notes from the halls of Congress, by World-Herald Washington bureau chief ...
News and notes from the halls of Congress, by World-Herald Washington bureau chief Joseph Morton

Coleg Notebook (@colegnotebook) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Coleg Notebook @ colegnotebook ...

Notebooks for iPad for iPad on the iTunes App Store
Read reviews, get customer ratings, see screenshots, and learn more about Notebooks for iPad on the App Store. Download Notebooks for iPad and ...

Quick Review: Incase’s 12″ MacBook Neoprene Classic Sleeve + ICON Sleeve perfectly fit the ultra-slim ...
... no room for carrying extras. Neoprene Classic Sleeve measures 12″ wide by 8.75″ tall by 1″ thick without a MacBook inside. Slipping a notebook ...

CES 2016: MSI Gaming Notebooks and Mobile Workstations
... cards on MXM modules, which is a step up on the SLI GTX 980M cards which were installed in our review unit . This is still a beast of a notebook, ...

Today’s apps gone free: MoneyCoach, Sunburn, Audio Notebook and more
... time and without notice regardless of stated free duration. Price changes are solely under the control of the developers. iPhone: Audio Notebook ...

2016 NFL Draft: Matt Miller's Scouting Notebook for Divisional Weekend
The Scout's Report — As NFL teams meet and get ready for Senior Bowl week (January 25-30) in Mobile, Alabama, information about rankings is starting ...

Les Banlieues: Producer's Notebook
Photos from CBS News producer Christina Ruffini taken during the production of CBSN's original documentary "Les Banlieues."

Resources last updated: 1/26/2016 3:49:54 PM