SExtractor installation

From MediaWiki

Jump to: navigation, search

This installation manual may be found at:Ubuntu forums. Just in case it is copied here and slightly modified. Installation of PSFEX is added. It will work under Ubuntu 8.04 32-bit and later.

Contents

SEXTRACTOR part I

In Ubuntu 10.04 sextractor can be easily installed via synaptic (included). For older Ubuntu versions follow instructions below:

  • SExtractor

Download sextractor-2.8.6.tar.gz from http://astromatic.iap.fr/software/sextractor

wget ftp://ftp.iap.fr/pub/from_users/bertin/sextractor/sextractor-2.8.6.tar.gz
tar zxvf sextractor-2.8.6.tar.gz
cd sextractor-2.8.6/

FFTW

  • FFTW

Download fftw-3.2.2.tar.gz from http://www.fftw.org/download.html via http

wget http://www.fftw.org/fftw-3.2.2.tar.gz . 
tar zxvf fftw-3.2.2.tar.gz
cd fftw-3.2.2/
./configure --enable-threads
# If compiler problems reported - do sudo synaptic and find and install gfortran and then do ./configure --enable-threads again 
sudo make
sudo make install

CLAPACK

  • CLAPACK

Download clapack.tgz from http://www.netlib.org/clapack/clapack.tgz

cd /home/[user]/
wget http://www.netlib.org/clapack/clapack.tgz .
gunzip -c clapack.tgz | tar xvf -
cd CLAPACK-3.2.1/
cp make.inc.example make.inc
make f2clib  # If it exits with errors -- fix them (it could be only paths like those below) before proceeding

In my case, I had to change the following in the make.inc file:
replace F2CLIB = ../../F2CLIBS/libf2c.a with F2CLIB = F2CLIBS/libf2c.a (in 2 places)
In file: CLAPACK-3.2.1/TESTING/LIN/Makefile
replace $(F2CLIB) with ../../$(F2CLIB); replace $(BLASLIB) with ../../BLAS/SRC/$(BLASLIB)
In file: CLAPACK-3.2.1/TESTING/EIG/Makefile
replace $(F2CLIB) with ../../$(F2CLIB); replace $(BLASLIB) with ../../BLAS/SRC/$(BLASLIB)
In files: CLAPACK-3.2.1/BLAS/TESTING/Makeblat[1-3]
replace $(BLASLIB) with ../SRC/$(BLASLIB); replace $(F2CLIB) with ../../$(F2CLIB)

  • sed -i s/"\$(F2CLIB)"/"..\/..\/\$(F2CLIB)"/g Makeblat[1-3] # Something like this may help

Proceed with:

 sudo make

ATLAS

  • ATLAS
sudo apt-get install libblas-doc libblas3gf libblas-dev libblas-test gfortran


  • For Ubuntu 8.04 (otherwise skip)
sudo synaptic (search by lapack and libgsl)

INSTALL: atlas3-base atlas3-doc atlas3-sse2 lapack3 libatlas3gf-sse2 libblas3gf refblas3 libblas-test libgsl0-dbg libgsl0ldbl liblapack3gf


Download atlas3.8.3.tar.gz from http://sourceforge.net/projects/math-atlas/files/

cd /usr/
sudo wget http://sourceforge.net/projects/math-atlas/files/Stable/3.8.3/atlas3.8.3.tar.gz .
sudo tar zxvf atlas3.8.3.tar.gz 
cd ATLAS/
sudo mkdir linux
cd linux
sudo /usr/bin/cpufreq-selector -g performance 
sudo ../configure -b 32 --with-netlib-lapack=/home/[user]/CLAPACK-3.2.1/lapack_LINUX.a #  Put your user name
sudo make build
sudo make check

