/*******************************************************************************
*
* McStas, neutron ray-tracing package
* Copyright (C) 1997-2008, All rights reserved
* Risoe National Laboratory, Roskilde, Denmark
* Institut Laue Langevin, Grenoble, France
*
* Instrument: ILL_H13_IN20
*
* %Identification
* Written by: Emmanuel Farhi
* Date: 2006
* Origin: ILL (France)
* Release: McStas CVS_080624
* Version: $Revision$
* %INSTRUMENT_SITE: ILL
*
* Thermal neutron three-axis spectrometer IN20@ILL (unpolarized configuration)
*
* %Description
* IN20 is installed at the H13 thermal beam tube (Phi 170 mm) in the reactor hall.
*
* Both the primary and the secondary spectrometer employ a monochromatic
* horizontal focusing geometry. A heavy input slit of an adjustable size, placed
* in the casemate, serves as a virtual source, providing a large solid angle for
* the monochromatic beam, while reducing, together with a sapphire filter window,
* the fast neutron background. The neutron energy is selected either by a doubly
* focusing polarizing Heusler 111 monochromator (230 x 150 mm2 w x h) or by an
* unpolarised Si 111 monochromator (elastically bent crystals, 195 x 200 mm2 w x
* h) free of higher-order contamination in the incident beam at wave-numbers ki >
* 3 Angs-1. The analysis of the energy and polarisation state of the scattered
* neutrons is effectuated by a similar horizontally focusing Heusler crystal
* analyzer. Further PG 002 and Si 111 analyzers are available for occasional
* unpolarised work.
*
* The energy transfer range accessible in the present configuration of IN20
* extends to 100 meV with maximum incident neutron energies reaching 150 meV. The
* typical energy widths (FWHM) measured with a reference vanadium sample at the
* graphite filter wave-numbers ki = 2.66 A-1 and 4.1 A-1 are 0.82(3) meV and 3.05
* (15) meV, respectively.
*
* This model uses two Si111 monochromator and analyzers (unpolarized
* configuration).
*
* %Example: QM=1 EN=0 Sqw_coh=V.laz Detector: D7_SC3_1D_I=4.83869e+08
*
* %Parameters
* INPUT PARAMETERS:
* KI: Incoming neutron wavevector [Angs-1]
* KF: Outgoing neutron wavevector [Angs-1]
* EI: Incoming neutron energy [meV]
* EF: Outgoing neutron energy [meV]
* QH: Measurement QH position in crystal [rlu]
* QK: Measurement QK position in crystal [rlu]
* QL: Measurement QL position in crystal [rlu]
* EN: Energy transfer in crystal [meV]
* QM: Wavevector transfer in crystal [Angs-1]
* KFIX: Fixed KI or KF value for Rescal compatibility [Angs-1]
* FX: Fixed KI or KF type for Rescal compatibility [1:KI,2:KF]
* L1: Source-Monochromator distance. Contains 1st Collimator of length 5.34 [m]
* L2: Monochromator-Sample distance. Contains 2nd Collimator of length 0.35 [m]
* L3: Sample-Analyzer distance. Contains 3rd Collimator of length 0.40 [m]
* L4: Analyzer-detector distance. Contains 4th Collimator of length 0.24 [m]
* SM: Scattering sense of beam from Monochromator [1:left, -1:right]
* SS: Scattering sense of beam from Sample [1:left, -1:right]
* SA: Scattering sense of beam from Analyzer [1:left, -1:right]
* DM: Monochromator d-spacing [Angs]
* DA: Analyzer d-spacing [Angs]
* RMV: Monochromator vertical curvature, 0 for flat, -1 for automatic setting [m]
* RMH: Monochromator horizontal curvature, 0 for flat, -1 for automatic setting [m]
* RAV: Analyzer vertical curvature, 0 for flat, -1 for automatic setting [m]
* RAH: Analyzer horizontal curvature, 0 for flat, -1 for automatic setting [m]
* ETAM: Monochromator mosaic [arc min]
* ETAA: Analyzer mosaic [arc min]
* ALF1: Horizontal collimation from Source to Monochromator [arc min]
* ALF2: Horizontal collimation from Monochromator to Sample A[arc min]
* ALF3: Horizontal collimation from Sample to Analyzer [arc min]
* ALF4: Horizontal collimation from Analyzer to Detector [arc min]
* BET1: Vertical collimation from Source to Monochromator [arc min]
* BET2: Vertical collimation from Monochromator to Sample A[arc min]
* BET3: Vertical collimation from Sample to Analyzer [arc min]
* BET4: Vertical collimation from Analyzer to Detector [arc min]
* AS: Sample lattice parameter A [Angs]
* BS: Sample lattice parameter B [Angs]
* CS: Sample lattice parameter C [Angs]
* AA: Angle between lattice vectors B,C [deg]
* BB: Angle between lattice vectors C,A [deg]
* CC: Angle between lattice vectors A,B [deg]
* AX: First reciprocal lattice vector in scattering plane, X [rlu]
* AY: First reciprocal lattice vector in scattering plane, Y [rlu]
* AZ: First reciprocal lattice vector in scattering plane, Z [rlu]
* BX: Second reciprocal lattice vector in scattering plane, X [rlu]
* BY: Second reciprocal lattice vector in scattering plane, Y [rlu]
* BZ: Second reciprocal lattice vector in scattering plane, Z [rlu]
* A1: Monohromator rotation angle [deg]
* A2: Monohromator take-off angle [deg]
* A3: Sample rotation angle [deg]
* A4: Sample take-off angle [deg]
* A5: Analyzer rotation angle [deg]
* A6: Analyzer take-off angle [deg]
* verbose: print TAS configuration. 0 to be quiet [1]
*
* WM: Width of monochromator [m]
* HM: Height of monochromator [m]
* NVM: Number of vertical slabs composing the monochromator [1]
* NHM: Number of horizontal slabs composing the monochromator [1]
* WA: Width of analyzer [m]
* HA: Height of analyzer [m]
* NVA: Number of vertical slabs composing the analyzer [1]
* NHA: Number of horizontal slabs composing the analyzer [1]
*
* Sqw_coh: sample coherent S(q,w) file name. Use LAZ/LAU or SQW file [str]
* Sqw_inc: sample incoherent S(q,w) file name. Use NULL to scatter incoherently [str]
* radius: outer radius of sample hollow cylinder/sphere [m]
* height: sample height. Use 0 for a spherical shape [m]
* thickness: thickness of sample hollow cylinder. 0 for bulk. [m]
*
* %Link
* Rescal for Matlab at http://www.ill.eu/instruments-support/computing-for-science/cs-software/all-software/matlab-ill/
* %Link
* Restrax at http://omega.ujf.cas.cz/restrax/
* %End
*******************************************************************************/
DEFINE INSTRUMENT ILL_H13_IN20(
KF=3, KI=0, QM=0.5, EN=0, verbose=1,
WM=0.20, HM=0.19, RMH=-1, RMV=-1, DM=3.155, NHM=15, NVM=15,
WA=0.16, HA=0.08, RAH=-1, RAV=-1, DA=3.155, NHA=15, NVA=15,
L1=2.33,
ALF1=60, ALF2=60, ALF3=60, ALF4=60,
BET1=120, BET2=120, BET3=120, BET4=120
)
TRACE
REMOVABLE COMPONENT Origin=Progress_bar()
AT (0,0,0) ABSOLUTE
/* a flat constant source */
REMOVABLE COMPONENT Source = Source_gen(
radius = 0.10,
dist = machine_hkl.l1,
focus_xw = fabs(WM*sin(machine_real.a1*DEG2RAD)), focus_yh = HM,
T1=683.7,I1=0.5874e+13,T2=257.7,I2=2.5099e+13,T3=16.7 ,I3=1.0343e+12,
E0 = machine_hkl.ei,
dE = machine_hkl.ei*0.03)
AT (0,0,0) ABSOLUTE
REMOVABLE COMPONENT SC1 = Collimator_linear(
xmin =-WM/2, ymin =-HM/2,
xmax = WM/2, ymax = HM/2,
length = machine_hkl.l1/2,
divergence=ALF1,
divergenceV=BET1)
WHEN (ALF1 && BET1)
AT (0, 0, machine_hkl.l1/4) ABSOLUTE
REMOVABLE COMPONENT Guide_out=Arm()
AT (0, 0, machine_hkl.l1-0.2) ABSOLUTE
%include "templateTAS.instr"
END