McXtrace logo

McXtrace - An X-ray ray-trace simulation package

Synchrotron SOLEIL DTU Physics

McXtrace

About McXtrace
 Publications
 Project Partners
 Project People
 Goal

Download
 Components

Documentation
 Manual
 Commands
 Wiki (GitHub)
 Tutorial

Mailing list

Links

Search

Code-repository (GitHub)

Report bugs (GitHub)


The Slit McXtrace Component

4.2  The Slit McXtrace Component

Rectangular/circular slit

Identification

  • Author: Erik Knudsen

  • Origin: DTU Physics

  • Date: June 16, 2009

Description

Based on Slit-comp by Kim Lefmann and Henrik Roennow A simple rectangular or circular slit. You may either specify the radius (circular shape), which takes precedence, or rectangular bounds. No transmission around the slit is allowed.

Example: Slit(xmin=-0.01, xmax=0.01, ymin=-0.01, ymax=0.01) Slit(radius=0.01)

Input parameters

Parameters in boldface are required; the others are optional.

Name

Unit

Description

Default

xmin

m

Lower x bound.

0

xmax

m

Upper x bound.

0

ymin

m

Lower y bound.

0

ymax

m

Upper y bound.

0

radius

m

Radius of slit in the z=0 plane, centered at Origin.

0

xwidth

m

Width of slit. Overrides xmin,xmax.

0.001

yheight

m

Height of slit. Overrides ymin,ymax.

0.001

dist

m

Distance from slit plane to plane containing resampling target.

0

focus_xw

m

Width of resampling window.

0

focus_yh

m

Height of resampling window.

0

focus_x0

m

Centre (x) of resampling window.

0

focus_y0

m

Centre (y) of resampling window.

0

Links

  • Component source code found in file Slit.comp.

A beam defining diaphragm

The component Slit is a very simple construction. It sets up an opening at \(z=0\), and propagates the photon rays onto this plane (by the kernel call PROP_Z0). Photons within the slit opening are unaffected, while all other photons are discarded by the kernel call ABSORB.

By using Slit, some photons contributing to the background in a real experiment will be neglected. These are, for instance, the ones that scatter off the inner side of the slit, penetrate the slit material, or clear the outer edges of the slit.

The opening of the slit is determined by specifying either a radius, a width (xwidth) and a height (yheight), or absolute limits in \(x\) and \(y\) (xmin, xmax, ymin, ymax), in order of precedence. If radius is set, the opening is considered circular.

Slit may be used to model slit diffraction, thourgh judicious use of the resmapling parameters: focus_xw,focus_yh, focus_x0, focus_y0. The similarity in parameter naming for sources (chapter 3) is intentional as computationally the processes are the same. If present the focus parameters cause the ray to be regarded as a Huygens wave and a new direction going towards the resampling window is computed. The resulting difference in phase gives rise to maxima and minima as expected. This feature should be used with care: the further away from the optical axis, the more statistics and finer binning is needed to get meaningful results. Please refer to [BK+13] for more deatils.


Last Modified: Monday, 05-Oct-2026 10:48:08 CEST
Search website mailinglist archive GitHub repos