SAS Requirements - XMM-Newton
Software and Tools required to work with SAS
Table 2 shows the software and tools required to work with SAS 20.0. Column Version shows the versions used in the build of SAS 20.0, column Web page includes the URL to get the specific software or tool and column Comments provides specific hints or links to addtional information you should consider to work with the software or tool.
|X11||Provided by building OS||
Latest version is 3.10.0.
Binaries ready to install for Linux, macOS, Windows, etc.
|Detailed description on the SAS 20.0 Python environment can be found below.|
|Perl||5.30.1||perlbrew will help you to download and install it.||Detailed description on the SAS 20.0 Perl environment can be found below|
|ds9||8.2.1 or later||SAOImage ds9 download site.||
|Grace||5.1.25||The Grace web site provides only the source code.||
Installation from source code is difficult. However, both CentOS and Ubuntu provide binary packages which are easily installed.
|Heasoft||6.29||Binaries and source code available from Heasoft web site.||Details on how to build Heasoft from source code to be compatible with SAS 20.0 can be found below.|
|WCSTools||3.9.6||The WCSTools web site provides only the source code.||Easy to build from source code. Please do not install WCStools v3.9.5 because its scat tool does not work when going to download data from internet, e.g. by setting the UB1_PATH environment variable to query the USNO Catalogue.|
Some SAS tasks are Perl scripts, e.g emchain, epchain, omichain, etc. In order to run, they require that a proper Perl be installed in your system and be available through the PATH environment variable.
Before installing SAS 20.0, please install Perl 5.30.1 using the perlbrew tool. Then, before running the SAS 20.0 install.sh script, define the environment variable SAS_PERL to point to the Perl 5.30.1 binary provided by such installation.
All SAS 20.0 Perl tasks search for the perl binary using /usr/bin/env in the first line of the script (she-bang). The SAS installation script configure_install ensures that all SAS 20.0 Perl task's she-bangs use that mechanism to find in PATH, the right Perl binary.
Given that Heasoft includes also Perl tasks, please ensure that the installation of this software, either from source code or from pre-built binaries, uses the same Perl 5.30.1 used for SAS 20.0. That is accomplished by defining the PERL environment variable to point to such binary, before building or installing Heasoft.
The following Perl modules are also required:
The installation of these modules can be done using the CPAN module included with perl 5.30.1, as follows
perl -MCPAN -eshell
where perl should be the same binary used to work with SAS 20.0.
The SAS 20.0 initialisation scripts created during the installation take care of the proper initialization of the standard Perl environment variables PERL5LIB and PERLLIB.
Besides Python 3.8.2 or later, the following Python packages are required to work with SAS 20.0
- astroquery>=0.4.3 (v0.4.3 is mandatory !)
All these packages can be installed by means of pip, the Python package installer, one by one or at once by means of file sas_20.0.0_python_packages.txt, which is included in the SAS 20.0 root installation directory. To perform the installation of all these packages, you can use the following command
pip install -r sas_20.0.0_python_packages.txt
Before doing it, please ensure that Python 3.8.2 (or later) is available through the PATH.
At difference with Perl, for Python it is not necessary to define a SAS_PYTHON environment variable. However, like perl, python must be available through the PATH, to be used from any SAS 19 Python task's she-bang.
SAS initialisation scripts created during installation take care of the proper definition of the standard Python environment variable PYTHONPATH.
Although we recommend installing the required Python packages listed earlier using pip, there are other tools like miniconda, anaconda, etc, which can be used as well to create a proper Python environment.
Although a binary installation of Heasoft is sufficient to work with SAS, if you build it from source code --e.g. because you want to compile new Xspec models-- to make such build fully compatible with SAS 20.0, please do not forget to define both, the PERL and the PYTHON environment variables, to point to the Perl 5.30.1 and the Python 3.8.2 (or later) binaries used to work with SAS 20.0.
The installation of Grace from source code on macOS can be done using different software tools. Good examples are Macports and homebrew. However, we have found that Qt Grace 0.2.6 binaries provide an excellent quick and easy alternative to these methods, while getting the same functionality.
Once downloaded from the web site indicated in Table 2, please install the dmg package as usual on macOS. The qtgrace.app will be available as an standard application in the /Applications folder. However, SAS is not prepared to work with it but with something named xmgrace, available from the command line. Then you must create the xmgrace command line application by executing the following commands from a standard terminal:
sudo ln -s qtgrace xmgrace
To complete the installation you must add the /Applications/qtgrace.app/Contents/MacOS directory to your PATH.
Qt Grace is not an X11 application, therefore you will not get its GUI when running it remotely through ssh.