November 3rd, 2026: New GitHub-based websites, in-sync Debian packages
Dear all,
Following issues with the DTU-based McStas/McXtrace websites and the mccode.org Debian package repo, a quick resurrection-operation was performed yesterday:
A new Debian repository has replaced the old mccode.org-based repo, to transition please follow instructions at https://mccode-dev.github.io/debian/
From the new McStas/McXtrace 3.10.2 (see below) and forward:
all platforms are released together (automatically) and includes
conda-forge releases
Just a usual (platforms arr Linux x86_64 and arm64, macOS x86_64 and arm64, Windows x86_64)
Debian packages in the new Debian-repo
supplemented by archives for x86_64 and arm64 directly on the GitHub release
macOS-bundles
fully conda-based, are available directly on the GitHub release
Windows installers
available directly on the GitHub, MSVC version is fully conda-based, MinGW version partly conda-based
Going forward we will lower the number of release-announcements and instead summarise main work done ~ once pr. quarter.
This will likely be in connection with new major/minor-number releases such as the future 3.11.0 and 4.0.0.
November 2nd, 2026: Changes in McStas/McXtrace 3.10.2
Covers all changes since 3.10.0, including those already released in 3.10.1.
Highlights
NeXus output on native HDF5: McCode now writes NeXus files directly with HDF5, replacing the frozen NeXus API library (napi/libNeXus), which is no longer a dependency. NeXus support only needs HDF5. NeXus output can now also be plotted with mcplot, mcplotdiff and mccoplot, and MPI NeXus scans keep every step's events. By @willend.
Planar monitors restore the ray on a miss: about 40 simple monitors in McStas and McXtrace (PSD_monitor, L_monitor, E_monitor, TOF_monitor, ...) now leave rays that miss them unchanged, as Monitor_nD already did. Previously such rays could be lost. In McXtrace, ALLOW_BACKPROP is now honoured as in McStas, so some rays that used to be absorbed now survive. Note: results can change slightly. By @willend (fixes #2906).
Corrected sample physics: Phonon_simple and the Union PhononSimple_process now scale the one-phonon cross-section as in Squires (eq. 3.120), giving about 12.7 times higher intensity than before. The Union IncoherentPhonon_process gets the correct ray weight normalisation and its three-phonon total cross-section, Multilayer_Sample substrate incoherent scattering now works, and Single_crystal_inelastic, SANS_benchmark2 and StatisticalChopper are also corrected. Note: results for these components change, some substantially. By @henrikjacobsenfys, Daniel Lomholt Christensen (@Lomholy), @mads-bertelsen-agentic and @willend.
McXtrace sources and optics corrected, SOLEIL models realigned: Bending_magnet now gives the correct flux and samples correctly, Mirror_curved reflects as intended, Single_crystal absorption is fixed, and Source_lab uses xraylib for any single-element anode, with no data file needed. Many SOLEIL beamline models were repaired: mirror radii and angles, the Si lattice constant (5.4309 Å, not 5.4909 Å) and DCM alignment, so the beams now reach the samples as designed. Note: results for these components and instruments change, some substantially. By @antoinepado, @farhi and @willend.
Component review: GPU, memory and robustness fixes: a systematic review of the component libraries fixed GPU race conditions, out-of-bounds table and root indices, memory leaks, uninitialised values and name clashes between components used in the same instrument. The 16 standalone MCViNE components and most SANS/SAXS contributed samples now run on GPUs (OpenACC). By @willend.
Solid, coloured instrument drawings: under --trace=2, guides, mirrors, monochromators, beamstops, collimators, choppers and many other components are now drawn as filled surfaces, and components can switch pen colour with mcdis_pencolor("#rrggbb"). Union volumes can be shown as polyhedra, large Union_mesh geometries display much faster, and ESS_butterfly draws colour-coded solid moderators. mcdisplay-webgl(-classic) gains Surfaces/Lines toggles and a surface opacity slider, and overlapping transparent surfaces render correctly. By @willend, Daniel Lomholt Christensen (@Lomholy) and @mads-bertelsen-agentic.
!IMPORTANT! New home for packages and downloads: the Debian/Ubuntu packages are now served from the McCode apt repository at mccode-dev.github.io/debian, replacing packages.mccode.org, and the macOS and Windows bundles are attached to the GitHub releases. See the updated install instructions. By @willend.
%Test: and %TestScan: instrument headers: all example instruments now use the new names for their test lines (%Example: and %Scan: are still accepted). mctest compiles in parallel with -j N|auto, compiles only with -n0, and reports compilation and simulation time separately. By @willend.
October 23rd, 2026: McStas and McXtrace 3.10.0 released
Changes in McStas/McXtrace 3.10.0
Covers everything since the previous "announced" release, 3.9.2.
Highlights
New Scipp/Plopp-based plotting and display tools (preview): mcplot-plopp and mcdisplay-plopp are early versions of plotting and 3D display built on Scipp and Plopp. mcplot-plopp reads both McCode and NeXus output, including Monitor_nD event data shown as a pixel map. Both are offered as choices in mcgui/mxgui. By @willend.
NeXus output scales with MPI: in MPI runs, event lists are now written to one HDF5 file per process and joined into a single view (HDF5 "virtual data sets"), instead of being funnelled through one process. NeXus files are now compressed by default, --scan_split scans give a single NeXus file, and the requested ray count is stored in the file. List-mode Monitor_nDs that also bin in wavelength or time no longer crash in NeXus mode, and Mantid-mode monitors binned only in x or y now load in Mantid. The NeXus writer is also more robust: text containing % is stored as given, very long monitor file names no longer crash the run or corrupt the file, and large event lists are no longer silently dropped. By @willend.
Better-quality random numbers in parallel runs: with the default KISS generator, rays from different seeds, MPI processes and GPU batches could repeat each other's random sequences. Every ray now gets its own independent seed, and neutron IDs are unique across GPU batches and MPI processes. Note: results for a given seed change compared to earlier versions. Mersenne Twister runs are unaffected. By @willend (fixes #2807).
Much improved instrument display: mcdisplay-webgl-classic now shows the detailed --trace=2 component shapes by default, shaded and with a wireframe toggle. Hollow boxes and cylinders are drawn as the cavities they are in the physics, polyhedra with faces of any size display correctly, and mcdisplay-cad exports to STEP, PLY and plain OFF, including particle rays. By @willend and @farhi.
New Text component in McStas and McXtrace: puts 3D text labels into your instrument drawings. With the new Text2OFF template instrument, any text can also be turned into OFF geometry for components that read OFF files. By @farhi and @willend.
More accurate conic mirrors: the conic.h library behind the ConicSurf/FlatEllipse mirror family now applies the reflectivity once and with the correct scattering vector, no longer re-hits the surface it just reflected from, and has a configurable figure error (waviness model of Hansen et al.). New Mirror_conic test component and test instruments. By @willend (fixes #2787).
Statistically smarter testing with mctest: new %TestScan: (aka %Scan:) lines run a test over a whole parameter scan. Tests can now pass on Monte Carlo error bars (--nsigma/--pvalue) instead of only a fixed ±20 % window, and --statfactor scales the statistics of every test. %Example: lines are now called %Test:. By @willend.
Union framework refactored: the inner scattering loop of Union was reorganised for clarity and maintainability, and Union_mesh now uses a new general triangle-mesh library (geometry-mesh-lib) that reads STL, OFF and PLY files and ray-traces them efficiently. By Daniel Lomholt Christensen (@Lomholy), @mads-bertelsen-agentic and @willend.
More SOLEIL in McXtrace: new PX1, NANOSCOPIUM and GALAXIES beamlines, plus a model of the full SOLEIL synchrotron assembling the beamlines, mainly for rendering. By @farhi.
MCPL_input consolidated: MCPL_input now includes the MPI splitting of MCPL_input_once yet allows to repeat by repeat_count. MCPL_input_once is moved to the obsolete components. MCPL_output now uses weight_mode=1 by default, which records the initial ray count and rescales weights, adapting with the stat:sum convention from MCPL. By @willend.
October 6th, 2026: McStas and McXtrace 3.9.2 bugfix released
Changes in McStas/McXtrace 3.9.2
A bug-fix release covering everything since the previous "announced" release, 3.9.0, including the changes already shipped quietly in 3.9.1. For the main new features of the 3.9 series, see the 3.9.0 release notes.
Highlights
OFF/PLY geometry library overhauled: polygons can now have any number of corners, and several geometry bugs are fixed: gravity with OFF samples, double hits on shared edges, and McXtrace Mirror in OFF mode, which did not reflect. Faces in the geometry file can now also carry their own properties. By @willend.
Guide_anyshape now reads per-face coatings (m, alpha, W, ...) directly from the OFF/PLY file with the new file_coatings=1 option. This replaces Guide_anyshape_r, which moves to the obsolete components. By @willend.
ESS Test Beamline (TBL) in ESS_butterfly: selecting sector W, beamline 11 automatically switches to a TBL mode that views both cold wings of the moderator. Consolidated by @willend with Claude from the TBL team's local version.
Correct neutron ID and user variables in Union absorption loggers: the Monitor_nD-based Union loggers now record the real neutron ID and user0–user9 values instead of random numbers. By @tkittel.
SasView samples combine with Union and more: instruments using a SasView sample together with Union_master, Refractor or the Bispectral mirrors now compile. By @tkittel.
mcstas-chopper-lib updated to v4.2.3: the external chopper components NXdisk_chopper, Masked_ESS_butterfly and Polygon_ESS_butterfly now show up properly in mcdoc. By @g5t and @willend.
McXtrace data files found again on Debian/Ubuntu package installs when instruments are run directly, without mxrun. By @willend.
October 5th, 2026: McStas and McXtrace 3.9.0 released
Changes in McStas/McXtrace 3.9.0
Covers everything since the previous "announced" release, 3.8.4.
Highlights
MPI is now enabled by default when compiling instruments. Multi-core runs work out of the box, and a long-standing hang in MPI runs with empty event lists is fixed. By @willend.
NCrystal everywhere: NCrystal materials can now be used in Union, and PowderN / Single_crystal accept multiphase and single-crystal NCrystal materials. New components: Union_NCrystal_material and NCrystal_filter. By @tkittel and @mads-bertelsen-agentic.
Union framework simplified: Union_init and Union_stop are no longer needed in your instruments, the framework is now self-contained (@mads-bertelsen-agentic and @g5t). Also new: Union_abs_logger_nD_scintillator (@MilanKlausz, with @tkittel).
MCViNE sample kernels in McStas: 16 sample kernels from MCViNE (S(Q), S(Q,E), phonon, SANS and more), each available both as a standalone sample component and as a Union process. Contributed by @Fahima-Islam.
New Dispersion_relation sample component for phonon or magnon scattering from tabulated (numerical) dispersion relations, tested against Phonon_simple and SpinWave_BCO. By Daniel Lomholt Christensen (@lomholy-agentic) and Kim Lefmann.
Full component settings in NeXus output: in NeXus output mode, every component variable is now embedded in the output file with its actual runtime setting, so each simulation fully documents how its components were configured. By @willend, with related fixes by @tkittel.
Much faster mcdisplay-webgl: the 3D instrument viewer no longer depends on Vite/npm and now starts up much faster. By @willend.
Models of NeXT, the ILL neutron + X-ray imaging instrument, in both packages: ILL_H521_NeXT (neutron branch) in McStas and ILL_NeXT_Xray (X-ray branch) in McXtrace. Both were "vibe-coded" by @willend with Claude, starting from the instrument's webpage and the existing ILL information in McStas.
New SOLEIL beamlines for McXtrace: SIRIUS, SAMBA and PUMA, plus fixes to CRISTAL. By @farhi, with PUMA written by Uxue Saez Fernandez.
Another big documentation round: refreshed manuals, new Union chapters, web versions of the manuals, and updated documentation for every component and instrument. By @willend, AI-assisted.
Covers everything since the last full release, 3.7.9 (July 2, 2026), including all changes already shipped quietly via the intermediate conda-forge releases 3.7.10–3.8.3, and a ground-up rewrite of the McStas/McXtrace manuals.
Sorry for any incovenience caused if you installed any of 3.8.1-3... Some doc-details were still not in place!
What's Changed
Common to McStas and McXtrace
Manuals
First full manual makeover since the McStas 2.x / McXtrace 1.x series. Tool-usage chapters (mcrun/mxrun, mcplot, mcdisplay, mcgui, mcdoc, ...) rewritten against the actual CLI code; component reference/parameter tables now generated directly from the current .comp sources (closing a long-standing manual/code drift); mcdoc itself reworked to support it. By @willend in #2592
Numerous long-standing inaccuracies fixed along the way: RNG engine description (KISS default / MT optional), obsolete components now explicitly labelled as such, stale legacy sections removed, http->https, and a batch of LaTeX build-pipeline fixes; McXtrace manual also had McStas copy-paste leftovers removed and its "running"/RNG sections aligned with McStas's — all by @willend in #2592
AI-assisted: reference material and source code (usage articles, grammar/cogen.c, example instruments, component sources, tool CLIs) were given to an AI coding agent to draft the updated text, reviewed and merged by @willend. Given the scale of the rewrite, minor errors/omissions in the manuals are expected — please flag anything you spot via a GitHub issue
mcdoc's browser-based overview page now also links to per-tool cheat-sheets (mcrun, mcgui, mcplot, mcdisplay, mctest, mcdoc, code generators) and to new standalone Instrument/Component grammar reference pages, all a click away from the component browser by @willend
New tools mcplotdiff-html/mcplotdiff-pyqtgraph/mcplotdiff-matplotlib: plot the difference between two simulation results, monitor by monitor (diff.monN = a.monN - b.monN), with a diverging blue/white/red colour scale for 2D monitors and diff datasets written out as normal, reopenable McCode .dat files by @willend in #2560, #2562, #2564 — later reworked to show %-difference in #2599 and to always write diff datasets in #2585
mcviewtest now spawns mcplotdiff-html automatically by @willend in #2568
New tools mccoplot-html/mccoplot-pyqtgraph/mccoplot-matplotlib: companion to mcplotdiff, overlaying two (or more) datasets' 1D monitors on the same axes for direct curve comparison by @willend in #2587, with n-way overlay support in #2594 and a McXtrace-side fix in #2589
mcviewtest also spawns mccoplot generation by @willend in #2588, #2595
mctest: added -s/--seed option and an option to emulate McCode's classic "Unix epoch" default seed, for reproducible test runs by @willend in #2575, #2576
mctest: new --strict mode fails a test if an instrument is missing its %Example: header line(s) by @willend in #2602 (spillover-bug fix in #2604), plus general robustness improvements in #2603 and a GPU-box-specific fix in #2613
mctest: fixed TypeError on re-runs caused by displaytime never being restored from the saved JSON state by @mads-bertelsen-agentic in #2624
mcplot-html: added a slider to control plot iframe size, and geometry/scaling adjustments, by @willend in #2547, #2548, #2549, #2550
Fix issue #2561 — make 2D-plot colourbars visible in more cases by @willend in #2563
Speed up execution of mcplot-matplotlib (especially for large 2D matrices) by @willend in #2570
Matplotlib-plotters: fix for non-draggable legends by @willend in #2614
mcrun/mxrun: allow multiscan -M with list-scan -L and new scan/list syntax par=a:delta:b for both -N and L modes by @willend in #2618
Plottable mccode.dat in the NeXus-scan case by @willend in #2619
mcgui/mxgui: non-numeric entries in nsteps are now deferred to mcrun for interpretation instead of rejected up front by @willend in #2625
mcdoc: list %Example: lines in bold by @willend in #2636
Minor tweak on mcviewtest — tolerate a trailing / in ref path by @willend in #2593
Code generator & grammar
RNG correctness fix: the KISS generator's 7-word per-particle random state was only partially backed up/restored across a SPLIT loop (silently corrupting RNG state), and the Mersenne-Twister seed was never actually applied at start-up due to a stale RNG_ALG check — both fixed by @mads-bertelsen-agentic in #2620
Cogen: simplify COPY(instance) to no longer transfer EXTEND et al. by @willend in #2627 (two affected instruments updated in #2640)
Enable mcstas-antlr in McCode GitHub CI by @willend in #2610
Edits for increased compatibility with mcstas-antlr by @willend in #2612
Consequence-edits from antlr-compatibility: add missing pragmas by @willend in #2616
Add input parameters to base .py instrument generated by mccode-pygen by @willend in #2601
Implement pygen-suggestion from @MilanKlausz (#2554) by @willend in #2555
Fix for collision between stdlib:: syntax and mcrunmin:delta:max scan syntax by @willend in #2626
Fix issue #2606 + other unneeded use of GETPATH() by @willend in #2609
[Ref] move static comparison out of the hot TRACE path by @g5t in #2591 — a good general reminder that a WHEN(...) clause runs once per particle, so precomputing a flag in INITIALIZE beats a strcmp() in TRACE
Infrastructure / build system / CI
New CMake FetchContent integration for Greg Tucker's mcstas-chopper-lib by @willend in #2631, with a test instrument added in #2632
Consolidate conda/non-conda 'basictest' workflows and use with new mcviewtest by @willend in #2577
Minor bugfixes for testsuite-workflows/nightlies by @willend in #2578, #2581
Back to 1e6, testsuite workers are killed by time-limit by @willend in #2582
Let testsuite run with 2 cores on macOS, auto elsewhere by @willend in #2583
Use mpi=2 on macOS also in basictests by @willend in #2586
Include GitHub worker id as unique identifier for datasets by @willend in #2598
Trigger 'RUNALL' if > 4 comps were changed by @willend in #2641
Suppress use of cif2hkl in Test_Powders by @willend in #2634
Repair 'autobuild' download of 'innosetup' installer by @willend in #2573
Release doc updates 3.7.9 by @willend in #2545
Update pullrequesttemplate.md by @willend in #2559
Update notebook template to reflect McStasScript 0.0.89 properties by @willend in #2580
CI: various workflow fixes by @willend in #2615
Minor instrument header fixes + plug missing README.md's by @willend in #2639
Rectification of Windows batch-wrappers by @willend in #2566, #2567
McStas only
New instrument: import of FRMII_SPODI / FRMII_SPODI_MULTI, a powder diffractometer at MLZ Garching (contributed by V. Kochetov, C. Hauf, M. Hoelzel and A. Senyshyn) by @kinetik161 in #2608 — enabled to run on GPU/OpenACC by @willend in #2623
New instruments: import of 3 x imaging instruments from various sources (PSI_ICON, Radiography_Lithium_Battery, Radiography_Sword) by @willend in #2569
New components (via mcstas-chopper-lib, see FetchContent integration above): Masked_ESS_butterfly and NXdisk_chopper, with their test/example instruments Masked_ESS_butterfly_image, NXdisk_chopper_display and NXdisk_chopper_image, courtesy of @g5t's mcstas-chopper-lib — installed directly into the normal mcstas-comps/contrib and examples/Tests_optics locations, so they appear in mcdoc/mcgui like any other McStas component
PowderN: remove erroneous order parameter by @Lomholy in #2622
Sans spheres intensity fix by @Lomholy in #2600
ILL_SALSA: fix linter and add n reflections to parameters by @Lomholy in #2572
Patch issue #2637 — Vertical_Bender gravity always disabled by @MilanKlausz in #2638
Union: add nowritefile parameter to all Union loggers and abs_loggers by @mads-bertelsen-agentic in #2607
Work on ESS source description / comparison with MCPL inputs by @willend in #2596
Fix for compilation failure of ESS/MCPL instrument under openacc by @willend in #2597
Use filenames in MCPL instrument Monitor_nD instances to get rid of timestamps by @willend in #2574
Add another MCPL_output -> producing neutrons in instrument coordinate frame by @willend in #2629
MCPL file was moved - update instrument file by @willend in #2630
McXtrace only
McXtrace: work toward fixing #2514 (GPU) by @willend in #2556
Likely fix for McXtrace / Abs_objects test on GPU by @willend in #2557
WORKAROUNDS: disable key tests in McXtrace (#2514) by @willend in #2558
Filter.comp: better handling of non-standard input files by @willend in #2552
Fix for mxcoplot-html McXtrace by @willend in #2589
New Contributors
@kinetik161 made their first contribution in #2608
@mads-bertelsen-agentic made their first contribution in #2624
@MilanKlausz made their first contribution in #2638
Full Changelog: https://github.com/mccode-dev/McCode/compare/v3.7.9...v3.8.4
July 2nd, 2026: McStas and McXtrace 3.7.9 released
Changes in McStas/McXtrace 3.7.9, July 2nd, 2026
Release 3.7.9 marks a milestone for McXtrace that finally gets full support for complex number calculations using MSVC on Windows. We further improve the installation experience on Windows by addition of a new install script for downloading and setting up the MSVC compiler tool chain.
Support mxrun -L scan mode via mxgui 'Scan steps' entry by @willend in #2493
Small but important improvements to mxdisplay/mcdisplay:
pyqtgraph variant:
Restore various click/keyboard control across PyQt5/PyQt6
Improvements to mxdisplay(-pyqtgraph) component list (do not underflow main window) by @willend in #2489
Fix missing PyQt5->PyQt6 correction for mxdisplay-pyqtgraph by @willend in #2481
Fix of another mxdisplay-pyqtgraph PyQt6 vs PyQt5 bug by @willend in #2485
matplotlib variant:
Silence mxdisplay-matplotlib noise when pressing 'q' by @willend in #2483
Common, parsing-system:
Fix for rare bug: Add fflush(stdout) protection of DEBUG_COMPONENT (fix #2486) by @willend in #2487
Libraries
KDSource functional in mingw builds (+other minor improvements) by @willend in #2497 (comes with both McStas and McXtrace even though KDSource.comp is McStas-only for now
March 31st: First circular: PHOTONS AND NEUTRONS REALISTIC
ARTIFICIAL INTELLIGENCE DATASETS (PaNRAID)
Dear Colleagues,
In collaboration with the French DIADEM Academy, we invite interested participants to attend the following course in September:
PHOTONS AND NEUTRONS REALISTIC
ARTIFICIAL INTELLIGENCE DATASETS
(PaNRAID)
Dates: 21-25 September
Location: Île d’Oléron, France
Objective
The course will develop an integrated approach for generating synthetic data for supervised learning. This approach combines multi-scale materials simulations (DFT, MD, XAS spectroscopy) with comprehensive digital twins of experimental X‑ray and neutron facilities, explicitly accounting for instrumental effects and experimental artefacts.
March 28th, 2026: McXtrace 1.x and McStas 2.x formally out of support
Dear all,
We have decided to formally declare that we no longer support
McXtrace 1.x and McStas 2.x, so user issues with these released will from
now on always prompt us to request that you upgrade.
If you are still running such an old release, please upgrade and
port your comps/instruments using the information in the use the wiki-based
porting-guides