Skip to content

Releases: mccode-dev/McCode

McStas/McXtrace v3.10.0

Choose a tag to compare

@willend willend released this 23 Oct 13:33
710e6c2

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.

What's Changed

Common to McStas and McXtrace

Visualisation and plotting

  • New mcplot-plopp and mcdisplay-plopp prototypes based on Scipp and Plopp by @willend in #2799, with event pixel maps (#2870), NeXus attribute fixes (#2878) and mcgui menu entries (#2879)
  • mcdisplay-webgl-classic: --trace=2 shapes by default with the new Test_mcdisplay_shapes example (#2836, #2840), shaded shapes with wireframe toggle (#2848), dead code removed and -n 0/--invcanvas fixed (#2833), all by @willend
  • mcdisplay-webgl: polyhedron faces of any size (#2847), legacy code removed and the viewer rebuilt (#2832), by @willend
  • mcdisplay: hollow boxes and cylinders drawn as closed cavities (#2844, documented with tilted test cases in #2845), simple --trace=1 box/cylinder/cone drawings now match the detailed ones (#2837, #2802), correct polygon winding in --trace=2 output (#2843), instrument parameters given before -n are kept (#2854, fixes #747), closing the pyqtgraph window no longer raises an error (#2800), by @willend
  • mcdisplay-cad: much faster and more complete, with STEP output, particle rays, --tubes and -t/--trace (#2824, by @farhi and @willend), plain OFF output and PLY files readable by the OFF/PLY library (#2868), Annulus drawn with the correct ring width (#2846)
  • Python tools now quote file paths when opening them in a browser, by @willend in #2836
  • The text-based mcplot-terminal was added and then deferred to a later release, by @willend in #2785, #2822

Running simulations (mcrun/mxrun, mcgui/mxgui)

  • mcrun: --scan_split scans give one NeXus file, laid out as for a serial NeXus scan, by @willend in #2804, #2891
  • mcrun: --verbose now also applies to compilation, by @farhi in #2821
  • mcrun: setting --autoplotter now opens the plot automatically, by @willend in #2825
  • mcgui/mxgui: the run dialogue scrolls for instruments with many parameters and fits the screen, by @farhi and @willend in #2829. Unused interface files removed in #2831

Simulation output (NeXus) and random numbers

  • MPI NeXus event lists written per process and combined with HDF5 virtual data sets, compression on by default, requested ray count stored, safe saving on SIGTERM, by @willend in #2830
  • Monitor_nD: the NeXus BINS/pixel map is now sized over the spatial axes only, so list-mode monitors that also bin in e.g. wavelength or time no longer run out of memory and crash, with the new Test_Monitor_nD_BINS regression test, by @willend in #2882 (fixes #2484)
  • Monitor_nD: NeXus BINS/pixel map ordered like the event pixel ID (#2877), and intensity/flux options no longer add an extra variable (#2856, fixes #2445), by @willend
  • NeXus runtime parameter values also accept the type names used by mccode-antlr, by @willend in #2835
  • More robust NeXus writer: string values, titles and parameter literals containing % are stored as given (previously garbled), Monitor_nD BINS output no longer contains uninitialised values, monitor file names too long for the NeXus library are skipped with a warning instead of crashing the run and corrupting mccode.h5, chunks are kept below the 4 GiB HDF5 limit so large event lists are written, and several smaller file-handling fixes. New Test_NeXus_output regression test in McStas and McXtrace, run in CI with and without MPI. By @willend in #2889
  • Decorrelated per-ray random seeds and unique neutron IDs across MPI processes and GPU batches, by @willend in #2808 (fixes #2807). Test references updated accordingly.

Code generator & grammar

  • A round of code-generator fixes: expressions in {...} vector parameters, INHERIT sections (a section written in the child, even empty, replaces the parent's), USERVARS handling as in mccode-antlr, with new grammar unit tests, by @willend in #2767
  • JUMP to an undefined component now gives a clear error instead of a crash, by @farhi in #2819. Forward JUMPs are allowed, by @willend in #2823
  • Obsolete DETECTOR_OUT_3D macro removed from components and docs, by @willend in #2859 (fixes #1573)
  • Fixes for intermittent results from header parsing in data files and other undefined behaviour, by @willend in #2770
  • Data file cache (read_table-lib) kept consistent, and errors in MPI runs abort cleanly, by @willend in #2784

Testing (mctest)

  • New %TestScan: (aka %Scan:) test lines, used in many example instruments, by @willend in #2772
  • Statistical acceptance (--nsigma, --pvalue) and --statfactor, with a new documentation page. %Example: lines renamed %Test: (old name still accepted), by @willend in #2776
  • -n on %Test:/%Example: lines is now honoured, as for %TestScan:/%Scan:, by @willend in #2820, #2841

Documentation

  • mcdoc renders TeX with a locally installed MathJax (#2871) and writes search results to a separate page (#2855), by @willend
  • McStas manual: the Installing chapter is back and points to the current install instructions, by @willend in #2873
  • Clearer external-contributions guide, by @willend in #2860 (fixes #2771). Component example-coverage lists regenerated (#2861)

GPU / OpenACC

  • OpenACC fixes for instruments, the SOLEIL models and test components, by @willend in #2797, #2881. Dispersion_relation GPU race fixed in #2769, Radial_div monitor accumulation made GPU-safe in #2890

Installation, platforms and packaging

  • cif2hkl is now built from the upstream SOLEIL release and required at version 1.5.0 or newer (now 1.5.1) for conda and Debian packages, by @willend in #2864, #2873
  • macOS: workaround for an OpenMPI issue caused by a long $TMPDIR, by @willend in #2775
  • Debian install instructions use the new mccode.sources file, by @willend in #2873
  • For contributors: new devel/bin scripts to get dependencies and build both McStas and McXtrace (#2773), conda environment update (...
Read more

McStas/McXtrace v3.9.2

Choose a tag to compare

@willend willend released this 06 Oct 14:52
c235474

Changes in McStas/McXtrace 3.9.2

A bug-fix release covering everything since the previous "announced" release, 3.9.0, including minor changes already shipped quietly in 3.9.1 on conda-forge. 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.

What's Changed

Common to McStas and McXtrace

Geometry (OFF/PLY files)

  • Overhauled OFF/PLY geometry library: no limit on the number of corners per polygon, faces can carry their own properties, and fixes for gravity mode with OFF samples, double hits on shared edges and corners, faces whose first corners lie on a line, and more robust file reading. Checked against an independent reference calculation and the example instruments. By @willend in #2755
  • Clearer rules for how the library reports intersections, with all users of it in McStas and McXtrace checked, by @willend in #2755

Running pygen-based simulations

  • Instrument parameters without a default value no longer crash mcstas-pygen, by @tkittel in #2762

Installation, platforms and packaging

  • McXtrace binaries now find their data files when run directly on a Debian/Ubuntu package install (where $MCXTRACE is not set), by @willend in #2761 (fixes #2759 from @farhi)
  • Debian/Ubuntu packages now declare all their dependencies themselves, so installing single packages works without the full "suite" metapackages. mcstas-comps now depends on MCPL and NCrystal, and mcxtrace-comps on MCPL. By @willend in #2761
  • More reliable cross-compilation of the Windows installers by @willend in #2751
  • Release builds are now packaged as a single archive by @willend in #2758
  • Release-notes updates by @willend in #2749, #2750
  • For contributors: new CI test of Debian/Ubuntu package builds and of running binaries directly, by @willend in #2761. Basic CI tests are faster because plots are now made only on request, by @willend in #2763

McStas only

Components

  • Guide_anyshape: new file_coatings=1 option to read m, alpha, W, R0 and Qc per face from the OFF/PLY file. Guide_anyshape_r is now obsolete (it still works, with a deprecation warning): use Guide_anyshape(file_coatings=1, ...) instead. By @willend in #2755
  • ESS_butterfly: automatic Test Beamline (TBL) mode for sector W, beamline 11, viewing both cold wings of the moderator. AI-assisted (Claude), by @willend in #2757
  • Vertical_Bender: reflections on the curved walls were missed without gravity, so much less was transmitted than expected. Fixed by @tkittel in #2756
  • Union_master, Refractor, Mirror_Curved_Bispectral and Mirror_Elliptic_Bispectral can now be combined with SasView samples in one instrument. Previously this failed to compile because of a clash with the name I (fixes #2546). By @tkittel in #2752
  • mcstas-chopper-lib updated to v4.2.3: NXdisk_chopper, Masked_ESS_butterfly and Polygon_ESS_butterfly (with their test instruments) now render correctly in mcdoc, by @mccode-registrar[bot] in #2764 (upstream fixes by @willend, released by @g5t)

Union

  • Union_abs_logger_nD, Union_abs_logger_nD_scintillator, Union_abs_logger_1D_space_event and Union_abs_logger_event now pass the real neutron to Monitor_nD. The neutron ID and user-variable columns previously held random values. By @tkittel in #2760

McXtrace only

  • Mirror: OFF/PLY geometry mode now reflects correctly, by @willend in #2755

Full Changelog: v3.9.0...v3.9.2

McStas/McXtrace v3.9.1

Choose a tag to compare

@willend willend released this 05 Oct 15:45
faaab31

What's Changed

  • Update RELEASE_NOTES.md by @willend in #2749
  • Update RELEASE_NOTES.md by @willend in #2750
  • Safeguards to ensure a more stable cross-compile path for 'Windows bundles' by @willend in #2751
  • Do not use I as a variable name, since <complex.h> defines it as a macro by @tkittel in #2752
  • Vertical_Bender: use the next intersection with a curved wall after a reflection by @tkittel in #2756
  • Interoff consolidation - take 2 by @willend in #2755
  • Claude-driven consolidation of ESS butterfly functionality from TBL by @willend in #2757

Full Changelog: v3.9.0...v3.9.1

McStas/McXtrace v3.9.0

Choose a tag to compare

@willend willend released this 04 Oct 17:12
0f1362c

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.

What's Changed

Common to McStas and McXtrace

Documentation

  • Full manual refresh against the current component code and tool documentation, plus installation instructions updated for 3.9.0, by @willend (branch manual-refresh-before-release, PR pending)
  • Further manual refreshes and AI-assisted corrections by @willend in #2661, #2735, #2736
  • New web (HTML) versions of the manuals by @willend in #2670
  • New Union chapters in both the McStas and McXtrace manuals by @willend in #2675
  • Component and instrument headers reviewed: missing parameter descriptions and units filled in by @willend in #2747
  • Updated instrument README files by @willend in #2702, #2733
  • Elliptic guide component header fixed by @ebknudsen in #2719
  • As in 3.8, this documentation work was AI-assisted and reviewed by @willend. Please report any errors you spot via a GitHub issue.

Running simulations (mcrun/mxrun, mcgui/mxgui)

  • Instruments are now compiled with MPI enabled by default by @willend in #2669, with follow-up fixes in #2671 and #2672 (conda installations)
  • Fixed MPI runs hanging when a process ended up with no events by @willend in #2726
  • Only values made of numbers are treated as scan ranges, so text parameters containing : are no longer mistaken for scans, by @tkittel in #2722
  • --yes now keeps parameter values given on the command line by @willend in #2723
  • mcgui/mxgui now warns clearly if the code editor component (qscintilla2) is missing by @willend in #2699

Visualisation and plotting

mcdoc/mxdoc

  • mcdoc PowderN.comp (and other unique matches) now opens the component directly by @willend in #2663
  • Search-result output now appears in the right place by @willend in #2659
  • Parameter descriptions spanning several lines are now supported by @willend in #2746
  • Cleaner generated component headers by @willend in #2662

Testing (mctest)

  • New --noplots option by @tkittel in #2734
  • Instruments with %Example lines without parameters are now supported by @tkittel in #2708
  • More reliable detection of compilation, runtime and plotting failures by @tkittel in #2706

Python instruments (mcstas-pygen)

  • New --instrument-name option, and %Example lines are turned into tests, by @tkittel in #2707
  • Search functionality by @tkittel in #2718
  • Fixed handling of expressions in generated Python code by @tkittel in #2730

Simulation output and code generation

  • In NeXus output mode, all component variables are now embedded in the output file together with their actual runtime setting (the value after initialisation), so you can always see exactly how each component was configured, by @willend in #2724
  • Parameter expressions are now stored correctly in NeXus files by @tkittel in #2729
  • C character literals in parameter expressions are handled correctly by @tkittel in #2732

GPU / OpenACC

Installation, platforms and packaging

  • macOS: no more unnecessary Rosetta prompts on Apple Silicon by @willend in #2700, #2704, #2705
  • macOS: workaround for OpenMPI 5 issues by @willend in #2728
  • macOS: ${SDKROOT} is respected if set by @willend in #2656
  • Minimum CMake version raised from 3.17 to 3.19 by @g5t in #2668
  • External contributions (such as mcstas-chopper-lib) reorganised by @g5t in #2666, with chopper-lib updates v4.2.1 and v4.2.2 in #2695, #2710
  • Removed obsolete files and the separate test-config packages by @willend in #2673, #2674
  • Code style and minor fixes by @ebknudsen in #2681 and @willend in #2731
  • For contributors: new AGENTS.md guide for AI coding agents by @willend in #2738, and smarter CI that only runs tests when component code actually changes, in #2747

McStas only

NCrystal

  • New Union_NCrystal_material component: NCrystal materials for Union, by @mads-bertelsen-agentic in #2698
  • PowderN and Single_crystal support multiphase and single-crystal NCrystal materials by @tkittel in #2715
  • NCrystal data files are also found next to your instrument file (localdata/) by @tkittel in #2714
  • New NCrystal_filter component: a fast, GPU-friendly filter or window (box or cylinder) of any NCrystal material that only attenuates the beam, by @tkittel in #2727

Union

  • Union_init and Union_stop are no longer required by @mads-bertelsen-agentic in #2655
  • Union is now self-contained by @g5t in #2712
  • MCViNE sample kernels as Union processes by @Fahima-Islam in #2716 (standalone versions listed under MCViNE samples below):
    • MCViNE_SQ_process, MCViNE_SvQ_process, MCViNE_SQE_process
    • MCViNE_E_Q_process, MCViNE_E_vQ_process, MCViNE_Broadened_E_Q_process, MCViNE_LorentzianBroadened_E_Q_process
    • MCViNE_ConstantQE_process, MCViNE_ConstantvQE_process, MCViNE_ConstantEnergyTransfer_process
    • MCViNE_Phonon_CoherentInelastic_PolyXtal_process, MCViNE_Phonon_CoherentInelastic_SingleXtal_process, MCViNE_Phonon_IncoherentElastic_process, MCViNE_Phonon_IncoherentInelastic_process
    • MCViNE_DGSSXRes_process, MCViNE_SANS2D_ongrid_process
  • New Union_abs_logger_nD_scintillator component with test instrument by @MilanKlausz in #2687, with a flexible data location option (table_dir) by @tkittel in #2720
  • union_history.dat is now saved in the output directory by @NoeB in #2697

MCViNE samples

  • 16 sample kernels from MCViNE, now available as standalone McStas sample components, by @Fahima-Islam in #2716:
    • MCViNE_SQ, MCViNE_SvQ, MCViNE_SQE
    • MCViNE_E_Q, MCViNE_E_vQ, MCViNE_Broadened_E_Q, MCViNE_LorentzianBroadened_E_Q
    • MCViNE_ConstantQE, MCViNE_ConstantvQE, MCViNE_ConstantEnergyTransfer
    • MCViNE_Phonon_CoherentInelastic_PolyXtal, MCViNE_Phonon_CoherentInelastic_SingleXtal, MCViNE_Phonon_IncoherentElastic, MCViNE_Phonon_IncoherentInelastic
    • MCViNE_DGSSXRes, MCViNE_SANS2D_ongrid

Components and instruments

McXtrace only

  • New ILL_NeXT_Xray model of the X-ray branch of the NeXT imaging instrument at the ILL, AI-assisted (Claude), by @willend in #2703, #2711
  • New instruments: SOLEIL SIRIUS by @farhi in #2685, #2744 and SOLEIL SAMBA in #2743
  • New SOLEIL_PUMA instrument: the PUMA hard X-ray beamline for heritage science (XRF, XANES, XRD and XEOL, 4–22 keV), written by Uxue Saez Fernandez and added by @farhi in #2741
  • SOLEIL CRISTAL compiles again (corrected undulator parameters) by @farhi in #2688
  • SO...
Read more

McStas/McXtrace v3.8.8

Choose a tag to compare

@willend willend released this 28 Sep 10:10
3fef290

v3.8.8 is a "throwaway" proof-of-concept release post

  • Fixes and work incoming during PaNRAID school
    • New instruments for McXtrace
    • Various fixes in McStas
  • Multiple PR's on Union etc.
  • Reworking the inclusion of External.cmake from @g5t.

I am thinking we will do a 3.8.9 soon that will become an 'official' release including announcements etc.

What's Changed

New Contributors

  • @mccode-registrar[bot] made their first contribution in #2695

Full Changelog: v3.8.4...v3.8.8

McStas/McXtrace 3.8.7

Choose a tag to compare

@willend willend released this 18 Sep 08:45
6168b04

What's Changed

Full Changelog: v3.8.4...v3.8.7

McStas/McXtrace 3.8.6

Choose a tag to compare

@willend willend released this 18 Sep 03:18
8e88e71

What's Changed

Full Changelog: v3.8.4...v3.8.6

McStas/McXrace 3.8.5

Choose a tag to compare

@willend willend released this 13 Sep 18:49
b079139

Minor fixes for 3.8.4 (and another iteration on the updated manuals). Mostly intended for PaNRAID
https://github.com/mccode-dev/PaNRAID/blob/main/README.md

What's Changed

  • If ${SDKROOT} is set - use it instead of calling xcrun by @willend in #2656
  • Fix to placement of searchterm output by @willend in #2659
  • mccoplot: legend / title suppression by @willend in #2660
  • Suppress SITE and Example in generated COMP headers by @willend in #2662
  • Allow mcdoc to present unique match, e.g. mcdoc PowderN.comp by @willend in #2663
  • Another round of AI-assisted manual edits by @willend in #2661

Full Changelog: v3.8.4...v3.8.5

McStas/McXtrace v3.8.4

Choose a tag to compare

@willend willend released this 11 Sep 08:59
65e4daa

Changes in McStas/McXtrace 3.8.4

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 tooling

  • 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
  • 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 mcrun min: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 pull_request_template.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

New Contributors

Full Changelog: v3.7.9...v3.8.4

McStas/McXtrace v3.8.3

Choose a tag to compare

@willend willend released this 10 Sep 22:15
221ebef

Changes in McStas/McXtrace 3.8.3

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.7.25, and a ground-up rewrite of the McStas/McXtrace manuals.

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 tooling

  • 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
  • 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 mcrun min: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 pull_request_template.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

New Contributors

Full Changelog: v3.7.9...v3.8.3