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

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


McStas:

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

The Instrument

Regression test of the NeXus writer of the McCode runtime.

Identification

  • Site: Tests_other
  • Author: Peter Willendrup
  • Origin: DTU
  • Date: October 2026

Description

Monitors of every NeXus output kind (0D, 1D, 2D, Monitor_nD histogram,
Monitor_nD BINS maps of rank 2 and 3, and an event list) for
test_nexus_output.py, which runs this instrument with --format=NeXus,
serial and with MPI, and checks mccode.h5 with h5py:

- string values containing '%' are stored as given (instrument parameter
'tag', component parameter literal 'filename="f%%1"')
- all string attributes and data sets are printable text
(no uninitialised memory, e.g. in the Monitor_nD BINS output)
- no debug output on stdout
- a monitor with a very long file name ('longname', about 1000
characters) does not crash the simulation or lose other monitors
- a second run with --append adds entry2 to mccode.h5

The instrument also runs in the default (McCode) format.

Examples

(Test cases in bold)

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault

Links

  • Source code for Test_NeXus_output.instr.
  • test_nexus_output.py next to this instrument.

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

Generated for mcstas 3.10.0


Last Modified: Friday, 23-Oct-2026 18:32:10 CEST
Search website mailinglist archive GitHub repos