File: templateVanadiumMultipleScat_Mantid.instr

package info (click to toggle)
mccode 3.5.19%2Bds5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,113,256 kB
  • sloc: ansic: 40,697; python: 25,137; yacc: 8,438; sh: 5,405; javascript: 4,596; lex: 1,632; cpp: 742; perl: 296; lisp: 273; makefile: 226; fortran: 132
file content (68 lines) | stat: -rw-r--r-- 2,016 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*******************************************************************************
*         McStas instrument definition URL=http://www.mcstas.org
*
* Instrument: test (rename also the example and DEFINE lines below)
*
* %Identification
* Written by: Anders Markvardsen and Peter Willendrup
* Date: 201x
* Origin: ISIS
* %INSTRUMENT_SITE: Mantid
*
* Instrument demonstrating how to bring multiple scattering information from
* a McStas simulation to Mantid (using NeXus output).
*
* %Description
* Instrument demonstrating how to bring multiple scattering information from
* a McStas simulation to Mantid (using NeXus output).
*
* %Parameters
*
* %Link
* A reference/HTML link for more information
*
* %End
*******************************************************************************/

DEFINE INSTRUMENT templateVanadiumMultipleScat_Mantid()
DEPENDENCY " @NEXUSFLAGS@ "

USERVARS
%{
int multi_flag;
int single_flag;
%}

TRACE

COMPONENT Origin = Progress_bar(percent=5)
AT (0,0,0) ABSOLUTE

COMPONENT sourceMantid = Source_simple(radius=0.001, dist=1,
		focus_xw=0.001, focus_yh=0.001, E0=5, dE=0.01)
  AT (0, 0, 0) RELATIVE Origin

COMPONENT sampleMantid = Incoherent(radius=0.002,
		yheight=0.015, focus_r=0, pack=1, target_x=0,
		target_y=0, target_z=1, f_QE=0, gamma=0)
  AT (0, 0, 1) RELATIVE sourceMantid
EXTEND
%{
if (SCATTERED == 1) single_flag =1 ;
if (SCATTERED > 1) multi_flag =1 ;
%}

COMPONENT nD_Mantid_0 = Monitor_nD(
    options ="Mantid square, x limits=[-2.5 2.5] bins=50 y limits=[-2.5 2.5] bins=50, neutron pixel min=0 t limits [0.002,0.005] list all neutrons, file=multi",
    xwidth = 5, yheight = 5, restore_neutron = 1)
  WHEN (multi_flag ==1)
  AT (0, 0, 1) RELATIVE sampleMantid


COMPONENT Mantid_1 = Monitor_nD(
    options ="square, x limits=[-2.5 2.5] bins=50 y limits=[-2.5 2.5] bins=50, neutron pixel min=0 t limits [0.002,0.005] list all neutrons, file=single",
    xwidth = 5, yheight = 5, restore_neutron = 1)
  WHEN (single_flag ==1)
  AT (0, 0, 1) RELATIVE sampleMantid
  
END