The Gnu Data Language is an interactive interpreter/incremental compiler for the GNU Data Language, which is primarily used in scientific, astronomical, medical and geo-science data processing applications. It supports graphical output and is intentionally designed to be highly compatible with the commercial IDL language. GDL is a free IDL (Interactive Data Language) compatible incremental compiler (ie. runs IDL programs). For a list of functions / compatability try this list.
Installation
To install on Ubuntu search the ‘Ubuntu Software Center’ or ‘Synaptic Package Manager’ or from the command line:
sudo apt-get install gnudatalanguage
File Locations (Ubuntu 10.10)
On installation, GDL is installed with various libraries in .pro files under:
/usr/share/doc/gnudatalanguage/examples/pro/*
Environment Variables / GDL_STARTUP
To ensure the libraries above are available to GDL when you run it, you can make use of the GDL_STARTUP environment variable. Set it as follows (bash):
export GDL_STARTUP=~/.gdl_startup
Or add that line to the bottom of your .bashrc file so it is run automatically on log in. To do this graphically open a text editor Applications > Accessories> Text Editor. Choose File > Open and show hidden files by pressing Crtl-H on the keyboard. Open the .bash_rc file and add your export line at the bottom.
Now that we have set the GDL_STARTUP variable to point to a file we need to create that file: Use vi, Text Editor (gedit) or any other text editor to create the file: /home/jonny/.gdl_startup
and add the following contents:
!PATH=!PATH + ':/usr/share/doc/gnudatalanguage/examples/pro/' !PATH=!PATH + ':/usr/share/doc/gnudatalanguage/examples/pro/dicom/' !DIR='/home/jonny/gdl' print, '%** Personal settings are loaded and active **';
This sets the working directory to /home/jonny/gdl, we need to make sure that that exists. We can then reference files for input and output relative to this directory.
Thank you very much for these articles. They helped clarify things immensely for me.
I’ve been an IDL user for over 2 decades (gah — I’m feeling old!). Never heard of GDL until a few days ago. I’m looking forward to trying it out. Thanks for the series of GDL posts! (I’m guessing that GDL has improved even more since these 2011 posts were published!)
Thank you so much. It was very helpful 🙂
useful links in 2017
Then you need to fix the IDL_PATH (or the GDL_PATH)
wget https://www.physics.wisc.edu/~craigm/idl/down/cmsvlib.tar.gz
git clone https://anonscm.debian.org/git/debian-astro/packages/mpfit.git
git clone https://anonscm.debian.org/git/debian-astro/packages/idlastro.git
git clone https://anonscm.debian.org/git/debian-astro/packages/coyote.git
(the three git packages are in fact platforms independents (only *pro files))
can someone help me with my case of missing “examples directory”. my gnudatalanguage folder does not consist of the examples folder, all the .pro files are stored at /usr/share/gnudatalanguage/lib , but these are inbuilt procedure files such as factorial.pro, appleman.pro . i have been searching all of my system for those examples but all in vain. and some inbuilt .pro files too are missing such as binomial.pro, cramer.pro