Skip to content

McStas/McXtrace version 3.6.0

Choose a tag to compare

@willend willend released this 11 Dec 21:58
· 56 commits to main since this release
7ef256f

What's Changed - Main Highlights:

Overall release focus:

  • Code quality improvements: Suppression of warnings from c-compilers and our static code analysis tool cppcheck
  • Continuous integration improvement: Any change in instrument/component code is tested via GitHub CI features

New tool features / capabilities:

  • mcrun/mxrun simulation launch tool: (@willend)
    • Scans can be parallelised at the "step number" level, use --scan_split. Contribution from @Lomholy.
    • If installed, cppcheck can be used to perform static code analysis on the generated code, use -C/--c-lint?
    • Improved string-handling in input parameters, e.g. in use with NCrystal config strings. Contribution from @tkittel.
  • mcplot/mxplot simulation plot tools: (@willend)
    • Better support for 'intermediate saves' done via kill -USR2 or Progress_bar, and plots should work on an unfinished simulation.
    • Plotting a completed simulation with 'intermediate saves' will give you latest plot version in the 2D case and multiple, overplotted curves in the 1D case
    • The mcplot-matlab/mxplot-matlab tool is back. You need to manually install either Matlab or Octave to make use of this
  • mcdisplay/mxdisplay instrument visualisation tools: (@willend)
    • On conda-based installations, the mcdisplay-cad/mxdisplay-cad tool includes the cadquery dependency. On completion of building the model, the OS is asked to handle the resulting CAD model.
    • The mcdisplay-matlab/mxdisplay-matlab tool is back. You need to manually install either Matlab or Octave to make use of this
    • For better integration with McStasScript, the mcdisplay-webgl-classic/mxdisplay-webgl-classic is used in such scenarios
    • The 'newer/fancy' mcdisplay-webgl/mxdisplay-webgl based on THREE.js, react and other javascript requires a slightly time-consuming installation process on 1st launch. The user now gets an info box about this.
    • The McStas-specific mcdisplay-mantid IDF generator tool received a bug fix for OFF geometry detectors.
  • mcdoc/mxdoc documentation tool: (@willend)
    • Higher quality / more complete comp/instr doc pages
  • mctest/mxtest test tool: (@willend)
    • Easier to use locally for component/instrument developers

Components and instruments:

McXtrace:

  • The Fluorescence components have a new flag to enhance statistics/signal from low concentration materials. Work by @farhi.

McStas:

  • The Union subsystem now handles 'surface physics' with the introduction of a system of refraction/reflection processes on geometry surfaces. Work by @mads-bertelsen.
  • The Union subsystem now has a functional 3D-mesh system (Union_mesh) that supports CAD style geometries. (Ascii/binary STL files and OFF files are supported. - For now only those with triangular meshing.) Work by @Lomholy.
  • As part of the overall code-quality improvement process, various aspects of the Union subsystem have been tested / improved / revised. Contributions by @tkittel and @willend in close collaboration with @mads-bertelsen.
  • New ISIS-related instrument files, components and data:
    • ISIS_LET by Ross Stewart and Rob Bewley, serves as test-instrument for Commodus_I3 (ISIS source model - corresponds to ViewModISIS with a different parameter interface)
    • Updated / larger set of input files for the ISIS moderator components
    • Multilayer_sample from Rob Dalgliesh was updated with nrepeats which allows to repeat an SLD material stack. ISIS_CRISP was updated to include this feature.
    • TOF_PSDmonitor_toQ is a new component with built-in data reduction from Rob Dalgliesh. Uses ToF to calculate Q. Test_TOF_PSDmonitor_toQ is a basic instrument to showcase the component.
  • Several of the basic McStas sample components received a systematic validation against analytical methods, thanks to @Lomholy with help from KU/NBI students.
  • As part of the overall code-quality improvement process, the whole component / instrument base got a BIG overhaul as such (@willend)

Platform support:

  • The Windows/conda platform which uses the MSVC compiler is now fully functional for all McStas code and a good part of the McXtrace code. As part of this process a new header-file mccode-complex-lib.h should be used by all code requiring complex numbers. (Implements functions for e.g. +-*/ operations across platforms - MSVC does not self implement these operations...) @willend

What's Changed - Details:

