[Neutron] McStas and McXtrace 3.7.1 released

Peter Kjær Willendrup pkwi at dtu.dk
Fri May 22 09:53:22 CEST 2026


A new version of McStas and McXtrace, v3.7.1 has been released.
Installation instructions

  *   For McStas go to The McStas install page on GitHub<https://github.com/mccode-dev/McCode/tree/main/INSTALL-McStas>
  *   For McXtrace go to The McXtrace install page on GitHub<https://github.com/mccode-dev/McCode/tree/main/INSTALL-McXtrace>

What's Changed
Main new developments:
Common McStas and McXtrace developments:

  *   Up to 10 USERVARS supported with Monitor_nD (named user0,...,user9)
  *   Qt5 -> Qt6 across the package and dependencies
  *   Bugfix: Fix of rare visualisation bug in mcdisplay/mxdisplay (e.g. box was not allowed as a comp name)
  *   Doc improvements:
     *   mcdoc/mxdoc can render .tex and .md in addition to .html
     *   Example instruments come with an in-repo README.md generated via this mechanism
     *   See e.g. McStas BNL_H8<https://github.com/mccode-dev/McCode/tree/main/mcstas-comps/examples/BNL/BNL_H8/README.md> or McXtrace ESRF ID01<https://github.com/mccode-dev/McCode/tree/main/mcxtrace-comps/examples/ESRF/ESRF_ID01/README.md>
  *   CI/test improvements:
     *   mcdisplay/mxdisplay visualisation is performed as part of mctest/mxtest runs (-> CI)
     *   See top html files in McStas<https://new-nightly.mcstas.org/todays-datafiles/> and McXtrace<https://new-nightly.mcxtrace.org/todays-datafiles/> nightly test runs

McStas specific developments:

  *   Integrated support for KDSource<https://github.com/KDSource/KDSource/releases/tag/v0.2.2>
     *   New component KDSource
     *   For usage details, see example instrument Test_KDSource<https://github.com/mccode-dev/McCode/tree/main/mcstas-comps/examples/Tests_MCPL_etc/Test_KDSource/README.md> and the KDSource documentation website<https://kdsource.readthedocs.io/en/latest/>
     *   Available as automatic dependency on conda-forge based installations (including macOS and Windows 'installers'
     *   Not available as .deb package on Debian systems but may function by installing via pip.
Recommendation: Just use conda-forge.
  *   Pulse-length adjustment available for ESS_butterfly
     *   Handled via specifically named instrument input parameter and DEPENDENCY line
     *   See example instrument ESS_butterfly_Adjustable_Pulse<https://github.com/mccode-dev/McCode/blob/main/mcstas-comps/examples/ESS/ESS_butterfly_Adjustable_Pulse/README.md>
  *   PowderN now supports NCrystal cfg-strings.
     *   Forwards request to NCrystal that populates datastructures without intermediate .laz/.lau files
     *   See example instrument Test_Powders<https://github.com/mccode-dev/McCode/blob/main/mcstas-comps/examples/Tests_samples/Test_Powders/README.md> - comp=0 mode
  *   Bugfixes:
     *   Fix to Union, orientation of loggers wrt. master comp
     *   Bugfixes to recently added improved Union mesh
  *   Contributions from NBI/KU:
     *   Inhomogenous_incoherent_process in Union from @Lomholy<https://github.com/Lomholy>, (via ‘tinyexpr' string-expression inputs) - see rel. test instrument<https://github.com/mccode-dev/McCode/blob/main/mcstas-comps/examples/Tests_union/Test_inhomogenous_process/README.md>
     *   New spinwave comp SpinWave_BCO from @SSBNS<https://github.com/SSBNS> - see rel. test instrument<https://github.com/mccode-dev/McCode/blob/main/mcstas-comps/examples/Tests_samples/Samples_SpinWave_BCO/README.md>
     *   ESS KVASIR instrument proposal<https://github.com/mccode-dev/McCode/tree/main/mcstas-comps/examples/ESS/ESS_KVASIR/README.md> - backend instrument with MCPL input from BIFROST optic. @AmalieFalkenberg<https://github.com/AmalieFalkenberg>. Includes Jupyter notebook in McStasScript syntax.
  *   McStas component manual uses .tex snippets from generated via components mcdoc

McXtrace specific developments:

  *   Much improved Union subsystem for McXtrace<https://github.com/mccode-dev/McCode/tree/main/mcxtrace-comps/union> by @ebknudsen<https://github.com/ebknudsen>. Makes use of Xraylib<https://github.com/tschoonj/xraylib/wiki> for Compton and Rayleigh scattering models.
  *   Test instruments for the new Union processes, both from @ebknudsen<https://github.com/ebknudsen>
     *   PowderCompton_union<https://github.com/mccode-dev/McCode/blob/main/mcxtrace-comps/examples/Tests_union/PowderCompton_union/README.md> - Compton scattering and powder diffraction
     *   Test_KN_Comp_Rayl_union<https://github.com/mccode-dev/McCode/blob/main/mcxtrace-comps/examples/Tests_union/Test_KN_Comp_Rayl_union/README.md> - test instrument using Klein-Nishina, Rayleigh, or Compton
scattering processes.

New Contributors

  *   @SSBNS<https://github.com/SSBNS> made their first contribution in #2373<https://github.com/mccode-dev/McCode/pull/2373>
  *   @AmalieFalkenberg<https://github.com/AmalieFalkenberg> made their first contribution in #2345<https://github.com/mccode-dev/McCode/pull/2345>

Full Changelog: v3.6.14...v3.7.1<https://github.com/mccode-dev/McCode/compare/v3.6.14...v3.7.1>

Best regards on behalf of McStas/McXtrace,

Peter Kjær Willendrup
Forskningsingeniør, Specialkonsulent

DTU Physics

[image001.gif]


Technical University of Denmark


[image002.gif]


Department of Physics
Fysikvej
Building 307
DK-2800 Kongens Lyngby

Main office at
ESS DMSC
Building 305
DK-2800 Kongens Lyngby

Direct +45 2125 4612
Mobil +45 2125 4612
Fax +45 4593 2399
pkwi at fysik.dtu.dk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.neutronsources.org/pipermail/neutron/attachments/20260522/310328bd/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 58 bytes
Desc: image001.gif
URL: <https://lists.neutronsources.org/pipermail/neutron/attachments/20260522/310328bd/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1055 bytes
Desc: image002.gif
URL: <https://lists.neutronsources.org/pipermail/neutron/attachments/20260522/310328bd/attachment-0001.gif>


More information about the Neutron mailing list