Successful cmd will list 2 errors that should be ignored (as it says) like this:
DONE BUILDING TESTERS, RUNNING:
SCOPING FOR FAILURES IN BIN TESTS:
fgrep -e fault -e FAULT -e error -e ERROR -e fail -e FAIL \
bin/sanity.out
8 cases: 8 passed, 0 skipped, 0 failed
4 cases: 4 passed, 0 skipped, 0 failed
8 cases: 8 passed, 0 skipped, 0 failed
4 cases: 4 passed, 0 skipped, 0 failed
8 cases: 8 passed, 0 skipped, 0 failed
4 cases: 4 passed, 0 skipped, 0 failed
8 cases: 8 passed, 0 skipped, 0 failed
4 cases: 4 passed, 0 skipped, 0 failed
DONE
SCOPING FOR FAILURES IN CBLAS TESTS:
fgrep -e fault -e FAULT -e error -e ERROR -e fail -e FAIL \
interfaces/blas/C/testing/sanity.out | \
fgrep -v PASSED
make[1]: [sanity_test] Error 1 (ignored)
DONE
SCOPING FOR FAILURES IN F77BLAS TESTS:
fgrep -e fault -e FAULT -e error -e ERROR -e fail -e FAIL \
interfaces/blas/F77/testing/sanity.out | \
fgrep -v PASSED
make[1]: [sanity_test] Error 1 (ignored)
DONE
make[1]: Leaving directory `/usr/ATLAS/linux'

sudo make time
sudo make install

Now the libraries should be at /usr/local/atlas/.

SEXTRACTOR part II

  • CONTINUE WITH SEXTRACTOR
cd ~/sextractor-2.8.6/
./configure --with-atlas=/usr/local/atlas/lib --with-atlas-incdir=/usr/local/atlas/include --with-fftw=/usr/local/lib

If an error occures: configure: error: CBLAS/LAPack was compiled without multithreading support! Exiting., do

sudo ./configure --disable-threads --with-atlas=/usr/local/atlas/lib --with-atlas-incdir=/usr/local/atlas/include

And then (in both cases) continue with

sudo make
sudo make install

This should do the trick. In addition to SExtractor you can install GIM2D (software for decomposition of galaxy light profiles) and PSFEX (automatic PSF creation), but this is not the part of SExtractor installation. Anyway, if you want to do this, proceed. Btw, for PSFEX there is still no support since it is still under testing, but at least you can get a very good estimate of FWHM in your images in no time and automatically.

GIM2D

You need to have IRAF installed in order to use GIM2D.
Download fuzzy.v32.linux.tar.gz from https://www.astrosci.ca/users/GIM2D/installation.html

cd /iraf/iraf/unix/ 
sudo wget https://www.astrosci.ca/users/GIM2D/bindist/fuzzy.v32.linux.tar.gz .
sudo tar -xvpf fuzzy.v32.linux.tar.gz

Add 2 lines to login.cl in your home dir after set home ... set userid:
set fuzzy = "/iraf/iraf/unix/"
task $fuzzy.pkg = "fuzzy$fuzzy.cl"

Now, when you start iraf you will see new package fuzzy. Btw, pyraf will not see this package.

PSFEX

In addition to sextractor, for installation of psfex that makes psfs:

1. Download all .tar.gz files and all stand alone files (The easiest way: check trunk dir and click on the Tarball right and save file)
2. Unpack the file: gunzip psfex-trunk.r149.tar.gz | tar xvf -
3. Change configure to be executable if necessary and the dir name to psfex (if you want)
4. Enter psfex/ and run

 sudo ./configure --with-atlas=/usr/local/atlas/lib --with-atlas-incdir=/usr/local/atlas/include
 #  If you have installed FFTW in some unusual location, you must specify it like it:
 sudo ./configure -with-atlas=/usr/local/atlas/lib --with-atlas-incdir=/usr/local/atlas/include --with-fftw=/usr/local/lib --with-fftw-incdir=/usr/local/include
 #  Although here it is a standard location: /usr/local/lib and /usr/local/include 
 #  If it says "FFTW single precision library files not found in /usr/local/lib" GO BACK to fftw dir and do 
  ./configure --enable-single --enable-threads
  sudo make
  sudo make install 
 #And then return to psfex dir and proceed with:
 sudo ./configure -with-atlas=/usr/local/atlas/lib --with-atlas-incdir=/usr/local/atlas/include

5. Run

 sudo make 
  • If it reports a problem in seeing 8 spaces instead of tabs, do
 sed -i s/"        "/"\t"/g Makefile

6. continue with

 sudo make install 

Good luck with the rest...

Personal tools