McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


McStas: chopper_display

[ Identification | Description | Examples | Input parameters | Links ]

The chopper_display Instrument

Draw a NXdisk_chopper, to check its MCDISPLAY rendering.

Identification

  • Site:
  • Author: Gregory Tucker
  • Origin: European Spallation Source ERIC
  • Date: 2026

Description

Three discs in a line, exercising the cases the display has to get right:
a turning disc with two unevenly spaced openings, a parked disc (drawn turned
to its park angle), and a disc hanging above its beam.

Nothing is simulated -- one ray is enough, because the point is the drawing.

Run it two ways and compare:

mcstas-antlr chopper_display.instr
./chopper_display.out --trace   -n 1    # circles and a spoke, the old rendering
./chopper_display.out --trace=2 -n 1    # a triangulated polygon per disc

The second prints one `MCDISPLAY: polyhedron { ... }` line per disc, in the JSON
`mcdis_polygon` builds for `mcdis_polyhedron`. To check one by hand:

./chopper_display.out --trace=2 -n 1 \
| grep '^MCDISPLAY: polyhedron' | head -1 \
| sed 's/^MCDISPLAY: polyhedron //' | python3 -m json.tool | head

Or view it: `mcdisplay-webgl chopper_display.instr` (any mcdisplay backend that
understands the polyhedron directive).

Examples

(Test cases in bold)

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault
nuHzrotation frequency of the first two discs14

Links


[ Identification | Description | Examples | Input parameters | Links ]

Generated for mcstas 3.8.4


Last Modified: Friday, 11-Sep-2026 15:00:09 CEST
Search website mailinglist archive GitHub repos