1/*******************************************************************************
2*         McXtrace instrument definition URL=http://www.mcxtrace.org
3*
4* Instrument: Be_BM_beamline
5*
6* %Identification
7* Written by: E. Knudsen (erkn@risoe.dtu.dk)
8* Date: Sept. 15th, 2009
9* Origin: Risø DTU
10* Release: McXtrace 0.1_alpha
11* Version: $Revision$
12* %INSTRUMENT_SITE: None
13*
14* Be-lens Bending Magnet, Low Budget Monochromatic (pink) X-ray beamline
15*
16* %Description
17* This is a proof of concept beamline to test an idea of how to build a low-cost
18* monochromtic beamline. Idea is to let a åolychromatic beam impinge on a focusing
19* Be-lens and put a slit in the focal pt. of the lens for the desired wavelength. Any
20* other wavelengths present in the beam will not be focussed prefectly and may be
21* by the slit.
22*
23* %Parameters
24* L1: [m] Distance between source and lens
25* L2: [m] Distance between lens and and slit
26* dS: [m] Slit opening. Slit opening is quadratic.
27* N:  [1] NUmber of Lenses in the compund lens arrangement
28 %Link
29*
30* %End
31*******************************************************************************/
32
33DEFINE INSTRUMENT Be_BM_beamline(L1=10,L2=1,dS=1e-2, N=1)
34
35
36DECLARE
37%{
38%}
39
40
41INITIALIZE
42%{
43%}
44
45TRACE
46
47COMPONENT Origin = Progress_bar()
48AT (0,0,0) ABSOLUTE
49
50COMPONENT generic_source=Source_gaussian(
51    lambda0=0.413, dlambda=0.412,
52    sig_x=0.08e-3, sig_y=0.08e-3, sigPr_x=1e-6, sigPr_y=1e-6, dist=L1
53)
54AT (0,0,0) RELATIVE PREVIOUS
55
56COMPONENT psd0 = PSD_monitor(filename="psd0.dat",xwidth=0.2,yheight=0.2)
57  AT (0,0,0.1) RELATIVE PREVIOUS
58COMPONENT wavel_mon0=L_monitor(filename="lmon0.dat",Lmin=0,Lmax=1,xwidth=0.5,yheight=0.5,nL=101)
59  AT(0,0,0.01) RELATIVE PREVIOUS
60
61COMPONENT Be_lens = Lens_simple(xwidth=10.5,yheight=10.5,N=N)
62AT(0,0,L1) RELATIVE generic_source
63
64COMPONENT Be_lens2 = Lens_simple(xwidth=10.5,yheight=10.5,N=N)
65AT(0,0,0.01) RELATIVE PREVIOUS
66ROTATED (0,0,90) RELATIVE PREVIOUS
67
68COMPONENT slit = Slit(xwidth=dS, yheight=dS)
69AT(0,0,L2) RELATIVE Be_lens
70ROTATED (0,0,0) RELATIVE Be_lens
71
72COMPONENT psd1 = PSD_monitor(filename="psd1.dat",xwidth=0.2,yheight=0.2)
73  AT (0,0,0) RELATIVE slit
74
75COMPONENT wavel_mon=L_monitor(filename="lmon.dat",Lmin=0,Lmax=1,xwidth=10.1,yheight=10.1,nL=101)
76  AT(0,0,1e-3) RELATIVE PREVIOUS
77
78COMPONENT psd2 = PSD_monitor(filename="psd2.dat",xwidth=0.2,yheight=0.2)
79  AT (0,0,1e-3) RELATIVE PREVIOUS
80
81END
82
83