/*******************************************************************************
*
* McStas, neutron ray-tracing package
* Copyright (C) 1997-2008, All rights reserved
* Risoe National Laboratory, Roskilde, Denmark
* Institut Laue Langevin, Grenoble, France
*
* Instrument: ILL_H8_IN1
*
* %Identification
* Written by: Emmanuel Farhi
* Date: 2006
* Origin: ILL (France)
* Release: McStas CVS_080624
* Version: $Revision$
* %INSTRUMENT_SITE: ILL
*
* Hot neutron three-axis spectrometer IN1@ILL
*
* %Description
* IN8 is installed on beamtube H10 (diameter F = 200 mm).
*
* IN1 works in a time-sharing mode. This means that the same monochromator is
* also used by the Be-filter spectrometer IN1-BeF and by the liquids
* diffractometer D4. Changing over between the three different instruments can be
* done without difficulty in about two hours.
*
* The monochromator unit carries three different vertically focussing
* monochromators built from copper single crystals (available reflecting planes
* Cu(200), Cu(220) and Cu(331)). The exchange of the monochromator planes is
* controlled by the instrument computer. The radius of curvature can be
* automatically adjusted as function of reflected energy in order to maintain
* maximal flux at the sample position in the course of energy scans. The
* scattering angles on the monochromator cover a range of 10<2theta_m <90
* allowing for scanning neutron energies from 13 meV to more than 1 eV..
*
* The IN1-TAS spectrometer: the scattering angles at the sample and the analyser
* can be changed in the intervals -115<2theta_S<115 and -120<2theta_S<120. Three
* different analysers (PG(002), Cu(200), Cu(220)) can be installed in order to
* optimise intensity and resolution for a given experiment. Various resonance
* absorption filters (e.g. Er, Sm, Hf ...) can be used to suppress higher order
* contaminations from the incident beam or in the scattered beam. An oriented
* Pyrolytic Graphite filter is designed for experiments eventually demanding
* thermal neutron energy range.
*
* In this TAS configuration, Cu220 are used as monochromator and analyser,
* with a single type detector.
*
* %Example: QM=1 Sqw_coh=V.laz Detector: D7_SC3_1D_I=1.06671e+09
*
* %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_H8_IN1(
KF=10, KI=0, QM=0.5, EN=0, verbose=1,
WM=0.18, HM=0.20, RMH=-1, RMV=-1, DM=1.278, NHM=15, NVM=15,
WA=0.16, HA=0.12, RAH=-1, RAV=-1, DA=1.278, NHA=15, NVA=15,
L1=7,
ALF1=120, ALF2=120, ALF3=120, ALF4=120,
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,
E0 = machine_hkl.ei,
dE = machine_hkl.ei*0.03,
T1=1695,I1=1.74e13,T2=708,I2=3.9e12)
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