/*******************************************************************************
*
* McStas, neutron ray-tracing package
* Copyright (C) 1997-2008, All rights reserved
* Risoe National Laboratory, Roskilde, Denmark
* Institut Laue Langevin, Grenoble, France
*
* Instrument: ILL_H10_IN8
*
* %Identification
* Written by: Emmanuel Farhi
* Date: 2006
* Origin: ILL (France)
* Release: McStas CVS_080624
* Version: $Revision$
* %INSTRUMENT_SITE: ILL
*
* Thermal neutron three-axis spectrometer IN8@ILL
*
* %Description
* IN8 is installed on beamtube H10 (diameter F = 200 mm).
* The incident wavelength selection is obtained through a double focusing
* monochromator , which has three faces equipped with PG002, Cu200 and bent
* perfect Si111 crystals, respectively. Horizontal focusing allows increasing the
* monochromatic flux at the expense of momentum but not energy resolution when
* the horizontal virtual source (an adjustable entrance slit) is introduced at a
* distance before the monochromator which matches the monochromator-sample
* distance.
*
* The aperture of the horizontal virtual source can be varied but is typically
* kept below 50 mm. This reduces the background level of the instrument.
* Converging collimators as well as diaphragms can be placed in the beam path
* before and after the monochromator to optimize the beam dimension and
* definition. For special high-resolution experiments using a flat monochromator,
* Soller collimators are available.
*
* The shielding drum allows varying the monochromator take-off angle in the range
* 10 < 2theta_m < 90. The secondary spectrometer has heavy borated polyethylene
* shielding installed around the analyzer and detector elements. The scattering
* angle at the sample position is in the range 0 < 2theta_s < 130 independent of
* the monochromator take-off angle.
*
* In this TAS configuration, Cu200 is used as monochromator and Cu111 as
* analyser, with a single type detector.
*
* %Example: QM=1 EN=0 Sqw_coh=V.laz Detector: D7_SC3_1D_I=9.36585e+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_H10_IN8(
KF=5, KI=0, QM=0.5, EN=0, verbose=1,
WM=0.233, HM=0.197, RMH=-1, RMV=-1, DM=1.807, NHM=15, NVM=15,
WA=0.16, HA=0.08, RAH=-1, RAV=-1, DA=2.087, NHA=15, NVA=15,
L1=2.3,
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: tube H10 is twice as brilliant as H12 */
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