GDL setup Astronomy library
To setup the IDL/GDL Astronomy library on Linux: install GDL
apt install gnudatalanguage
add to ~/.profile
export GDL_STARTUP=~/.gdl/gdl-startup.pro
Download IDL Astronomy Library and extract
mkdir ~/astrolib
tar xf astron.dir.tar.gz -C ~/astrolib
Create~/.gdl/gdl-startup.pro
!PATH=!PATH+':'+Expand_Path('+~/astrolib/')
which keeps the current paths and adds all the Astronomy library subdirectories.
Check: reopen Terminal and type
gdl
In GDL:
print,!PATH
and ~/astrolib
should be included in the printout.
Examples: Astrolib vs. AstroPy
The comparison is with my Astropy-based coordinate conversion library.
GDL
hor2eq, ten(37,54,41), ten(264,55,06), 2466879.7083333d, ra, dec, /verb, obs='kpno', pres=781.0, temp=273.0
Python shows less than 2% difference.
python pymap3d/azel2radec.py
reading .fits
:
Download NASA example FITS file and extract
tar xf w0bs0102t_c0h.fit.gz
From gdl
show an image from Hubble Space Telescope.
FITS_READ, 'w0bs0102t_c0h.fit', data, header
TVSCL,data
Show FITS headers
PRINT,header