Releases: McStasMcXtrace/McCode
Yet another mcxtrace pre-release (3.4.25) for conda
mcxtrace-3.4.25 Put "multi-gpu-wrapper" script in BINDIR and prefix by FLAVOR
Yet another mcstas pre-release (3.4.25) for conda
mcstas-3.4.25 Put "multi-gpu-wrapper" script in BINDIR and prefix by FLAVOR
Yet another mcxtrace pre-release (3.4.24) for conda
Sync latest changes to conda
Yet another mcstas pre-release (3.4.24) for conda
Sync latest changes to conda
Yet another mcstas pre-release (3.4.23) for conda
Most non-mcpl, non-ncrystal instruments now compile and run...
McStas 3.4 release
McStas 3.4 is the fifth official release in the 3.x series, with a modernised code-generator and support for GPU acceleration on NVIDIA cards.
3.4 is a 'major' update with notable changes, e.g. tighter integration/interoperability with McStasScript, new grammar and further CMake-standardisation which will eventually bring McStas to the conda-forge ecosystem. (And todaay, almost all dependencies for McStas are brought by mamba/conda on macOS and Windows.) Thanks to Thomas Kittelmann (ESS) for lots of help and footwork!
Another notable change is that MCPL and NCrystal are now distributed in stand-alone .deb / .rpm packages that are McStas-release-independent, for convenience still available through the packages.mccode.org repository. Please install using e.g.
apt install mcpl ncrystal
(The MCPL and NCrystal codes have been submitted to the Debian ecosystem by Synchrotron SOLEIL / Emmanuel Farhi / Roland Mas and should make it to the next Debian Stable, the same procedure is also under way for McStas.)
Thanks:
Thanks to all members of the joint McStas-McXtrace team and input from our users via emails and GitHub issues alike!
Download and installation instructions are available via our GitHub INSTALL-doc pages.
Selected highlights from the releass are listed below. The full list changes is also available at https://mcstas.org/CHANGES_McStas.
Fixes of issues from last 3.x release:
A number of issues from 3.3 were addressed, see the relevant GitHub issues for details
Installation:
As usual, our install docs are available on the McCode GitHub pages
The meta-packages for Debian/Ubuntu and RedHat/Centos/Fedora are named e.g. mcstas-suite-python-ng for 'next generation' for coexistance with the 2.x series packages.
(!!! Please note that there will be no future 2.x releases !!!)
Tools:
We are no longer supporting / distributing the Perl-based tool set as all functionality has finally been ported to the Python tool set (which has been default since v. 2.4)
mcrun now supports an set of "optimisation" switches to allow evaluating an instrument as "object function". Thanks to Emmanuel Farhi for working on this. Please use
mcrun --help
in your McStas terminal to learn about details of switches and parameters or see the the changelog for a full description.
McStas now ships with a "python-aware" code generator for generating "McStasScript" code, example:
mcstas-pygen Instrument.instr generates the .py script Instrument_generated.py
Using 'jupytext' this file may easily be converted to a notebook:
jupytext --to ipynb Instrument_generated.py generates notebook file Instrument_generated.ipynb
See https://github.com/PaNOSC-ViNYL/McStasScript and https://mads-bertelsen.github.io/ for more information on McStasScript.
McStasScript is included with McStas 3.4 on macOS and Windows and readily configured for use with McStas 3.4 and its embedded Python version. For sake of user convenience, Jupyterlab is also included on these platforms, use 'jupyter lab' from within the McStas 'environment' to work with a McStasScript notebook.
Components and Instruments:
In relation to the HighNESS project, the Wolter-optic components Conics_* have been given an overhaul by Mads Bertelsen. New related instrument WOFSANS is included with McStas 3.4.
Thanks to the work of José Robledo (FZJ), we now have a better interface to the Small-Angle Scattering models from SASview, aka. SASmodels. Due to the big number of included models that each correspond to a McStas component (94 in total!), these are now found in the "sasmodels" folder of your McStas installation. Two example instruments are also included: Test_SasView_bcc_paracrystal_aniso.instr and Test_SasView_guinier.instr.
The strain-scanning instrument ILL_SALSA.instr was contributed by Daniel Lomholt Christensen, Uni Copenhagen and ILL.
Core simulation framework / code-generator:
As mentioned above, mcstas-pygen can generate a McStasScript notebook from you existing .instr file.
New "unit" grammar for defining physcical units for instrument parameters from Greg S. Tucker (ESS), example:
DEFINE INSTRUMENT template(lambda / "Aa" = 2.36)
see the changelog for full description.
New METADATA grammar from Greg S. Tucker (ESS), can be used to attach verbatim code/information to one or more component instances. See the changelog for full description.
START your migration to 3.x:
Following the release of 3.4, we will no longer systematically be releasing updates to the 2.x series.
The Wiki has a dedicated section on McStas 2.x -> McStas 3.x conversion. Please use it!
If you are in trouble converting your instrument, please write us a GitHub issue or an email to [email protected]
We hope you will enjoy this new release!!!
mcxtrace-3.1-release
December 16th 2022: McXtrace 1.7.1 and McXtrace 3.1 released
Dear all, A new PAIR of releases of McXtrace:
McXtrace "classic" v. 1.7.1
McXtrace "next-generation", v. 3.1
are both built and ready for download!
Download and installation instructions are available via our GitHub INSTALL-doc pages and also available for some platforms below.
Selected highligts from the releases are listed below. The full list of changes for both releases is also available at our CHANGES_McXtrace document
Please start your migration to 3.x:
McXtrace 1.7.1 is very likely the "last update" to the 1.x series, sharing a subset of tool features with McXtrace 3.1. The Wiki has a dedicated section on McXtrace 1.x -> McXtrace 3.x conversion that includes:
An overview of differences
A nomenclature list containing short descriptions of new concepts and important keywords in McXtrace 3.x and OpenACC / CUDA code in general.
A document outlining the most importand differences between 1.x and 3.x.
A guide for 1.x -> 3.x instrument conversion.
A guide for 2.x -> 3.x component conversion.
- If you are still in trouble, please write us a GitHub issue or an email to [email protected]
Release highligts
(!!3.1 only denotes features or improvements that are 3.1 specific!!)
Documentation & guides:
The component pages now include an extra column in the parameter-table. When filling in this column with wanted values, plus filling the entry-boxes for AT, ROTATED and instance name, pressing "Generate" will put a code-snipet for your component instance directly on your computer clipboard, for easy transfer to the mxgui editor or any other editor of choice!
mxdoc has been made "less picky" wrt. component and instrument structure for a more robust experience.
mxgui has a new "Docs" button for easier access to the generated mxdoc pages (that give easy access to components, instruments, manuals, datafiles and more.
Interoperability with other codes:
We have worked on the interface with MCPL (v. 1.6.1 included) and a mechanism was developed to automatically detect its location using the mcpl-config util. In practice this happens prior/during to the code-generation step, see below under mxrun. Thanks to Thomas Kittelmann (ESS) for your help in this area.
Tools:
mxrun has a new solution to support 3 new keywords CMD(), ENV() and GETPATH() through the DEPENDENCY line as collected by the code-generator. (see CHANGES doc for more details)
As mentioned above, mxdoc has been made "less picky" wrt. component and instrument structure and enriched with JavaScript for easy transfer of information to you editor.
mxplot(-pyqtgraph) has received a nice update with an infobar at the bottom of the window. The infobar is updated with coordinates of the cursor on the active plot, meaning that you can easily determine the coordinates of e.g. a peak. The code has also received a number of bugfixes relating to colorbars, the order of monitor output in overviews etc. Thanks to Tobias Weber (ILL) for your work on mxplot.
3.1 only: The new mxdisplay-cad variant has come along, and is currently included in the form of a technology-preview. The code uses the Python module cadquery (https://github.com/CadQuery/cadquery) and is able to write e.g. STEP or STL output. For now, resolving the required dependencies is left to the user, but we foresee that this tool will mature over the coming releases. Thanks to Greg Tyler (ESS) for contributing this tool.
Components and Instruments:
3.1 only: Most of the standard monitors will now fill in their own "instance name" as filename in case a filename was not defined. A small but very useful convenience.
The Isotropic_Sqw sample which can be used to model structure and dynamics in isotropic materials, such as powders and liquids has been added. The component is developed by Emmanuel Farhi and also exists in the McStas code. The component is currently in "Experimental" state in McXtrace.
Multiple new SOLEIL instruments have been added, thanks to lots of work from Antoine Pado, Stephane Bac and Emmanuel Farhi:
SOLEIL_ANATOMIX.instr tomography beam-line
SOLEIL_DISCO.instr in the imaging mode
SOLEIL_MARS.instr in the XRD mode
SOLEIL_PX2a.instr protein crystallography beam-line
The AstroX toolbox for simulating X-ray telescopes has been included as a special component category.3.1 only: GPU support in the related components/instruments is newly developed and likely not perfect in all cases.
Lens_elliptical.comp fixed
Grating_reflect.comp fixed, and created a test for it.
Udated/fixed Mirror_elliptic.comp and created a test for it.
Beamline ssrl 11-2 (in it's unfocused and uncollimated mode) added (related to work done on glitches).
Czerny_Turner instrument created.
Single_crystal component, corrected absorption cross-section.
Core and libs:
3.1 only: Previously, any component present in a McXtrace instrument would trigger the transformation of every photon to its local coordinate system, even in the case of an Arm() (empty TRACE) without an EXTEND block. We now instead detect components with an empty TRACE that have no EXTEND block and are able to completely skip these in the calculation. This results in a speedup in case of instruments with many "empty" components. Thanks to Mads Bertelsen (ESS) for investigating the problem and finding a good solution.
3.1 only: A new syntax called SHELL has been added to the grammar, allowing users to run a system command prior to code-generation. This may for instance be used to generate an instrument-snippet that you may %include in the instrument (think for-loops of an assembly of identical components). One could also imagine compilation of a needed library, wget of a data file etc. The synax is SHELL "command-to-execute" and it should be placed directly after a DEPENDENCY line within an instrument or component. We expect that applications and examples will come in the next couple of releases.
3.1 only: Components may from McXtrace 3.1 request USERVARS that become part of the particle struct. (For the time being only in the form of basic C types like double, int etc. and corresponding arrays / pointers.) This will mean that e.g. the optimisations in Single_crystal and PowderN in SPLIT scenarios can be introduced also in GPU settings.
A flaw was spotted in our NeXus implementation in the case of event lists: A small chunk-size of (1,6) was used, leading to slow I/O and lots of size-overhead. Thanks to Simon Heybrock (ESS) for spotting this!
Platforms:
We still support 64bit Windows 10/11 on Intel, all recent 64bit macOS including 11.x - 13.x Monterey on both Intel and Apple Silicon/M1 processors. Debian/Ubuntu-based distros on Intel and Arm, our RPM-based distro is Fedora on Intel. (Official support for CentOS has been dropped, but you should be able to "roll your own" from the src packages.)
Our Docker and binder containers will be updated within the following weeks.
We hope you will enjoy these new releases!!!
mcxtrace-1.7.1-release
December 16th 2022: McXtrace 1.7.1 and McXtrace 3.1 released
Dear all, A new PAIR of releases of McXtrace:
McXtrace "classic" v. 1.7.1
McXtrace "next-generation", v. 3.1
are both built and ready for download!
Download and installation instructions are available via our GitHub INSTALL-doc pages and also available for some platforms below.
Selected highligts from the releases are listed below. The full list of changes for both releases is also available at our CHANGES_McXtrace document
Please start your migration to 3.x:
McXtrace 1.7.1 is very likely the "last update" to the 1.x series, sharing a subset of tool features with McXtrace 3.1. The Wiki has a dedicated section on McXtrace 1.x -> McXtrace 3.x conversion that includes:
An overview of differences
A nomenclature list containing short descriptions of new concepts and important keywords in McXtrace 3.x and OpenACC / CUDA code in general.
A document outlining the most importand differences between 1.x and 3.x.
A guide for 1.x -> 3.x instrument conversion.
A guide for 2.x -> 3.x component conversion.
- If you are still in trouble, please write us a GitHub issue or an email to [email protected]
Release highligts
(!!3.1 only denotes features or improvements that are 3.1 specific!!)
Documentation & guides:
The component pages now include an extra column in the parameter-table. When filling in this column with wanted values, plus filling the entry-boxes for AT, ROTATED and instance name, pressing "Generate" will put a code-snipet for your component instance directly on your computer clipboard, for easy transfer to the mxgui editor or any other editor of choice!
mxdoc has been made "less picky" wrt. component and instrument structure for a more robust experience.
mxgui has a new "Docs" button for easier access to the generated mxdoc pages (that give easy access to components, instruments, manuals, datafiles and more.
Interoperability with other codes:
We have worked on the interface with MCPL (v. 1.6.1 included) and a mechanism was developed to automatically detect its location using the mcpl-config util. In practice this happens prior/during to the code-generation step, see below under mxrun. Thanks to Thomas Kittelmann (ESS) for your help in this area.
Tools:
mxrun has a new solution to support 3 new keywords CMD(), ENV() and GETPATH() through the DEPENDENCY line as collected by the code-generator. (see CHANGES doc for more details)
As mentioned above, mxdoc has been made "less picky" wrt. component and instrument structure and enriched with JavaScript for easy transfer of information to you editor.
mxplot(-pyqtgraph) has received a nice update with an infobar at the bottom of the window. The infobar is updated with coordinates of the cursor on the active plot, meaning that you can easily determine the coordinates of e.g. a peak. The code has also received a number of bugfixes relating to colorbars, the order of monitor output in overviews etc. Thanks to Tobias Weber (ILL) for your work on mxplot.
3.1 only: The new mxdisplay-cad variant has come along, and is currently included in the form of a technology-preview. The code uses the Python module cadquery (https://github.com/CadQuery/cadquery) and is able to write e.g. STEP or STL output. For now, resolving the required dependencies is left to the user, but we foresee that this tool will mature over the coming releases. Thanks to Greg Tyler (ESS) for contributing this tool.
Components and Instruments:
3.1 only: Most of the standard monitors will now fill in their own "instance name" as filename in case a filename was not defined. A small but very useful convenience.
The Isotropic_Sqw sample which can be used to model structure and dynamics in isotropic materials, such as powders and liquids has been added. The component is developed by Emmanuel Farhi and also exists in the McStas code. The component is currently in "Experimental" state in McXtrace.
Multiple new SOLEIL instruments have been added, thanks to lots of work from Antoine Pado, Stephane Bac and Emmanuel Farhi:
SOLEIL_ANATOMIX.instr tomography beam-line
SOLEIL_DISCO.instr in the imaging mode
SOLEIL_MARS.instr in the XRD mode
SOLEIL_PX2a.instr protein crystallography beam-line
The AstroX toolbox for simulating X-ray telescopes has been included as a special component category.3.1 only: GPU support in the related components/instruments is newly developed and likely not perfect in all cases.
Lens_elliptical.comp fixed
Grating_reflect.comp fixed, and created a test for it.
Udated/fixed Mirror_elliptic.comp and created a test for it.
Beamline ssrl 11-2 (in it's unfocused and uncollimated mode) added (related to work done on glitches).
Czerny_Turner instrument created.
Single_crystal component, corrected absorption cross-section.
Core and libs:
3.1 only: Previously, any component present in a McXtrace instrument would trigger the transformation of every photon to its local coordinate system, even in the case of an Arm() (empty TRACE) without an EXTEND block. We now instead detect components with an empty TRACE that have no EXTEND block and are able to completely skip these in the calculation. This results in a speedup in case of instruments with many "empty" components. Thanks to Mads Bertelsen (ESS) for investigating the problem and finding a good solution.
3.1 only: A new syntax called SHELL has been added to the grammar, allowing users to run a system command prior to code-generation. This may for instance be used to generate an instrument-snippet that you may %include in the instrument (think for-loops of an assembly of identical components). One could also imagine compilation of a needed library, wget of a data file etc. The synax is SHELL "command-to-execute" and it should be placed directly after a DEPENDENCY line within an instrument or component. We expect that applications and examples will come in the next couple of releases.
3.1 only: Components may from McXtrace 3.1 request USERVARS that become part of the particle struct. (For the time being only in the form of basic C types like double, int etc. and corresponding arrays / pointers.) This will mean that e.g. the optimisations in Single_crystal and PowderN in SPLIT scenarios can be introduced also in GPU settings.
A flaw was spotted in our NeXus implementation in the case of event lists: A small chunk-size of (1,6) was used, leading to slow I/O and lots of size-overhead. Thanks to Simon Heybrock (ESS) for spotting this!
Platforms:
We still support 64bit Windows 10/11 on Intel, all recent 64bit macOS including 11.x - 13.x Monterey on both Intel and Apple Silicon/M1 processors. Debian/Ubuntu-based distros on Intel and Arm, our RPM-based distro is Fedora on Intel. (Official support for CentOS has been dropped, but you should be able to "roll your own" from the src packages.)
Our Docker and binder containers will be updated within the following weeks.
We hope you will enjoy these new releases!!!
mcstas-3.2-release
December 12th, 2022: McStas 2.7.2 and McStas 3.2 released
Dear all, A new PAIR of releases of McStas:
- McStas "classic" v. 2.7.2
- McStas "next-generation", v. 3.2
Download and installation instructions are available via our GitHub INSTALL-doc pages - and available below as attachments for the most usual platforms.
Selected highligts from the releases are listed below. The full list of changes for both releases is also available in CHANGES_McStas.
Please start your migration to 3.x:
- McStas 2.7.2 is a "last update" to the 2.x series, sharing a subset of tool features with McStas 3.2.
- The Wiki has a dedicated section on McStas 2.x -> McStas 3.x conversion that includes:
- An overvies of differences
- A nomenclature list containing short descriptions of new concepts and important keywords in McStas 3.x and OpenACC / CUDA code in general.
- A document outlining the most importand differences between 2.x and 3.x.
- A guide for 2.x -> 3.x instrument conversion.
- A guide for 2.x -> 3.x component conversion.
Fixes of issues from last releases:
A good number of issues from the earlier 2.7.1 and 3.1 releases were addressed, see the relevant GitHub issues for details:
Full
2.7.1 issue list
Full
3.1 issue list
Release highligts
(!!3.2 only denotes features or improvements that are 3.2 specific!!)
- Documentation & guides:
- 3.2 only: All 3.2 component and instrument headers have been given an overhaul and should render correctly in mcdoc / your browser.
- The component pages now include an extra column in the parameter-table. When filling in this column with wanted values, plus filling the entry-boxes for AT, ROTATED and instance name, pressing "Generate" will put a code-snipet for your component instance directly on your computer clipboard, for easy transfer to the mcgui editor or any other editor of choice!
- mcdoc has been made "less picky" wrt. component and instrument structure for a more robust experience.
- mcgui has a new "Docs" button for easier access to the generated mcdoc pages (that give easy access to components, instruments, manuals, datafiles and more.
- Interoperability with other codes:
- We have worked on the interfaces with MCPL (v. 1.6.1 included) and NCrystal (v. 3.5.1 included) and a mechanism was developed to automatically detect their location using the mcpl-config and ncrystal-config utils. In practice this happens prior/during to the code-generation step, see below under mcrun. Thanks to Thomas Kittelmann (ESS) for your help in this area.
- Tools:
- mcrun has a new solution to support 3 new keywords CMD(), ENV() and GETPATH() through the DEPENDENCY line as collected by the code-generator. (see CHANGES doc for more details)
- As mentioned above, mcdoc has been made "less picky" wrt. component and instrument structure and enriched with JavaScript for easy transfer of information to you editor.
- mcplot(-pyqtgraph) has received a nice update with an infobar at the bottom of the window. The infobar is updated with coordinates of the cursor on the active plot, meaning that you can easily determine the coordinates of e.g. a peak. The code has also received a number of bugfixes relating to colorbars, the order of monitor output in overviews etc. Thanks to Tobias Weber (ILL) for your work on mcplot.
- 3.2 only: The new mcdisplay-cad variant has come along, and is currently included in the form of a technology-preview. The code uses the Python module cadquery (https://github.com/CadQuery/cadquery) and is able to write e.g. STEP or STL output. For now, resolving the required dependencies is left to the user, but we foresee that this tool will mature over the coming releases. Thanks to Greg Tyler (ESS) for contributing this tool.
- Components and Instruments:
- The Union framework is now considered a fully "official" part of McStas and is hence now found in the $MCSTAS/union folder. In McStas 3.2 Union_master is a still a NOACC component when running on GPU (i.e. performs its calculations on CPU in FUNNEL mode). We expect Union_master to receive full GPU suport within 2023. The NCrystal_process.comp is back in Union on 3.2 - will work only in a NOACC/CPU COMPONENT setting.
- By popular demand, the ConicTracer code for simulating Wolter optics from Boris Khaykovich et. al. (MIT) has been included. The main "library" code is conic.h found in $MCSTAS/share and is used from 3 different example Wolter optic components: Conics_EH.comp, Conics_PH.comp, Conics_PP.comp. The illustrate how to mplement Elliptic-Hyperbolic, Parabolic-Hyperbolic and Parabolic-Parabolic Wolter mirrors, and two of these are used in the Test_Conics_pairs.instr instrument.
- 3.2 only: Most of the standard monitors will now fill in their own "instance name" as filename in case a filename was not defined. A small but very useful convenience.
- Source_div_quasi.comp allows to sample source phase-space using Halton-sequences, which proves to be a very effective way to ensure an evenly distributed phase space region of interest, e.g. for imaging/SANS settings where a very low-divergent beam is relevant. This contribution is from Mads Carlsen and Erik B. Knudsen (DTU) and was originally developed for McXtrace.
- PSD_Pol_monitor.comp measures (local) polarisation over the (x,y) cross-section of a beam. Contributed by Alexander Backs (LU/ESS).
- 3.2 only: Single_crystal_inelastic.comp (NOACC), Single_magnetic_crystal.comp (NOACC), SANS_benchmark2.comp and Guide_multichannel are now all available in the McStas 3 series. Also, the Fermi_chop2a.comp and Vertical_T0a.comp chopppers from Garrett Granroth (SNS) have received a GPU-oriented update.
- Core and libs:
- 3.2 only: Previously, any component present in a McStas instrument would trigger the transformation of every neutron to its local coordinate system, even in the case of an Arm() (empty TRACE) without an EXTEND block. We now instead detect components with an empty TRACE that have no EXTEND block and are able to completely skip these in the calculation. This results in a speedup in case of instruments with many "empty" components, such as big Union assemblies. Thanks to Mads Bertelsen (ESS) for investigating the problem and finding a good solution.
- 3.2 only: A new syntax called SHELL has been added to the grammar, allowing users to run a system command prior to code-generation. This may for instance be used to generate an instrument-snippet that you may %include in the instrument (think for-loops of an assembly of identical components). One could also imagine compilation of a needed library, wget of a data file etc. The synax is SHELL "command-to-execute" and it should be placed directly after a DEPENDENCY line within an instrument or component. We expect that applications and examples will come in the next couple of releases.
- 3.2 only: Components may from McStas 3.2 request USERVARS that become part of the particle struct. (For the time being only in the form of basic C types like double, int etc. and corresponding arrays / pointers.) This will mean that e.g. the optimisations in Single_crystal and PowderN in SPLIT scenarios can be introduced also in GPU settings. The first component to make use of this mechanism is Res_monitor.comp as used in Test_TasReso.instr.
- The (r-)interoff-lib.c family of codes have received multiple updates, thanks to McStas users
Kyle Grammer (ORNL) and Gaetano Mangiapia (HZH):
- The intersection routines now work correctly with gravity
- The r-interoff-lib (and the related Guide_anyshape_r component) now support specifying a "full" reflectivity curve pr. OFF face, columns of m, alpha and W values should be added in this order to the OFF face.
- A flaw was spotted in our NeXus implementation in the case of event lists: A small chunk-size of (1,6) was used, leading to slow I/O and lots of...
mcstas-2.7.2-release
December 12th, 2022: McStas 2.7.2 and McStas 3.2 released
Dear all, A new PAIR of releases of McStas:
- McStas "classic" v. 2.7.2
- McStas "next-generation", v. 3.2
Download and installation instructions are available via our GitHub INSTALL-doc pages - and available below as attachments for the most usual platforms.
Selected highligts from the releases are listed below. The full list of changes for both releases is also available in CHANGES_McStas.
Please start your migration to 3.x:
- McStas 2.7.2 is a "last update" to the 2.x series, sharing a subset of tool features with McStas 3.2.
- The Wiki has a dedicated section on McStas 2.x -> McStas 3.x conversion that includes:
- An overvies of differences
- A nomenclature list containing short descriptions of new concepts and important keywords in McStas 3.x and OpenACC / CUDA code in general.
- A document outlining the most importand differences between 2.x and 3.x.
- A guide for 2.x -> 3.x instrument conversion.
- A guide for 2.x -> 3.x component conversion.
Fixes of issues from last releases:
A good number of issues from the earlier 2.7.1 and 3.1 releases were addressed, see the relevant GitHub issues for details:
Full
2.7.1 issue list
Full
3.1 issue list
Release highligts
(!!3.2 only denotes features or improvements that are 3.2 specific!!)
- Documentation & guides:
- 3.2 only: All 3.2 component and instrument headers have been given an overhaul and should render correctly in mcdoc / your browser.
- The component pages now include an extra column in the parameter-table. When filling in this column with wanted values, plus filling the entry-boxes for AT, ROTATED and instance name, pressing "Generate" will put a code-snipet for your component instance directly on your computer clipboard, for easy transfer to the mcgui editor or any other editor of choice!
- mcdoc has been made "less picky" wrt. component and instrument structure for a more robust experience.
- mcgui has a new "Docs" button for easier access to the generated mcdoc pages (that give easy access to components, instruments, manuals, datafiles and more.
- Interoperability with other codes:
- We have worked on the interfaces with MCPL (v. 1.6.1 included) and NCrystal (v. 3.5.1 included) and a mechanism was developed to automatically detect their location using the mcpl-config and ncrystal-config utils. In practice this happens prior/during to the code-generation step, see below under mcrun. Thanks to Thomas Kittelmann (ESS) for your help in this area.
- Tools:
- mcrun has a new solution to support 3 new keywords CMD(), ENV() and GETPATH() through the DEPENDENCY line as collected by the code-generator. (see CHANGES doc for more details)
- As mentioned above, mcdoc has been made "less picky" wrt. component and instrument structure and enriched with JavaScript for easy transfer of information to you editor.
- mcplot(-pyqtgraph) has received a nice update with an infobar at the bottom of the window. The infobar is updated with coordinates of the cursor on the active plot, meaning that you can easily determine the coordinates of e.g. a peak. The code has also received a number of bugfixes relating to colorbars, the order of monitor output in overviews etc. Thanks to Tobias Weber (ILL) for your work on mcplot.
- 3.2 only: The new mcdisplay-cad variant has come along, and is currently included in the form of a technology-preview. The code uses the Python module cadquery (https://github.com/CadQuery/cadquery) and is able to write e.g. STEP or STL output. For now, resolving the required dependencies is left to the user, but we foresee that this tool will mature over the coming releases. Thanks to Greg Tyler (ESS) for contributing this tool.
- Components and Instruments:
- The Union framework is now considered a fully "official" part of McStas and is hence now found in the $MCSTAS/union folder. In McStas 3.2 Union_master is a still a NOACC component when running on GPU (i.e. performs its calculations on CPU in FUNNEL mode). We expect Union_master to receive full GPU suport within 2023. The NCrystal_process.comp is back in Union on 3.2 - will work only in a NOACC/CPU COMPONENT setting.
- By popular demand, the ConicTracer code for simulating Wolter optics from Boris Khaykovich et. al. (MIT) has been included. The main "library" code is conic.h found in $MCSTAS/share and is used from 3 different example Wolter optic components: Conics_EH.comp, Conics_PH.comp, Conics_PP.comp. The illustrate how to mplement Elliptic-Hyperbolic, Parabolic-Hyperbolic and Parabolic-Parabolic Wolter mirrors, and two of these are used in the Test_Conics_pairs.instr instrument.
- 3.2 only: Most of the standard monitors will now fill in their own "instance name" as filename in case a filename was not defined. A small but very useful convenience.
- Source_div_quasi.comp allows to sample source phase-space using Halton-sequences, which proves to be a very effective way to ensure an evenly distributed phase space region of interest, e.g. for imaging/SANS settings where a very low-divergent beam is relevant. This contribution is from Mads Carlsen and Erik B. Knudsen (DTU) and was originally developed for McXtrace.
- PSD_Pol_monitor.comp measures (local) polarisation over the (x,y) cross-section of a beam. Contributed by Alexander Backs (LU/ESS).
- 3.2 only: Single_crystal_inelastic.comp (NOACC), Single_magnetic_crystal.comp (NOACC), SANS_benchmark2.comp and Guide_multichannel are now all available in the McStas 3 series. Also, the Fermi_chop2a.comp and Vertical_T0a.comp chopppers from Garrett Granroth (SNS) have received a GPU-oriented update.
- Core and libs:
- 3.2 only: Previously, any component present in a McStas instrument would trigger the transformation of every neutron to its local coordinate system, even in the case of an Arm() (empty TRACE) without an EXTEND block. We now instead detect components with an empty TRACE that have no EXTEND block and are able to completely skip these in the calculation. This results in a speedup in case of instruments with many "empty" components, such as big Union assemblies. Thanks to Mads Bertelsen (ESS) for investigating the problem and finding a good solution.
- 3.2 only: A new syntax called SHELL has been added to the grammar, allowing users to run a system command prior to code-generation. This may for instance be used to generate an instrument-snippet that you may %include in the instrument (think for-loops of an assembly of identical components). One could also imagine compilation of a needed library, wget of a data file etc. The synax is SHELL "command-to-execute" and it should be placed directly after a DEPENDENCY line within an instrument or component. We expect that applications and examples will come in the next couple of releases.
- 3.2 only: Components may from McStas 3.2 request USERVARS that become part of the particle struct. (For the time being only in the form of basic C types like double, int etc. and corresponding arrays / pointers.) This will mean that e.g. the optimisations in Single_crystal and PowderN in SPLIT scenarios can be introduced also in GPU settings. The first component to make use of this mechanism is Res_monitor.comp as used in Test_TasReso.instr.
- The (r-)interoff-lib.c family of codes have received multiple updates, thanks to McStas users
Kyle Grammer (ORNL) and Gaetano Mangiapia (HZH):
- The intersection routines now work correctly with gravity
- The r-interoff-lib (and the related Guide_anyshape_r component) now support specifying a "full" reflectivity curve pr. OFF face, columns of m, alpha and W values should be added in this order to the OFF face.
- A flaw was spotted in our NeXus implementation in the case of event lists: A small chunk-size of (1,6) was used, leading to slow I/O and lots ...