« Shortcut to invert colors on iOS | Main | Basic moom customization »
Friday
Aug172012

Install Sextractor on OS X Lion

With thanks to http://okomestudio.net/biboroku/?p=824 this is how I got Sextractor working on OS X Lion:

  • Download latest FFTW (Version 3.3.2 as of this writing.)
  • Download latest LAPACK (Version 3.4.1 as of this writing.)
  • Download latest ATLAS (Version 3.10.0 as of this writing.)
  • Download latest Sextractor (Version 2.8.6 as of this writing.)

If gfortran is not already installed, download 4.8 gfortran only for Lion from here or direct download and install with

 sudo tar -xvf gfortran-lion.tar -C /.

Then, install FFTW with:

cd ~/Downloads
sudo tar -xof fftw-3.3.2.tar -C /usr/local/
pushd /usr/local/fftw-3.3.2/
sudo ./configure --enable-threads
sudo make; sudo make install
sudo ./configure --enable-threads --enable-single
sudo make clean; sudo make; sudo make install
popd

Install ATLAS and LAPACK:

sudo mkdir /usr/local/atlas-3.10.0
sudo tar -xzof atlas3.10.0.tar.bz2 -C /usr/local/atlas-3.10.0 --strip-components 1
sudo cp lapack-3.4.1.tar /usr/local/atlas-3.10.0/lapack.tar
sudo mkdir /usr/local/atlas-3.10.0/build
pushd /usr/local/atlas-3.10.0/build
sudo ../configure -b 64 --shared --prefix=/usr/local --with-netlib-lapack-tarfile=../lapack.tar
sudo make build
sudo make check
sudo make time
sudo make install  #  this threw some errors 
popd

Install Sextractor:

sudo tar -xof sextractor-2.8.6.tar -C /usr/local/
pushd /usr/local/sextractor-2.8.6
sudo sed -i '' -e 's/-llapack/-ltatlas/' -e 's/-lcblas/-ltatlas/' \
         -e 's/-latlas/-ltatlas/' -e 's/-lptcblas/-ltatlas/' ./configure
sudo ./configure --enable-threads
sudo make; sudo make install
popd

Run a test (takes a few minutes):

cd /usr/local/sextractor-2.8.6/tests/
sex galaxies.fits