Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The first part including the '''%I''' information tag signifies who wrote the component and where.


* McStas, neutron ray-tracing package
* Copyright 1997-2002, All rights reserved
* Risoe National Laboratory, Roskilde, Denmark
* Institut Laue Langevin, Grenoble, France
* Component: Slit
* %I
* Written by: Kim Lefmann and Henrik M. Roennow
* Date: June 16, 1997
* Version: $Revision: 4382 $
* Origin: Risoe
* Release: McStas 1.6
Next, some descriptive text is added, including the '''%D''' description tag.
* Rectangular/circular slit with optional insignificance cut
* %D
* A simple rectangular or circular slit. You may either
* specify the radius (circular shape), or the rectangular bounds.
* No transmission around the slit is allowed.
* If cutting option is used, low-weight neutron rays are ABSORBED
* Example: Slit(xmin=-0.01, xmax=0.01, ymin=-0.01, ymax=0.01)
* Slit(radius=0.01, cut=1e-10)
The '''%P''' tag indicates component input parameters, defining e.g. physical properties and geometry of the component.
* %P
* radius: Radius of slit in the z=0 plane, centered at Origo (m)
* xmin: Lower x bound (m)
* xmax: Upper x bound (m)
* ymin: Lower y bound (m)
* ymax: Upper y bound (m)
* xwidth: Width of slit. Overrides xmin,xmax. (m)
* yheight:Height of slit. Overrides ymin,ymax. (m)
* Optional parameters:
* cut: Lower limit for allowed weight (1)
* %E


The optional '''%L''' tag can be used for attaching links to other information - and '''%E''' ends the commentary section.

Next follows some important lines of code that are mandatory for components:_____________


Defines the component type (here Slit) - and must match the filename under which the component is stored, i.e. Slit.comp