Skip to content

Improve NCrystal-McStas integration #336

Description

@tkittel

Collecting here a few features that would improve the combined NCrystal-McStas capabilities or just make the integration more easy for users. Ideas were discussed in various chats with @willend and @mads-bertelsen. Opening just a single issue here for now, but dedicated issues for specific items can be added as sub-issues later (or as issues in the mccode project):

  • Improve NCrystal-Union integration in classic .instr files, by making it possible for materials to also provide absorption values. This will do away for the need for invoking the currently utility script for generating the code.
  • Add NCrystalFilter component (name to be finalised), which takes an NCrystal-cfgstr for an isotropic material and caches the cross section curve during initialisation. During TRACE it then simply attenuates the beam accordingly. This provides a way to use NCrystal x-sect curves in a context where one does not care about the scattered neutrons, and where multiple scattering is unimportant. We could even consider using the minimc to make it possible to use multiple scattering effects or more flexible definitions of what is scattered (i.e. only attenuate anything scattering more than 0.1degree). Notably this would work on GPU. This would for instance be useful for Al-windows or Be-filters.
  • Make it possible for PowderN to accept NCrystal cfg-strings to define the material. PowderN would then get the reflection list via calls to NCrystal.
  • (after the previous item is done) Make it possible for PowderN to run ncrystal_cif2ncmat on the fly, like it can run cif2hkl currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    matcfgIssues related to material cfg (cfg-strings, Info/Scatter/Absorption factories)mcstasminimcIssues related to the MiniMC framework

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions