The software package GNU Data Language (GDL) can be downloaded from the project's homepage . However, it is recommend to use the package manager of your Linux/Mac/BSD. On Ubuntu/Debian and their derivatives just execute:

sudo apt-get install gnudatalanguage 

For the use in the lab courses the IDL Astro Library is also required. It can be downloaded at:


In the next step the following directory


should be created. Here and in the following, user should be replaced by the name of the corresponding user account. Afterwards the archive (astron) can be unpacked there. Furthermore, it is necessary to change the following lines of the file readfits.pro in the directory pro:

Line:              ndata = product(dims,/integer)
replace by:        ndata = dims[0]

Additionally create a file fitsconvert.pro with the following content:

function fitsconvert,image
if n_elements(image) eq 0 then begin
  print,'Usage: converted_image=fitsconvert,original_image'
erg=(long(image)+65536) mod 65536

in the directory /home/user/opt/gdl-astrolib/.

Additional routines for the lab course

Start-up script

To use the AstroLib, create an additional start-up script that exports the paths of the libraries. This script can e.g. be saved as hidden file in the home directory (e.g. $HOME/.gdl_startup). If the directory astron and the file fitsconvert.pro are placed in /home/user/opt/gdl-astrolib, the start-up script would look like:

!PATH=!PATH + ':/usr/bin/'
!PATH=!PATH + ':/home/user/opt/gdl-astrolib/astron/pro'
!PATH=!PATH + ':/home/user/opt/gdl-astrolib'
loadct,0, ncolor=255;
print, '*********************************************';
print, '** Personal settings are loaded and active **';
print, '*********************************************';

The first line contains the link to the executable gdl file. The second/third line contains the path to the .pro files in the astron directory and the file fitsconvert.pro (adjust paths as needed).

Is the start-up script located in the directory /home/user/, one can prepare it for the usage in the Bash shell by adding the following line

export GDL_STARTUP=/home/user/.gdl_startup

to the .bashrc script in the home directory.

Final advice for the usage in the lab course

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • en/software/howto_gdl_install.txt
  • Last modified: 2020/03/09 15:24
  • by rhainich