Saturday, January 13, 2007

Replacing IDL

I try to avoid using and proprietary and/or commercial software for scientific research, for a variety of reasons, but given the number of different self-administered computers I use the financial issue is not insignificant. If there is a free alternative then it seems bad to needlessly waste grant (and ultimately tax-payer) money on commercial software.


Unfortunately I've just been forced to start using IDL in preparing for one of the Cycle 16 HST proposals I'm in the middle of working on - there isn't time for me to rewrite the IDL procedures I'm using in some other language before the proposal deadline (in the course of this I discovered i2py, an IDL to Python converter, but I haven't tried it yet).

And IDL is one of the commercial packages I dislike the most that is also most often used by other astronomers... in my humble opinion its too expensive, too slow compared to compiled languages like C++, too much of a memory hog and worse still, too inelegant an language compared to modern interpreted languages like Python and Ruby. Yeah, they've tried to update it by adding OO features to old-fashioned procedural IDL, but still this is only cool to people who have a large existing investment in using (and access to) IDL. Do you really want to pay (lots of) money to get it?

Some people (most of them die-hard long-time IDL users) would argue with this characterization of IDL, but for me its remaining Fortran-based heritage is too 1970's to bear (I like Fortran... for some things it is great, but why would I want to use an interpreted language with Fortran-like syntax and structuring?).

Still, I've spent the last few days messing about with IDL on a departmental Sun workstation that is so old and out of date it still uses Netscape as a browser, processing files on a modern Linux PC at least ten times faster than the ancient Sun Ultra 20 workstation and then scp'iong files over and waiting the hours it takes for the slow Sun machine to run IDL before it runs into some memory limitation or whatever it decides to inflict on me... painful. Very painful. And the sodding bog-standard-and-absolutely-vital readfits routine doesn't work on v6.1 of IDL so I have to use 5.6 instead. Great.

However this evening I remembered that there was a GNU project to re-implement IDL from scratch, which is unsurprisingly called GDL. But does it work? Well, the good news is all I needed to do was run "yum -y install gdl" on FC6 to install GDL, install a few IDL libraries the GDL page provided links to, and the IDL code I have to use rather magically works.

Its not enough to get me to like IDL, nor will it stop rewriting this stuff later in a modern language if the proposal is accepted, but at least I can now edit the IDL code, modify the input fits data files, and run the damn procedures all on the same modern machine, maybe in time to get this proposal written. Thanks GDL programmers!

Post a Comment