Common changes to McStas and McXtrace

  • Code quality improvements

  • User gui / command line tools:

    • mcrun:
      • Run scan steps in parallel - one scan step pr. one cpu core by @Lomholy in #2081 (similar to now-deprecated, historical feature of mcrun.pl)
      • Implement env vars to override mpirun setting by @willend in #2087 (MCSTAS_MPIRUN_OVERRIDE / MCXTRACE_MPIRUN_OVERRIDE )
      • Implement 'cppcheck' linting support on Unix, use mcrun -C or mcrun --c-lint
      • Improved error-handling in mccode.py by @willend in #2139
      • Fixes for parameter quoting issues by @tkittel in #2151
    • mcgui:
    • mcplot:
      • Use multiple # Data entries in output files if -USR2 is used for intermediate saves by @willend in #2181
      • mcplot plot only last # Data block in files with multiple entries by @willend in #2182
      • Bring back mcplot-matlab/octave by @willend in #2256
      • Correct visualisation artefacts in Matlab/multiline mcdisplay by @willend in #2257
    • mcdisplay:
      • Let mcdisplay-webgl and -classic honour -d directory by @willend in #2093
      • mcdisplay-webgl 1st run notice (wait until node.js install is done) @willend in #2140
      • Bring back mcdisplay-matlab/octave by @willend in #2256
      • Correct visualisation artefacts in Matlab/multiline mcdisplay by @willend in #2257
      • Minor tool improvements: mcdisplay-cad by @willend in #2258
    • mcdoc:
      • mcdoc is now more tolerant to e.g. missing asterisks in header by @willend in #2121
      • mcdoc fills in "short description" if not found by parsing by @willend in #2123
      • Improve clarity of mcdoc Generate buttion and clipboard by @willend in #2141
      • Allow mcdoc to work with --dir . by @willend in #2147
      • Bugfix to filtered search #2148
      • Fix mcdoc for single-file search (e.g. BNL_H8.instr) by @willend in #2166
      • Mcdoc patch, tolerate missing ^* in header description / parameters by @willend in #2179
    • mctest:
      • Implement 'cppcheck' linting support on Unix, use mctest --lint
      • Update mctest with log of attained test value by @willend in #2161
      • Add --local=DIR input to mctest, will test instruments from that folder instead of 'system' by @willend in #2221
      • Add mctest feature to filter tested instruments by use of given COMP by @willend in #2236
  • Code generator/Grammar/runtime libs:

    • Let -pygen generated McStasScript code propose using mcdisplay-webgl-classic in Jupyter by @willend in #2091
  • Common work on McStas / McXtrace components

    • Include all %{%} section in Arm comp(s) as we propose these as "template" comps by @willend in #2165
    • Let random numbers picked in INITIALIZE become controlled by --seed by @willend in #2227

McXtrace specific:

  • mcxtrace:Fluorescence: flag enhance low concentrations by @farhi in #2237

McStas specific:

Behind the scenes:

  • Deployment and CI

    • The 'autobuild' workflows automatically build non-conda packages for McStas and McXtrace on any new release tag by @willend in #2079
    • Automated testing of modified instrs/comps by @willend in #2100, #2101, #2102
    • Nightly tests based on conda by @willend in #2106
    • CI: Run "full test" in case 20 or more comps/instrs have been changed. by @willend in #2126
    • Transition to conda-based basictests for Windows and macOS by @willend in #2191
    • Handle case with single modified comp (and no matching instr) better by @willend in #2197
    • Minor ci change: Avoid running duplicate version of same instr by @willend in #2223
    • Deploy --comp=COMP filter to test instruments including changed components by @willend in #2238
  • Platform support

  • General maintenance

    • Minor fixes, contributions from Daniel Lomholt by @willend in #2108
    • Fix header typo by @willend in #2109
    • GPU-related edits for V Transmission_V_polarisator.comp and Test_StatisticalChopper.instr by @willend in #2110
    • If running under conda, add env prefix when saving/loading user mccode_config by @willend in #2142
    • Temporarily, avoid deploying xraylib via brew on macOS 15 by @willend in #2145, #2146
    • Fix SDKROOT assignment for macOS configuration by @willend in #2157
    • Fix to autobuild scripts, remove v from tag... by @willend in #2170
    • Drop xrl-based test on macOS (we should use conda instead) by @willend in #2180
    • Remove mcplot-html dep python3-pyqt5.qtsvg to get python3-pyqt6.qtsvg by @willend in #2184
    • Suppress superfluous debug string in mctest by @willend in #2185
    • Temporarily disable test McXtrace randvec_target_rect by @willend in #2186
    • Beef up statistics 20 fold on Test_RNG instruments by @willend in #2187
    • Drop macOS 13 which will soon be deprecated by @willend in #2189
    • Partial revert on macOS bundle injector by @willend in #2193
    • Adjustment of %Example values that were off for the nightly test scenarios by @willend in #2194
    • Use rglob in cleanfiles tool, rmtree in case of out.dsym by @willend in #2211
    • Clean simdirs by @willend in #2212
    • Update workflows to use same simdir cleanup strategy everywhere by @willend in #2213
    • Various work on CI output and platforms by @willend in #2217
    • GPU box update by @willend in #2233
    • Recent linter patches require corrections for GPU/OpenACC... by @willend in #2235
    • Deprecate unused features of 'mctest' by @willend in #2239
    • Add timestamp to 'testroot' folder to avoid double-layer file structure by @willend in #2241
    • Restore ability to "run version via config file" in mctest by @willend in #2244
    • Preparations 3.6 by @willend in #2254

New Contributors

Full Changelog: v3.5.32...v3.6.0