McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


The Adapt_check McStas Component

3.7  The Adapt_check McStas Component

Optimization specifier for the Source_adapt component.

Identification

  • Author: Kristian Nielsen

  • Origin: Risoe

  • Date: 1999

Description

This components works together with the Source_adapt component, and is used to define the criteria for selecting which neutrons are considered "good" in the adaptive algorithm. The name of the associated Source_adapt component in the instrument definition is given as parameter. The component is special in that its position does not matter; all neutrons that have not been absorbed prior to the component are considered "good".

Example: Adapt_check(source_comp="MySource")

Input parameters

Parameters in boldface are required; the others are optional.

Name

Unit

Description

Default

source_comp

string

The name of the Source_adapt component in the instrument definition.

Links

  • Component source code found in file Adapt_check.comp.

The adaptive importance sampling monitor

The component Adapt_check is used together with the Source_adapt component - see section 3.6 for details. When placed somewhere in an instrument using Source_adapt as a source, the source will optimize for neutrons that reach that point without being absorbed (regardless of neutron position, divergence, wavelength, etc).

The Adapt_check component takes as single input parameter source_comp the name of the Source_adapt component instance, for example:

1... 
2COMPONENT mysource = Source_adapt(...) 
3... 
4COMPONENT mycheck = Adapt_check(source_comp = mysource) 
5...

Only one instance of Adapt_check is allowed in an instrument.

We suggest, as alternative method, to make use of the SPLIT keyword, as described in the McStas User Manual.


Last Modified: Tuesday, 06-Oct-2026 21:19:11 CEST
Search website mailinglist archive GitHub repos