Skip to main content

Posts

Showing posts from June, 2013

RATRAN : get RESTFREQ written to FITS file

Current versions of RATRAN (http://www.sron.rug.nl/~vdtak/ratran/) does not put the FITS keyword RESTFREQ and the corresponding value in the output FITS-files by default. Below is a quick fix that I forgot to note down when I figured it out and thus had to rediscover twice...

Note about getting FITS output working:
make sure your shell variable CFITSIO is set to the path where it is installed, on my Ubuntu 13.04 this is CFITSIO=/usr/include:/usr/lib/x86_64-linux-gnu/:/usr/lib (several paths to make sure its correct) and also the LD_LIBRARY_PATH path (e.g. LD_LIBRARY_PATH=$LD_LIBRARY_PATH/usr/include)

So for the RESTFREQ to be printed we need to add it to the routine 'openfits', so edit 'Ratran_install_dir/sky/openfits.f'

first add restfreq to the definition of the routine
change
SUBROUTINE openfits(lout,outname,naxis,naxes,status) to
SUBROUTINE openfits(lout,outname,naxis,naxes,status,restfreq)  then define the type
DOUBLE PRECISION restfreq this should be added after the d…