Chandra X-Ray Observatory
Skip to the navigation links
Last modified: 11 September 2015


PSF Central

Modeling the Chandra PSF

The most advanced method for characterizing the properties of the Chandra PSF is by simulating the PSF of the optics from the HRMA via ray tracing techniques in order to obtain a good model of the Chandra PSF for a given observation.

There are two primary means to simulate the HRMA PSF: SAOTrace (formerly SAOSAC) and the Model of AXAF Response to X-rays (MARX).

  • SAOTrace is a flexible system used to simulate the as-built X-ray optics with on-ground calibration by ray tracing; it is directly derived from the engineering tools used to design Chandra. While users can install SAOTrace on a local system for the greatest control and customization, the primary means most users will use SAOTrace is through the web-based interface Chandra Ray Tracer (ChaRT). ChaRT is based on the most detailed physical model of the mirror geometry. This level of detail is especially important for off-axis sources or to study the wings of the PSF out to several arcseconds; and the latest version can incorporate an aspect solution which is necessary to treat sub-pixel effects, which are important for the shape of the PSF within ~1 arcsec.

  • MARX is a suite of executables that is fairly easy to compile, allowing users to quickly run a large number of ray tracing simulations on a local system; MARX-generated rays can also be used to perform sub-pixel analysis. While the MARX model uses a slightly simplified (and faster) description of the HRMA, this is often sufficient for most simulations; if more detail is required, MARX can be used to project simulated HRMA rays produced by SAOTrace on to a detector-plane, accounting for detector effects. MARX was created as a PSF simulator, and not an observation simulator; therefore, not all CIAO tools are currently guaranteed to work on MARX simulated events files.

    The most recent detailed comparison of the PSFs produced by MARX v4.3 and SAOTrace v1 can be found in the Appendix of Primini et al. (2011), Statistical Characterization of the Chandra Source Catalog .

Ray Tracing and PSF Caveats

The ChaRT "PSF Issues and Caveats" page includes a variety of information on ChaRT, SAOTrace, and MARX; as well as general information about PSFs.

If a high fidelity model of the PSF is not required by the scientific goal of the analysis, a third method exists:

  • The CIAO arfcorr tool can be used to generate an image of a simulated, circularly symmetric, mono-chromatic PSF. The PSF is derived to have have the correct encircled counts fraction at each radius, using the CalDB enclosed counts fraction for a given input energy. A detailed description of the algorithm used to generate the approximate PSF image can be found in the tool's ahelp file.

The table below shows a quick comparison between the different modeling tools.

SAOTrace ChaRT MARX arfcorr

user interface

command-line web interface to SAOTrace command-line command-line

how to obtain?

download → compile → install locally or via install_marx web-based, no installation required download → compile → install locally CIAO tool

how many sources?

multiple sources individual point sources multiple sources individual point sources

current limitations

does not run on the latest Linux and Mac platforms cannot (yet) deal with dither or sub-pixel resolution does not include all of the fine HRMA details only mono-chromatic sources supported


flexible and powerful; definitive HRMA model very easy to use high fidelity, and yet easy to use; portable; includes models for HRMA, gratings, and detectors simple, quick tool


complex installation and usage; only includes the HRMA model need to wait for output not as high-fidelity as SAOTrace for HRMA circular approximation of the PSF

From PSF Model to an Events File

The HRMA ray tracing simulations produce files that must be projected to a detector-plane and include blurring effects in order to visualize the Chandra PSF. MARX-generated rays are generally projected in tandem with the ray tracing run. In the case of SAOTrace/ChaRT results may be projected using MARX on to an instrument-specific detector-plane (including gratings arms), or to a semi-infinite detector-plane with the psf_project_ray CIAO tool.

The psf_project_ray tool produces an events file as output, while the marx2fits routine should be used after running a MARX simulation to obtain an events file.

[Thumbnail image: schematic of tools used to model a PSf and generate an events file]

[Version: full-size]

[Print media version: schematic of tools used to model a PSf and generate an events file]

Procedures from Ray-Tracing to Events File

A schematic view of the PSF modeling paths: while MARX can be used both for ray tracing and projecting onto a detector-specific plane, the rays produced by SAOTrace or ChaRT need an extra step to be projected on a detector-specific plane (via MARX) or on a semi-infinite detector-plane (psf_project_ray). The psf_project_ray tool produces an events file as output, while the marx2fits routine should be used after running a MARX simulation to obtain an events file.

Examples of using these packages and tools to simulate and project a PSF, as well as its direct analysis use, may be found in the PSF Simulations Analysis threads.

mkpsf and the PSF library

mkpsf is a now deprecated tool that was used to construct a PSF image—by interpolating data contained in the now deprecated PSF library—for defined sky coordinates on to a given detector array and energy.

The PSF library consisted of a set of data hypercubes containing PSF-model images with pixel sizes smaller (or equal to) the instrument pixels sizes for a set of energies and defocus positions. If the requested energy and/or coordinates do not match exactly the available information in the library file, mkpsf linearly interpolates between the PSF model images in the hypercube. If the energy or position lie outside of the boundaries of the hypercube, the closest energy or position is used.

The PSF derived with mkpsf from the standard PSF library files were by no means the "exact" PSF needed for detailed analysis or for deconvolution, as would be obtained by a realization of the observation by a full raytrace simulation. The grids used by mkpsf on the PSF library were very coarse (azimuth and elevation angular off-sets of 1 arcmin or 5 arcmin, only five energies, and only one defocus position) to interpolate from these grids to get a PSF for the off-axis angle and the energies (spectrum) of the observed source, and even if a user-defined interpolation scheme was provided, the derived PSF was still insufficiently detailed for scientific analysis.

Below is a summary of the Chandra PSF modeling tools and related threads.

Tool/Script Description Related Threads

ChaRT v2 & SAOTrace

Produces the best non-sub-pixel PSF for a point source at any off-axis angle and for any mono-chromatic energy or spectral energy distribution using the best calibration data available.


A suite of tools to run a large number of ray tracing simulations on a local system. May be obtained and installed using the install_marx script.


Tool used to determine the approximate PSF fraction enclosed by a region and can apply a correction to an ARF. Alternate mode generates an image of a mono-chromatic, circular PSF for a given sky position derived from the integrated enclosed counts fraction.

[Thumbnail image: comparing observation with arfcorr-PSF]

[Version: full-size]

[Print media version: comparing observation with arfcorr-PSF]

arfcorr-Generated Mono-Chromatic Circularly Symmetric PSF

An on-axis point source (left) and its corresponding circularly symmetric, 2.3 keV PSF generated by arfcorr.


Used for visualization; takes the rays generated by ChaRT/SAOTrace and projects them on to a semi-infinite detector plane.

Last modified: 11 September 2015
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2019. All rights reserved.