en:software:howto_gdl_install

This is an old revision of the document!


FIXME This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)

The software package GNU Data Language (GDL) can be downloaded at the project's homepage (link), then follow the instructions for Win / Mac / Linux to install. In common Linux distibutions (Ubuntu, Debian, …) one can use the package management, too:

sudo apt-get install gnudatalanguage 

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

http://idlastro.gsfc.nasa.gov/homepage.html

Unpack the archive (astron) and 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'
  return,0
endif
erg=(long(image)+65536) mod 65536
return,erg
end

The directory astron and the file fitsconvert.pro can now be moved to an arbitrary place. 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/praktikum/opt/gdl-astrolib, the start-up script would look like:

!PATH=!PATH + ':/usr/share/doc/gnudatalanguage/examples/pro'
!PATH=!PATH + ':/usr/bin/'
!PATH=!PATH + ':/home/praktikum/opt/gdl-astrolib/astron/pro'
!PATH=!PATH + ':/home/praktikum/opt/gdl-astrolib'
loadct,0, ncolor=255;
!P.BACKGROUND=255;
!P.COLOR=0;
!X.STYLE=1;
!Y.STYLE=1;
!Z.STYLE=1
print,'';
print, '*********************************************';
print, '** Personal settings are loaded and active **';
print, '*********************************************';
print,'';

The first two lines contain links to the programs that were installed as example gdl programs and the executable gdl file. The third/fourth line contain the path of the astron directory (the .pro files) and the file fitsconvert.pro (adjust paths as needed).

If the start-up script is in the directory /home/praktikum, prepare it for the usage in the Bash-Shell (in $HOME/.bashrc) by adding the following line to the .bashrc script:

export GDL_STARTUP=/home/praktikum/.gdl_startup
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.1418492493.txt.gz
  • Last modified: 2014/12/13 17:41
  • by msteinke