-
Notifications
You must be signed in to change notification settings - Fork 54
template_instrument_basic
jaga-mcstas edited this page Jun 10, 2015
·
1 revision
/******************************************************************************* * Instrument: (instrument name) * * %I * Written by: (your name (email)) * Date: (current date) * Origin: (your institution) * Release: (McStas V.X.X) * Version: (instrument version) * %INSTRUMENT_SITE: (your SITE) * * (instrument short description) * * %D * (instrument description) * * Example: (parameters=values) * * %P * (parameter1): [(unit)] (parameter1 description) * ... * * %L * (reference/HTML link) * * %E *******************************************************************************/ /* instrument definition: name, parameters & default values */ DEFINE INSTRUMENT template_body_simple(Par1=1) /* declare variables and functions in C syntax */ DECLARE %{ %} /* any C code here is executed when the simulation starts */ INITIALIZE %{ %} /* in the TRACE section, the instrument is defined as a sequence of components. */ TRACE /* Progress_bar() is an Arm() displaying simulation progress */ COMPONENT origin = Progress_bar() AT (0, 0, 0) ABSOLUTE /* insert components here (e.g. Insert -> Source -> Source_Maxwell_3) */ /* any C code here is executed when the simulation ends */ FINALLY %{ %} /* The END token marks the instrument definition end */ END