SAS Installation - XMM-Newton
The SAS software is distributed in a single tgz archive that includes the shell script install.sh, used to install it. For each Operating System where the SAS was built, the single file has a name of the form sas_vers-OS.tgz, where vers is the numeric version, e.g. 18.0.0, and OS is combination of the acronym of the Operating System, its version and processor type, either 32 or 64-bit. For example, sas_18.0.0-RHEL6.8-64.tgz corresponds to SAS 18.0.0 built on Red Hat Enterprise Linux 6.8 64-bit, sas_18.0.0-Darwin-16.7.0-64.tgz corresponds to SAS 18.0.0 built on Mac OS X 10.12.6 64-bit (a.k.a. Sierra or alternately Darwin 16.7.0 64-bit), etc.
SAS can also be distributed as a Virtual Appliance, a Linux-based Virtual Machine where SAS 18.0.0 and other tools like Heasoft, ds9, Grace, etc, have been installed and are ready to use. This package is named Virtual Machine for SAS (VM4SASNN) where NN represents the version of SAS. For example VM4SAS18 is the Virtual Machine for SAS 18.0.0.
The Tables shown in the download page list all the builds being distributed with this release. On the same page, we give you some tips to help you choose the most suitable build to download and install on your Operating System.
To work with the SAS you must install some additional tools. On this page you can find detailed information on which tools you need and the versions we recommend to install.
Please take into account that to process your data with SAS you will need also the full set of calibration data files known as Current Calibration Files (CCF). On this page you can find information on how to download and install these files.
First download the most appropriate tgz archive for your Operating System from the Tables provided in the download page. Then, move it to any directory of your choice where you want to install the SAS. For example, let this be /top_dir (e.g. /usr/local/SAS/ or /Users/SAS).
Next, unpack the tgz archive with the command
tar zxf sas_18.0.0-OS.tgz
and inmediately after, run the install.sh script as follows
and let it run until completion.
The installation script will check for the presence of the required components that were unpacked from the single tgz file according to an installation manifest named sas_vers_install_manifest-OS.txt.
The installation script puts the SAS binaries, libraries and documentation in a directory named xmmsas_20190531_1155 below /top_dir, and finally runs the script configure_install that will create, in the same directory, two scripts named setsas.sh and setsas.csh. These scripts can be used later on to intialize the SAS.
The script configure_install looks for Perl in expected locations on your system (/usr/local/bin/perl, /usr/bin/perl, /opt/local/bin/perl and /sw/bin/perl). If a valid Perl binary is found on any of these places, the script uses it to replace the Perl written in the first line of all SAS Perl scripts. If none of them is found, the configure_install script warns you about the problem and exits without completing the installation process. Then, you must install Perl in your system and run again the configure_install script.
To force the configure_install to look for your own particular installation of Perl, e.g. in /home/user/my_perls/perl-5.24.1/bin/perl, you can define the environment variable SAS_PERL, to point to such Perl binary. We recommned to define SAS_PERL before starting the installation of SAS.
SAS Python based tasks require Python 3.6.2 and specific Python modules, all of them managed by the Miniconda 4.3.31 module manager, within a specific environment. The configure_install script is also responsible to check and install all these components.
Depending on your shell, to initialize the SAS, please source either setsas.sh or setsas.csh, as follows:
. /top_dir/xmmsas_20190531_1155/setsas.sh (sh/bash/ksh)
source /top_dir/xmmsas_20190531_1155/setsas.csh (csh/tcsh)
The setsas.[c]sh scripts setup properly the shell environment to run the SAS in your operating system except for the SAS_CCFPATH, the SAS_ODF and the SAS_CCF environment variables. These must be defined specifically to work with the XMM-Newton data that you want to analyze with the SAS.
Before SAS is initialized, the HEASOFT software must be already initialized, otherwise the initialization of SAS issues an error message and it is aborted.
Regarding Python, the setsas.(c)sh scripts either set the PYTHONPATH environment variable to the directory that includes all modules required by SAS Python based tasks or prepends such directory to the already existing list of directories.