This is an old revision of the document!
Downloading and installing SPAM
Here are some instructions on how to install SPAM on your Linux 64-bit system. If you want to install it on some other Unix-based system, you're on your own .
Download SPAM and dependencies
An installation of SPAM on Linux requires at least the following items:
- The latest SPAM package, found here
- SPAM support files, found here
- AIPS version 31DEC13 (LNX64 binary tarball with extras), found here
- ParselTongue version 2.3 (with changes), found here
- Obit core (LNX64 binary with changes), found here
The following necessary items are often already available on a standard scientific Linux installation:
- Python version 2.7 (plus C include files)
- Python packages: pylab / matplotlib, numpy, scipy, astropy
- gcc
- make
- swig
- optional: mencoder / mplayer (for making phase screen movies)
- optional: ImageMagick convert (for making phase screen movies)
Install SPAM
Make a new directory that will hold all spam software
In your Linux shell, type
cd <local software path> mkdir spam cd spam
Move the downloaded tarballs to here.
In your Linux shell, type
mv <download path>/AIPS_<version>.tgz . mv <download path>/parseltongue-<version>.tgz . mv <download path>/obit_<version>.tgz . mv <download path>/spam_<version>.tgz . mv <download path>/spam_etc_<version>.tgz .
Install SPAM support files
> tar xzf spam_etc_<version>.tgz
Edit setup file(s) and modify SPAM_PATH to point to <local software path>/spam, SPAM_HOST to your machine name in capitals, and PYTHON to point to your python2.7 executable
gedit setup.*sh
Next, run the setup file. In Linux bash (sh) this is done through:
. setup.sh
In Linux C-shell ([t]csh) this is done through:
source setup.csh
Install AIPS
In your Linux shell, type
tar xzf AIPS_31DEC13.tgz cd AIPS
These next two steps may not apply to you, but must be executed when you have installed and/or run AIPS locally.
mv ~/.AIPSRC ~/.AIPSRC_previous mv ~/.dadevs ~/.dadevs_previous
Then start the actual install
perl install.pl -n
Here's how to quickly get through the AIPS installation
screen 0: <enter> screen 4: <enter> screen 4b: <enter> screen 5: <e.g., your institute name in capitals (no spaces), and enter> screen 5a: <enter> screen 5b: <check that this is set to LNX64, and enter> screen 6: <enter> screen 7: <copy/paste suggested path and enter> screen 8: <2x enter> screen 9: <enter> screen 9B: <enter> screen 11: <2x enter>
And during installation: <3x enter>
Now we need to increase number of interactive AIPS sessions to 32. In your Linux shell, type n Linux bash (sh)
. LOGIN.SH
or in C-shell ([t]csh)
source LOGIN.CSH
Then
RUN SETPAR
In SETPAR
2 <enter> 10 <enter> 32 <enter> -1 <enter> AMANAGER <enter> 4 <enter>
Test AIPS by entering
aips tv=local
In AIPS POPS terminal, enter
11 <enter> print 2+2 <enter> kleenex <enter>
Exit AIPS directory
cd ..
Install Obit core
In your Linux shell, type
tar xzf obit_<version>.tgz
Install ParselTongue
In your Linux shell, type
tar xzf parseltongue-<version>.tgz cd parseltongue-<version> sh ./configure --prefix=${SPAM_PATH}/ParselTongue --with-obit=${SPAM_PATH}/Obit
This should return without errors (see below if it can't find obit). Then type:
make install cd ..
Install SPAM package
In your Linux shell, type
tar xzf spam_<version>.tgz cd python/spam
Edit the makefile so that the SWIGFLAGS and CCFLAGS point to the correct Python C header file directory (will contain Python.h; typically something like /usr/include/python2.7).
gedit makefile make cd ../..
And that's all folks!
Obit is missing?
The ParselTongue configuration may give you the following error message:
checking for Obit... missing
configure: error: Obit is not available
This is likely to be caused by a missing python package, not because Obit is missing (the script looks for Obit.so in the ${SPAM_PATH}/Obit/python/ directory. To find what is causing the problem, please do the following:
In bash:
export PYTHONPATH=${SPAM_PATH}/Obit/python:${PYTHONPATH}
Or in (t)csh:
setenv PYTHONPATH ${SPAM_PATH}/Obit/python:${PYTHONPATH}
Then
${PYTHON}
And in python:
import OSystem, OErr
Something will fail here, probably a missing python package or a missing library. Some of the missing libraries can be found here.