comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL in IPython notebooks
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL in IPython notebooks [message #88694] Wed, 04 June 2014 09:26 Go to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
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.htm l

Here's the first section of my book converted to a notebook:


http://michaelgalloy.com/wp-content/uploads/2014/06/ModernID L-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
Tech-X Corporation
Re: IDL in IPython notebooks [message #88734 is a reply to message #88694] Tue, 10 June 2014 21:39 Go to previous messageGo to next message
chuxiangning is currently offline  chuxiangning
Messages: 17
Registered: September 2012
Junior Member
Thanks for sharing! This is great!

One more problem: the pIDLy only supports Linux I suppose?
Looks like time to transfer from windows to linux for me

On Wednesday, June 4, 2014 9:26:59 AM UTC-7, Mike Galloy wrote:
> 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.htm l
>
>
>
> Here's the first section of my book converted to a notebook:
>
>
>
>
>
> http://michaelgalloy.com/wp-content/uploads/2014/06/ModernID L-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
>
> Tech-X Corporation
Re: IDL in IPython notebooks [message #88741 is a reply to message #88734] Wed, 11 June 2014 08:34 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/10/14, 10:39 pm, chu xiangning wrote:
> Thanks for sharing! This is great!
>
> One more problem: the pIDLy only supports Linux I suppose? Looks like
> time to transfer from windows to linux for me

It works on OS X for me.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: IDL in IPython notebooks [message #88744 is a reply to message #88694] Thu, 12 June 2014 00:15 Go to previous messageGo to next message
lstagner89 is currently offline  lstagner89
Messages: 10
Registered: June 2014
Junior Member
While this is great it would be even better to have a IDL/GDL back-end for the IPython kernel front-end like julia and ruby has http://nbviewer.ipython.org/url/jdj.mit.edu/~stevenj/IJulia% 20Preview.ipynb
http://nbviewer.ipython.org/github/minad/iruby/blob/master/I Ruby-Example.ipynb
Re: IDL in IPython notebooks [message #88748 is a reply to message #88694] Thu, 12 June 2014 10:43 Go to previous messageGo to next message
lstagner89 is currently offline  lstagner89
Messages: 10
Registered: June 2014
Junior Member
Last night I looked into how difficult it would be to add an IDL/GDL kernel for the IPython notebook and the only major difficulty is the need for IDL/GDL binding for zeroMQ which IPython uses for communication between the python front-end and <insert language here> back-end. Here is some useful links I have found

http://zeromq.org/community

http://andrew.gibiansky.com/blog/ipython/ipython-kernels/

http://ipython.org/ipython-doc/dev/development/messaging.htm l

http://stackoverflow.com/questions/16240747/sending-messages -from-other-languages-to-an-ipython-kernel
Re: IDL in IPython notebooks [message #88751 is a reply to message #88748] Fri, 13 June 2014 09:41 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/12/14, 11:43 AM, lstagner89@gmail.com wrote:
> Last night I looked into how difficult it would be to add an IDL/GDL
> kernel for the IPython notebook and the only major difficulty is the
> need for IDL/GDL binding for zeroMQ which IPython uses for
> communication between the python front-end and <insert language here>
> back-end. Here is some useful links I have found
>
> http://zeromq.org/community
>
> http://andrew.gibiansky.com/blog/ipython/ipython-kernels/
>
> http://ipython.org/ipython-doc/dev/development/messaging.htm l
>
> http://stackoverflow.com/questions/16240747/sending-messages -from-other-languages-to-an-ipython-kernel
>
>

I took a look at the 0MQ header file and it doesn't look too bad
although it would take some work to make bindings for the routines
there. If I wrote an IDL DLM (I don't have experience extending GDL) for
the 0MQ routines, would you be interested in putting the rest together?

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: IDL in IPython notebooks [message #88757 is a reply to message #88751] Fri, 13 June 2014 15:21 Go to previous messageGo to next message
lstagner89 is currently offline  lstagner89
Messages: 10
Registered: June 2014
Junior Member
I would like to but I am not sure when I will be able to do it. I am in the middle of my PhD and I have a long list of (according to my advisor) higher priority projects. In any case I will take a crack at it when my schedule clears up a bit. Of course, if someone else would like to implement it I would be happy to help in anyway I can.
Re: IDL in IPython notebooks [message #88957 is a reply to message #88694] Tue, 08 July 2014 03:18 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
Hi Mike,

this is all quite promising. I gave it a try and the problem in your
example seems related to the use of "s" as variable name. Changing "s"
to "ts" made it work for me. i.e:

%%idl
s = 'Hello world!'
print, s

prints: "Hello world!"

But on the next cell a simple:
$$idl
print, s

prints a long array

but:

%%idl
ts = 'Hello world!'

%%idl
print, ts

works as expected.

I also tried to convert pIDLy and idlmagic to python3 but it's still too
complicated for me as I am a python newbie...

Anyways, all this is quite exiting.

Cheers,

Fabien
Re: IDL in IPython notebooks [message #88958 is a reply to message #88957] Tue, 08 July 2014 03:25 Go to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 08.07.2014 12:18, Fabien wrote:
> pIDLy and idlmagic to python3 but it's still too complicated

to be more precise: 2to3 works fine but when running pIDLy3 I got some
errors which seem related to deeper differences between py2 and py3. So
I gave up...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Plotting the region of interest from satellite image
Next Topic: cgPlotS problem with NaN values in data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:40:14 PDT 2025

Total time taken to generate the page: 0.00682 seconds