Last modified: December 2022

AHELP for CIAO 4.16


Context: Tools::Download


Automatically download and install MARX


install_marx  [installdir]


This script can be used to download and install the latest version of MARX. From the MARX website:

marx is a suite of programs created and maintained by the MIT/CXC/HETG group group and is designed to enable the user to simulate the on-orbit performance of the Chandra X-ray Observatory. marx provides a detailed ray-trace simulation of how Chandra responds to a variety of astrophysical sources and can generate standard FITS event files and images as output. It contains detailed models for Chandra's High Resolution Mirror Assembly (HRMA), the HETG and LETG gratings, and all the focal plane detectors.

marx can also use the SAOTrace ray files generated by ChaRT.

If users experience problems during the installation, please contact the MARX support team at Users can find instructions for how to run MARX on the MARX home page.

This script only works with the latest version of MARX. Users who require the a different version must install it manually.


unix% install_marx /soft/marx

The script will automatically download the version of MARX via FTP from the MIT site and the will build and install it from source. Users need to have standard compilers (ie gcc) installed along with either wget or the lwp-download.

--2015-12-14 12:54:03--
           => `marx-dist-5.2.0.tar.gz'
Connecting to||:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/cxc/marx/v5.2 ... done.
==> SIZE marx-dist-5.2.0.tar.gz ... 12018160
==> PASV ... done.    ==> RETR marx-dist-5.2.0.tar.gz ... done.
Length: 12018160 (11M) (unauthoritative)

2015-12-14 12:54:06 (4.87 MB/s) - `marx-dist-5.2.0.tar.gz' saved [12018160]

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out

Some users, especially Mac OSX, may need to set special environment variables depending on their setup (CC, CFLAGS, LDFLAGS, etc). Please consult the MARX installation page for assistance.

After successfully building and installing MARX users will be provided instructions on how to setup the package:

Builds are complete.  

For MARX documentation and support please visit

To setup for this installation:

setenv MARX_ROOT /soft/marx/marx-5.2.0
setenv MARX_DATA_DIR ${MARX_ROOT}/share/marx/data
setenv PATH ${PATH}:${MARX_ROOT}/bin
setenv PFILES ${PFILES}:$MARX_ROOT/share/marx/pfiles

These commands are scripted in 

(t)csh: source /soft/marx/setup_marx.csh
bash: source /soft/marx/


name type ftype reqd
installdir file output no

Detailed Parameter Descriptions

Parameter=installdir (file not required filetype=output)

Installation directory

The top level directory to install MARX. The actual installation will be in a version-numbered sub-directory.

If no directory is specified, the script will attempt to install marx into CIAO's $ASCDS_INSTALL root directory.

Changes in the scripts 4.15.2 release (April 2023)

Updated to remove dependency on deprecated distutils module.

Changes in scripts 4.13.2 release (June 2021)

Create a "marx" symbolic link to the version specific installation directory (eg "marx-5.5.1").

Changes in scripts CIAO 4.11.5 (October 2019) release

Change the (t)csh setup script to work around bug in conda environment.

Change in scripts CIAO 4.11.2 (April 2019) release

Run make clean after successful installation.

Changes in scripts CIAO 4.10.1 (April 2018) release

Updated to make sure that bash shell is used due to incompatibility with dash shell.

Changes in the scripts 4.9.2 (April 2017) release

Fix for a problem when using Python 3.

Changes in scripts CIAO 4.8.4 (September 2016) release

Corrects the export of the MARX_DATA_DIR environment variable in the bash setup script.

Changes in scripts CIAO 4.8.3 (April 2016) release

The script will now try to install the latest version of MARX available on the MARX FTP site.

If no installation directory is supplied, the script will try to install MARX into CIAO root directory, $ASCDS_INSTALL.

Users are now prompted to continue before the installation occurs.

About Contributed Software

This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see this page for installation instructions.


See Also

aconvolve, acrosscorr, arestore, dmfilth, dmregrid
arfcorr, make_psf_asymmetry_region, psf_project_ray, simulate_psf, src_psffrac