Skip to content
Official repository for shadow3 (x-ray-tracer engine)
Fortran Python C Makefile Shell C++ Other
Branch: master
Clone or download
Latest commit 0e68eec Jul 29, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
Shadow added fwhm_subpixel Jul 29, 2019
data reorganised file structure - added from Rob Nagler Dec 11, 2015
docs fix Apr 12, 2018
examples removed forgotten STOP; some cleaning; PRIMER back to work Jan 14, 2016
src merging windows Apr 14, 2019
tests added Jan 23, 2017 Update Jun 5, 2018 reorganised file structure - added from Rob Nagler Dec 11, 2015 merging windows Apr 14, 2019



  1. What is SHADOW
  2. Download
  3. Source files
  4. Building SHADOW
  5. Other info
  6. Contact

1 What is SHADOW

SHADOW is an open source ray tracing code for modeling optical systems.

Targeted to synchrotron radiation beamlines, it has unique features for designing X-ray optical systems.

For more info, please read this paper (open access):

SHADOW3: a new version of the synchrotron X-ray optics modelling package M. Sanchez del Rio, N. Canestrari, F. Jiang and F. Cerrina Journal of Synchrotron Radiation Volume 18, Part 5 (September 2011)

If you are (or want to be) a SHADOW user, it is recommended that you use a user interface. We strongly recommend OASYS (

2 Download

SHADOW3 sources are downloaded using git:

git clone

Other SHADOW web resources:

3 Important files

  • in shadow3/src: fortran, C and other sources

  • in Shadow: python sources

  • in docs: README files:

    • README_API.txt
    • README_CRL.txt
    • README_MPI.txt
    • source.nml (description of the source variables, as in start.00)
    • oe.nml (description of the optical element variables, as in start.01)
  • in data: data files:

    • PRELIB1.DAT and PRELIB2.DAT (data file containg the oprical library)

4 Building SHADOW


cd src
# Check (edit) the Makefile if you need to redefine compilers etc.
# The use of Makefile is documented in its header. Basically:
make           : builds shadow3 the main program
make all       : builds shadow3, libraries, etc
make install   : installation (see Makefile)

python API:

in shadow3 directory, use the standard python setup:

python3 build
pip install .

5 Other info

For python users, some wheels are available:

6 Contact

SHADOW is currently maintained by Manuel Sanchez del Rio (

You can’t perform that action at this time.