SExtractor installation

From MediaWiki

(Difference between revisions)
Jump to: navigation, search
m (PSFEX)
m (PSFEX)
Line 132: Line 132:
4. Enter psfex/ and run<br>
4. Enter psfex/ and run<br>
   sudo ./configure --with-atlas=/usr/local/atlas/lib --with-atlas-incdir=/usr/local/atlas/include
   sudo ./configure --with-atlas=/usr/local/atlas/lib --with-atlas-incdir=/usr/local/atlas/include
-
   # <i><font color="red"> If it says sth. like fftw -- single precision not found blah, blah GO BACK to fftw dir and do </font></i>
+
   # <i><font color="red"> If it says "FFTW single precision library files not found in /usr/local/lib" GO BACK to fftw dir and do </font></i>
   ./configure --enable-threads
   ./configure --enable-threads
   ./configure --enable-single --enable-threads
   ./configure --enable-single --enable-threads
-
Simply, FFTW is compiled for double-precision transforms by default and you need to change this.
 
   sudo make
   sudo make
   sudo make install  
   sudo make install  

Revision as of 06:47, 28 August 2010

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.

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
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/download .
sudo tar zxvf atlas3.8.3.tar.gz 
cd ATLAS/
sudo mkdir linux
cd linux
sudo /usr/bin/cpufreq-selector -g performance   # not important, skip 
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

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

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 it says "FFTW single precision library files not found in /usr/local/lib" GO BACK to fftw dir and do 
  ./configure --enable-threads
  ./configure --enable-single --enable-threads
  sudo make
  sudo make install 
 #And then return to psfex dir and proceed with:
 sudo ./configure --disable-threads --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