Component Manual for the Neutron Ray-Tracing Package McStas, version 3.8.6

1.5  Component source code

Source code for all components may be found in the MCSTAS library subdirectory of the McStas installation; the recommended installation route is via the conda-forge channel (see the User Manual, section on installation), in which case the library lives under the conda environment’s resource tree. The library location may be queried with mcrun --showcfg=resourcedir, or overridden using the MCSTAS environment variable.

In case users only require to add new features, preserving the existing features of a component, using the EXTEND keyword in the instrument description file is recommended. For larger modification of a component, it is advised to make a copy of the component file into the working directory. A component file in the local directory will in McStas take precedence over a library component of the same name.