|
| 1 | +/******************************************************************************* |
| 2 | +* Instrument: Test_Al_windows |
| 3 | +* |
| 4 | +* %I |
| 5 | +* Written by: Peter Willendrup |
| 6 | +* Date: 20260316 |
| 7 | +* Origin: ESS |
| 8 | +* %INSTRUMENT_SITE: Tests_optics |
| 9 | +* |
| 10 | +* Small test instrument for studying Al-window performance |
| 11 | +* |
| 12 | +* %D |
| 13 | +* Test instrument for studying transmission through Al-windows. |
| 14 | +* |
| 15 | +* Includes 3 models of increasing complexity / sophistication: |
| 16 | +* 1) Al_window(),: |
| 17 | +* - simple linear absorption + 4th order scattering model |
| 18 | +* - infinite-plane geometry |
| 19 | +* 2) PowderN() |
| 20 | +* - Material specified from Al.laz input-file |
| 21 | +* - Parametrized for 80% statistics -> transmission |
| 22 | +* 3) NCrystal() |
| 23 | +* - Material specified from local Al as .ncmat format input |
| 24 | +* (generated from CIF file COD / 1502689) |
| 25 | +* |
| 26 | +* %Example: Window=1 thickness=0.001 Detector: OutputWL_I=0.099 |
| 27 | +* %Example: Window=2 thickness=0.001 Detector: OutputWL_I=0.099 |
| 28 | +* %Example: Window=3 thickness=0.001 Detector: OutputWL_I=0.099 |
| 29 | +* %Example: Window=1 thickness=0.005 Detector: OutputWL_I=0.098 |
| 30 | +* %Example: Window=2 thickness=0.005 Detector: OutputWL_I=0.098 |
| 31 | +* %Example: Window=3 thickness=0.005 Detector: OutputWL_I=0.098 |
| 32 | +* |
| 33 | +* %P |
| 34 | +* Window: [1] Choice of Al_Window (1), PowderN (2) or NCrystal (3) model |
| 35 | +* thickness: [m] Thickness of Al window |
| 36 | +* %L |
| 37 | +* <reference/HTML link> |
| 38 | +* |
| 39 | +* %E |
| 40 | +*******************************************************************************/ |
| 41 | +DEFINE INSTRUMENT Test_Al_windows(int Window=1, double thickness=0.005) |
| 42 | + |
| 43 | +DECLARE |
| 44 | +%{ |
| 45 | + double u=1e-6; // Small distance, 1um |
| 46 | +%} |
| 47 | + |
| 48 | +USERVARS |
| 49 | +%{ |
| 50 | +%} |
| 51 | + |
| 52 | +INITIALIZE |
| 53 | +%{ |
| 54 | +%} |
| 55 | + |
| 56 | +TRACE |
| 57 | + |
| 58 | +COMPONENT origin = Progress_bar() |
| 59 | +AT (0, 0, 0) RELATIVE ABSOLUTE |
| 60 | + |
| 61 | +COMPONENT Source = Source_simple( |
| 62 | + yheight=0.1, |
| 63 | + xwidth=0.1, |
| 64 | + dist=10, |
| 65 | + focus_xw=0.1, |
| 66 | + focus_yh=0.1, |
| 67 | + lambda0=5, |
| 68 | + dlambda=4.99) |
| 69 | +AT (0, 0, 0) RELATIVE PREVIOUS |
| 70 | + |
| 71 | +COMPONENT InputPSD = PSD_monitor( |
| 72 | + xwidth=0.11, |
| 73 | + yheight=0.11) |
| 74 | +AT (0, 0, u) RELATIVE Source |
| 75 | + |
| 76 | +COMPONENT InputWL = L_monitor( |
| 77 | + xwidth=0.11, |
| 78 | + yheight=0.11, |
| 79 | + nL=1000, Lmin=0, Lmax=10) |
| 80 | +AT (0, 0, u) RELATIVE Source |
| 81 | + |
| 82 | + |
| 83 | +COMPONENT Slit_in = Slit( |
| 84 | + xwidth=0.1, |
| 85 | + yheight=0.1) |
| 86 | +AT (0, 0, 10) RELATIVE Source |
| 87 | + |
| 88 | +COMPONENT Al_window = Al_window( |
| 89 | + thickness=thickness) |
| 90 | +WHEN Window==1 AT (0, 0, 10+u) RELATIVE Source |
| 91 | + |
| 92 | +COMPONENT PowderN = PowderN(xwidth=0.11, yheight=0.11, zdepth=thickness, reflections="Al.laz", p_transmit=0.8, p_inc=0.1, p_interact=0.1) |
| 93 | +WHEN Window==2 AT (0, 0, 10+u) RELATIVE Source |
| 94 | + |
| 95 | +COMPONENT NCrystal_sample = NCrystal_sample(xwidth=0.11, yheight=0.11, zdepth=thickness, cfg="autogen_Al_sg225_cod1502689.ncmat") |
| 96 | +WHEN Window==3 AT (0, 0, 10+u) RELATIVE Source |
| 97 | + |
| 98 | +COMPONENT Slit_out = Slit( |
| 99 | + xwidth=0.1, |
| 100 | + yheight=0.1) |
| 101 | +AT (0, 0, 10+thickness+2*u) RELATIVE Source |
| 102 | + |
| 103 | +COMPONENT OutputSD = PSD_monitor( |
| 104 | + xwidth=0.11, |
| 105 | + yheight=0.11) |
| 106 | +AT (0, 0, u) RELATIVE Slit_out |
| 107 | + |
| 108 | +COMPONENT OutputWL = L_monitor( |
| 109 | + xwidth=0.11, |
| 110 | + yheight=0.11, |
| 111 | + nL=1000, Lmin=0, Lmax=10) |
| 112 | +AT (0, 0, u) RELATIVE Slit_out |
| 113 | + |
| 114 | +FINALLY |
| 115 | +%{ |
| 116 | +%} |
| 117 | + |
| 118 | +END |
0 commit comments