一.创建文件夹oof,并进入
二.相关库安装
1.yum install gsl gsl-devel (1.13-1.el6)
2.yum install swig.i686 (1.3.40-6.el6)
3.yum install boost boost-devel (1.41.0-11.el6_1.2)
4.yum install libtool (2.2.6-15.5.el6)
5.yum install gcc-gfortran (4.4.6-4.el6)
6.yum install gcc-c++ (4.4.6-4.el6)
7.yum install python.i686 (2.6.6-29.el6_3.3)
8.yum install python-devel.i686 (2.6.6-29.el6_3.3)
9.yum install fftw-devel.i686 (3.2.1-3.1.el6)
10.yum install libX11-devel.i686 (1.3-2.el6.i686)
11.yum install libpng-devel (1.2.49-1.el6_2.i686)
12.yum install numpy (1.4.1-9.el6)
13.easy_install pyfits (3.1) (http://www.stsci.edu/institute/software_hardware/pyfits/Download)
三.系统配置
在~/.bashrc中添加
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
export PYTHONPATH=/usr/local/bin:/usr/local/lib:${PYTHONPATH}
export PGPLOT_DIR=/usr/local/pgplot
export PGPLOT_DEV=/Xserve
四.pgplot安装 (https://www.dur.ac.uk/physics.astrolab/ppgplot.html)
1.wget ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz
2.cp pgplot5.2.tar.gz /usr/local/src
3.cd /usr/local/src
4.tar zxvf pgplot5.2.tar.gz
5.mkdir /usr/local/pgplot
6.cd /usr/local/pgplot
7.cp /usr/local/src/pgplot/drivers.list .
8.去掉drivers.list的/PS /VPS /CPS /VCPS /XSERVE /XWINDOW的注释
9./usr/local/src/pgplot/makemake /usr/local/src/pgplot linux g77_gcc
10.vi makefile
# Replace "FCOMPL=g77" in line 25
# by "FCOMPL=gfortran"
# Replace "FFLAGC=-u -Wall -fPIC -O" in line 26
# by "FFLAGC=-ffixed-form -ffixed-line-length-none -u -Wall -fPIC -O"
# SHARED_LIB_LIBS=-lgfortran
# Replace "pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h"
# by "pndriv.o : "
11.make #compiles the Fortran part
12.make cpg #compiles the C part (binding to Fortran)
13.cd /usr/local/lib #libraries for local installations
14.ln -s /usr/local/pgplot/libpgplot.a libpgplot.a # F77 static library
15.ln -s /usr/local/pgplot/libcpgplot.a libcpgplot.a # C static library
16.cp /usr/local/pgplot/libpgplot.so . # dynamic (runtine) library
17.ln -s /usr/local/pgplot/cpgplot.h /usr/local/include/cpgplot.h
五.cfitsio库安装
1.wget ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3310.tar.gz
2.tar zxvf cfitsio3310.tar.gz
3.cd cfitsio
4./configure --prefix=/usr/local
5.make
6.make install
六.bnlib库安装
1.wget http://www.mrao.cam.ac.uk/~bn204/soft/bnlib-1.3.2.tar.bz2
2.cd bnlib-1.3.2
3../configure
4.make install
七.bnfits库安装
1.wget http://www.mrao.cam.ac.uk/~bn204/soft/bnfits-1.2.tar.bz2
2.cd bnfits-1.2
3../configure
4.make install
八.bnmin1库安装
1.wget http://www.mrao.cam.ac.uk/~bn204/soft/bnmin1-1.11.tar.bz2
2.tar xvjf bnmin1-1.11.tar.bz2
3.cd bnmin1-1.11
4../configure
5.make install
九.astromap库安装
1.wget http://www.mrao.cam.ac.uk/~bn204/soft/astromap-1.5b5.tar.bz2
2.tar xvjf astromap-1.5b5.tar.bz2
3.cd aastromap-1.5b5
4../configure
5.cd plot
6../configure
7.cd ..
8.make install
十.OOF程序安装
1.wget http://www.mrao.cam.ac.uk/~bn204/soft/oof-1.4b6.tar.bz2
2.tar xvjf oof-1.4b6.tar.bz2
3.cd oof-1.4b6
4../configure
5.make install
十一.iofits4.py安装
1.wget http://www.mrao.cam.ac.uk/~bn204/soft/iofits4.py
2.cp iofits4.py /usr/local/bin
十二.OOF执行程序修改
将/home/shao65/oof/oof-1.4b6/bin以及/usr/local/bin/目录下oofdataio.py文件中的import numarray修改为import numpy.numarray