IRAF: add packages with precompiled binaries

IRAF has a variety of tools but more packages can be added really easy (when there are precompiled binaries at least!).

Download the package you want (let it be … testpackage-1.4.0) and extract it inside the directory /pathto/iraf/extern/ ,where all external packages are placed [if scisoft is installed then the path is /scisoft/share/iraf/extern/ ]. Download also the precompiled binaries according to the architecture used (linux, windows, solaris, etc) and put them inside the /pathto/iraf/extern/testpackage-1.4.0/bin.redhat (if the architecture is redhat linux, accordingly for the rest).

Continue and create a link to this folder: $ ln -s  testpackage-1.4.0  testpackage
where the version of the package is kept (so as to know what is used) and testpackage is the selected name for the link.

After placing all the necessary files the last step is to define where the package to iraf. Go to /pathto/iraf/iraf/unix/hlib/ and edit the extern.pkg. Follow the same syntax of the previously installed packages and add the new one, in our case (‘/’ at the end is mandatory for unix pathnames!):

reset testpackage  =  /pathto/iraf/extern/testpackage-1.4.0/
task testpackage.pkg  =  testpackage$

Also update the helpdb by putting the line:  ,testpackage$lib/helpdb.mip\
under the long list of similar lines close to the end of the file (but before the closing quote!).

Moreover, edit the in the dame directory to add the description for the new package (following the same simple syntax):  testpackage  –  Fancy tools for exotic stuff

…and that’s it ! If you run cl then you will be able to access the new package! Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *