SAS Installation and initialisation

 

Introduction

The SAS software is distributed in a single tgz archive for each Operating System where it was built. The archive filename has the format sas_m.n.p-OS.tgz, where m.n.p is the version number and OS is a string combining Operating System name and version.

Examples:

  • sas_19.0.0-macOS-10.15.7.tgz which contains SAS 19.0.0 built on macOS 10.15.7 (a.k.a. Catalina)
  • sas_19.0.0-Ubuntu18.04.tgz which contains SAS 19.0.0 built on Ubuntu 18.04LTS.

     

SAS is also distributed in a Linux-based Virtual Machine, where it is installed together with some tools like Heasoft, ds9, Grace, etc, ready to use. The package is dubbed Virtual Machine for SAS (VM4SASNN) where NN is the major version of SAS, e.g. VM4SAS19 is the Virtual Machine for SAS 19.0.0.

For each release, this Table shows the SAS builds available for download, including VM4SASNN. On the same page, the read of section "Which SAS should I take? might help you choose the most suitable build for your Operating System.

To work with SAS you must install some tools. Find here detailed information on these tools.

To process XMM-Newton Observations with SAS you will need also the full set of calibration data files known as Current Calibration Files (CCF). You can find information on how to download and install these files here.

Finally, directions on how to install and use the VM4SAS19 can be found here.

Installation procedure

Let us get started by choosing properly the most appropriate SAS build according to the Operating System you are working on. Please read carefully the hints included in here before clicking on any download link shown in the accompanying Table. Once you have made up your choice, click on the selected link to start downloading the single tgz archive.

 

Now move onto any directory of your choice where you want to install the SAS, e.g. let it be /top_dir.

Next, unpack the tgz archive with the command

tar zxf sas_19.0.0-OS.tgz

Inmediately after, run the install.sh script as

./install.sh

The installation script checks for the presence of the required components of SAS and unpacks them into binaries, libraries and documentation in a directory named xmmsas_20201028_0905 below /top_dir. It finishes running a script named configure_install which checks for the exixtence in your system of an installation of Perl and Python. Regarding perl it looks whether the variable SAS_PERL is defined and points to a perl binary which must be available through the PATH.

Similarly, it checks whether a python binary with version >=3.6 is available through the PATH. In case any of the two conditions is not fulfilled, the script complains and stops the installation. Once the missing component is provided, to complete the installation you must run again configure_install.

The installation is complete when configure_install creates, in the same directory, two shell scripts named setsas.sh and setsas.csh which are aimed for intializing the SAS.

 

Initialisation

Depending on your shell, you can initialise SAS sourcing either setsas.sh or setsas.csh

source /top_dir/xmmsas_20201028_0905/setsas.sh (sh/bash/ksh)

source /top_dir/xmmsas_20201028_0905/setsas.csh (csh/tcsh)

The setsas.[c]sh scripts configure properly your shell environment to run any SAS task in your operating system except for the variables SAS_CCFPATH, SAS_ODF and SAS_CCF. You must define SAS_CCFPATH to point to the directory where you have stored the Calibration Files. SAS_CCF and SAS_ODF must be defined specifically for the XMM-Newton Observation you have chosen to analyze with SAS.

Some SAS tasks use Heasoft FTOOLS which forces us to initialise Heasoft before SAS. Any attempt to initialise only SAS will fail with an error message.