Installing Source Extractor 2.19.5

Source Extractor SExtractor is a software that scans the input fits images and finds the objects (based on the parameters you have defined) that are in it, it then gives you a catalog of the objects in the image based on the parameters you have requested that you can insert into IRAF or use as a base for your own hand written cfitsio routine to do your analysis on.

Here I breifly discuss how this useful software can be installed on your computer. At a first glance on it's webpage and on the sight of an RPM package you feel very comfortable that unlike most professional software a large amount of compilations and unexpected errors aren't needed! In my case at least the RPM ran very fast and I had SExtractor installed in seconds! But while reading the Source Extractor for Dummies and trying to test my installation I found that I don't have the important default.param, default.sex or default.conv files along with the important convolution files that are mentioned in both guides on my computer! I then studied the webpage more and after studying the manual and this webpage I decided to install and work with the complete package, that includes all the configuration files too.

I applied these procedures on a fresh install of 32bit (for my laptop) and 64bit (for my desktop) Scientific Linux, due to a similar architecture, these steps work equally fine for Fedora (e.g. 17, 16 and ...) and all Red Hat Based Linux distributions. The only difference is in the flags of ATLAS's configure script; insert a 32 instead of 64 if you are using a 32bit system.

While learning SExtractor I am making a note of all the important things I didn't find in the Official Manual or " SExtractor for Dummies". You can see them in my SExtractor 2.8.6 Notes page.

Source Extractor (SExtractor) 2.19.5 Installation

The Short Way

As I explained, there is a very easy way to install SExtractor using an RPM file. Although I don't advise this method because an RPM file is already compiled and will not necessarily work on your computer. in this procedure all you have to do is;

  1. Download the installation rpm in This address.
  2. Change to root:
        # su
  3. Run the rpm:
        # rpm -i [file name and address]
  4. Finished!

The Long Way

In this method there are a list of prerequisits that must already be installed on your computer to be able to complete the building successfully;

  1. GNU Compiler Collection (GCC) and it's especial Fortran compiler: gfortran. It is used for installing Lapack.
  2. Fastest Fourier Transform in the West (FFTW) which is a C subroutine library for computing the discrete Fourier transform in one or more dimensions.
  3. Linear Algebra PACKage (LAPACK) which is written in Fortran and provides routines for solving Linear Algebra problems.
  4. Automatically Tuned Linear Algebra Software (ATLAS) its purpose is to provide portably optimal linear algebra software.

Of these four, the first two are very easy but the last two (that are intertwined) are relatively hard. I should also say that my Fedora 14 already had FFTW and ATLAS installed from the Operating System installation time, but for some reason, the configure script of SExtractor didn't recognize them!

GCC & gfortran

The GNU Compiler Collection or GCC is a very important package that doesn't get installed along with the Fedora installation DVD but is very crusial for a lot of purposes; you can install GCC and gfortran using these two simple scripts in Fedora. You just have to type the codes after the # sign.

  1. Change to root:
        # su
  2. Type these two commands:
        # yum install gcc
        # yum install gcc-gfortran
    to install gcc and gfortran.

FFTW

The installation of FFTW can be done in the same manner as GCC with the yum command; just replace gcc with fftw, but this method doesn't support multithreading, that is required by SExtractor. So it is best to just compile it from source;

  1. Download the tar file from this address and unpack it;
        # tar xvzf file-name
  2. Open the file and run the configure script to create the make file, make sure to enable multithreading
        # ./configure --enable-threads --enable-float
  3. Run the make file to compile it
        # make
  4. Install it so that it is accessable from any where in your computer;
        # make install

ATLAS

You only need to install the ATLAS Development package. If you want to install the full ATLAS package Click here.
    # yum install atlas-devel
You are now ready to install SExtractor...

Source Extractor

And Finally.... We get to installing SExtractor;

  1. Download the source code from its webpage and unpack the file;
        # tar -xvzf filename
  2. Open the file and run the configure script to create the make file
        # ./configure
  3. Run the make file to compile it
        # make
  4. To see if it has been successfully built, you can run:
        # make check
    If it says 1 test passed then you are good to go.
  5. Install it so that it is accessable from any where in your computer;
        # make install

Arch Linux:
I have recently moved to Arch Linux and will not be updating the information above for RHEL based Linux versions any more (because I don't have them!). Arch Linux is a fantasic distribution with minimal modifications by the Arch Linux maintainers, so you get the most recent versions of the packages and with minimal change from what the authors of those packages intended. It also has a great wiki for you to learn from. I strongly suggest it to who ever wants to learn how GNU/Linux works. Most other distributions like Ubuntu, Fedora or Scientific Linux, hide so many things from the user. This makes learning how the GNU/Linux system works very hard when using them.
Any way, most of the dependencies like FFTW or cblas are already available in pacman. Only Atlas isn't. I have explained how to install it in a dedicated page. Atlas will put its libraries and header files in /usr/local/atlas by default, so you have to tell this to SExtractor during the configuration. You can add these two options in the ./configure step:
   --with-atlas-libdir=/usr/local/atlas/lib/
   --with-atlas-incdir=/usr/local/atlas/include/

Ubuntu:
I don't use Ubuntu my self but Markus Voge was kind enough to supply me with the respective packages there. You can follow the instructions bellow but for these packages: libatlas3gf-base, libatlas-base-dev, libatlas-headers that you can get using apt-get. Upon configuring SExtractor, if a multi-threading error comes, you can follow the instructions here.

Acknowledgments
I would like thank Markus Voge and Benjamin Veen for their comments on improving this webpage.

 

Updated on October 7th, 2014.
Created on May 25th, 2011.

Tohoku University Astronomical Institute, 6-3 Aramaki, Aoba-ku, Sendai, Japan, 980-8578
    akhlaghi :a:t: astr.tohoku.ac.jp, Office: Physics A; 838, +81-80-3335-9474