Repository navigation
Changes in McStas/McXtrace 3.10.4
Highlights
- Instrument display with tours and monitor data:
mcdisplay-webglandmcdisplay-webgl-classicget a tour mode that flies along the beam for making movies, with a speed slider, pause, recording, a start component and a--campathfile. With--simdir(and--simbins) the monitor data of a simulation is drawn on the monitors and plotted next to the display, and the newmcrun/mcguioption--autodisplayshows it right after a run. Drawing is faster for large instruments, andmcdisplay-cadalso exports monitor data. By @willend. - McXtrace mirrors and gratings corrected:
Mirror_curvedis rewritten and now supports double curvature, andMirror_elliptic,Mirror_parabolic,Grating_reflectandGrating_transget major physics fixes.Filterrefracts for all shapes, including OFF files. Instruments with KB mirrors were repaired. Note: results for these components and instruments change, some substantially. By @farhi and @willend. - Powder and crystal data cleaned up: the bundled
.laupowder files are regenerated with NCrystal, broken.lazfiles are removed, andPowderN,Powder_process,Single_crystal,Isotropic_SqwandTexture_processread the |F|² unit (barn or fm²) from the file header. Note: results can change for powder and crystal samples using the bundled data. By @willend (fixes #2112). - Porous samples: the new
PowderN_porouscomponent (McStas and McXtrace) describes a powder matrix with mesh pores, partly filled with a liquid. ThePSI_ICONandILL_NeXT_Xrayimaging instruments are split into shared beamline and detector parts, with new porous-sample variants. By @willend. - New
mcmerge/mxmergetool: merges simulation datasets, including MCPL files viamcpltool. By @willend. - Mean values written correctly: polarisation monitors and
Monitor_nDwithsignal=now output mean values through a centralDETECTOR_OUT_*_MEANroutine, correct also with MPI and on intermediate saves. Data headers statemean: yesorno. Note: the totals of these monitors change. By @willend. - Instrument-level
METADATA: instruments can carryMETADATAblocks, as inmccode-antlr, also written bymcstas-pygen. By @g5t and @willend.
What's Changed
Common to McStas and McXtrace
Visualisation and GUI
mcdisplay-webgl(-classic)tour mode for movies: introduced in #3133 and #3150, smooth tour with a speed setting (#3152), recording and start from a component (#3148),--campathfile with a SOLEIL example (#3154), speed slider and pause button (#3164, #3179), by @willendmcdisplay-webgl(-classic):--simdirshows monitor data on the monitors and adds it to an existing display (#3155),--simbinssets its binning (#3160), monitor plots next to the display (#3197), flat 1D monitor curves along the instrument's x axis (#3199) and monitor data in the plane of the drawing (#3202), by @willendmcdisplay-webgl(-classic): merged geometry for faster drawing (#3187), and double-click turns the view gradually (#3188), by @willendmcdisplaykeeps up to 1e5 rays and caps-nat 1000 (#3155), and-yis forwarded tomcrun(#3177), by @willendmcdisplay-cad:--simdirmonitor data and transparency, and fixed VTK output (#3182), faster GLB/glTF/OFF export of large models (#3184), by @willendmcdisplay-mantid:--embedwrites the IDF into an existing NeXus file (#3178), and an error withoutsourceMantid/sampleMantid(#3177), by @willend- Code generator: each
SPLITbranch is traced as its own ray, so the display no longer draws a line back to theSPLITpoint, by @willend in #3159 Arm: its arrows can be left out of the display withDROP_ARM_ARROWS, by @willend in #3138
Running simulations (mcrun/mxrun, mcgui/mxgui)
- New
--autodisplayoption inmcrunandmcguito show the display with monitor data after a run (#3202), with clearer--autodisplayerhelp (#3203), by @willend mcrunstarts MPI with-n, sosruncan be used as the launcher, by @willend in #3204mcrun --no-cflagsno longer crashes, by @willend in #3135
Simulation output and runtime
- Central
DETECTOR_OUT_*_MEANoutput of mean values for polarisation monitors andMonitor_nDsignal=, correct with MPI and on intermediate saves, withmean: yes/noin all data headers.Test_Magnetic_Rotationgets a new target. By @willend in #3193 - Instrument-level
METADATAaccepted, as inmccode-antlr, with table accessors, aTest_lib_metadatatest andmcstas-pygensupport, by @g5t and @willend in #3180 - Code generator: the case-insensitive component search closes its directory, by @willend in #3136
Tools
- New
mcmerge/mxmergeto merge datasets, including MCPL files withmcpltool.Monitor_nDevent lists now write their number of events in the data values. By @willend in #3196
Testing (mctest)
Installation, platforms and packaging
- Debian/Ubuntu suite metapackages depend on the correct
*-clustertoolspackage name, by @willend in #3132 mcstas-chopper-libupdated to v4.4.2, by @g5t, registered in #3190- For contributors: new
CONTRIBUTING.mdwith an AI-declaration rule (#3153), a simpler PR template andCLAUDE.md(#3183, #3189), moreAGENTS.mdrules (#3194), one nightly release archive per platform (#3163), and the v3.10.3 install docs (#3131), by @willend
McStas only
Samples
- Powders 1/2:
.laufiles regenerated with NCrystal, broken.lazfiles removed,PowderN/Powder_process.laumerge fixed, and a warning when the Debye-Waller factor is ignored for NCrystal files. Examples usebarns=0with.laufiles and have updated%Testvalues. By @willend in #3174 - Powders 2/2:
PowderN,Powder_process,Single_crystal, UnionSingle_crystal_process,Isotropic_SqwandTexture_processread the |F|² unit (barn or fm) from the file header, overriding thebarnsparameter, by @willend in #3176 (fixes #2112) - New
PowderN_porouscomponent: a powder matrix with mesh pores, partly filled with an incoherent, absorbing liquid, with aTest_PowderN_porousexample, by @willend in #3146 Texture_process: cell vectors for any lattice, in the same crystal frame, by @willend in #3171SasView_rectangular_prism: the sasmodels kernel is included directly, by @willend in #3169SpinWave_BCOstops with a clear message for B < 0 withFM=1, and Union NCrystal uses the per-particle random numbers, by @willend in #3165
Union
- Union polyhedron display: only volumes that overlap are checked, and the surrounding vacuum is left out, by @lomholy-agentic in #3192
Other components
- Cylindrical monitors (
Cyl_monitor,Cyl_monitor_PSD,Cyl_monitor_TOF,PSDcyl_monitor,TOF2Q_cyl_monitor,TOF_cylPSD_monitor): binning and array bounds overhauled, with a newTest_Cyl_monitorscase, by @willend in #3167, #3200 MCPL_output: no command-line buffer overflow with many instrument parameters (#3134),initial_ray_countleft at -1 when a run is interrupted, with signals handled afterTRACE(#3087, fixes #3181), andMCPL_output_noaccdefaults toweight_mode=1(#3198), by @willendMonochromator_bent(_complex)stops on an unknownplane_of_reflection(#3167),Source_simplexinterpolation and grid edge fixed (#3175), andGuide_gravitydocuments itsGparameter (#3170), by @willendElliptic_guide_gravitystable undermccode-clangformat, by @willend in #3177
Examples
PSI_ICONsplit into shared beamline and camera parts, with foil and porous-sample variants (Union and NCrystal), by @willend in #3146
McXtrace only
Mirror_curved: new implementation with double curvature, fixed intersections and phase,yheightpreferred towidth.Test_KB,MAXII_811andJJ_SAXSrewritten with working KB mirrors,SOLEIL_PUMAsimplified, and test values updated. By @farhi in #3137, #3151, #3156Mirror_elliptic: only the lower half of the ellipsoid reflects, back reflections for de-focusing, a safe grazing angle and the phase applied on reflection, by @farhi in #3186Mirror_parabolic: rays hit the curved surface and reflections are kept, with fixes for one-sided mirrors and the display, by @farhi and @willend in #3191Grating_reflect: lost sign in the interference phase, non-conical assumption, zero-weight rays and normalisation fixed, by @farhi in #3168Grating_trans: 0th order and double-counted absorption fixed, NIST data files checked, by @farhi in #3161Filter: refraction for all shapes, including OFF files, by @willend in #3172PowderN: incoherent cross-section units and state fixed (#3144). NewPowderN_porouscomponent, andILL_NeXT_Xraysplit into source and detector parts with porous-sample variants (#3158), by @willendSource_lab: code clean-up and messages, by @farhi in #3157Isotropic_Sqwstable undermccode-clangformat, by @willend in #3177
Full Changelog: v3.10.3...v3.10.4