Skip to content

Commit 4763250

Browse files
authored
Merge pull request #2058 from mccode-dev/fixes_mono_bent
Fixes relating to recent Monochromator_bent updates from @Lomholy
2 parents abb62c9 + 0cc7bf4 commit 4763250

3 files changed

Lines changed: 108 additions & 529 deletions

File tree

mcstas-comps/contrib/Monochromator_bent.comp

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Risoe National Laboratory, Roskilde, Denmark
66
* Institut Laue Langevin, Grenoble, France
77
*
8-
* Component: Monochromator
8+
* Component: Monochromator_bent
99
*
1010
* %I
1111
* Written by: Daniel Lomholt Christensen <dlc@math.ku.dk>
@@ -37,51 +37,52 @@
3737
* %P
3838
* INPUT PARAMETERS:
3939
*
40-
* zwidth: [m] Width of each crystal without bending.
41-
* yheight: [m] Height of each crystal without bending.
42-
* xthickness: [m] Thickness of each crystal without bending.
43-
* radius_x: [m] Radius of the circle the monochromator bends on in the plane.
44-
* plane_of_reflection: ["Si400"] The plane of reflection from the material. The list of possible reflections can
45-
* can be seen in the source code.
46-
* angle_to_cut_horizontal [degrees] Angle between cut and normal of crystal slab, horizontally
47-
* angle_to_cut_vertical [degrees] Angle between cut and normal of crystal slab, vertically ! NOTE: This may not work as intended.
48-
* mosaicity[arc minutes] Gaussian mosaicity of the crystal. Always the horizontal mosaicity
49-
* mosaic_anisotropy Anisotropy of the mosaicity, changes vertical mosaicity to be mosaic_anisotropy*mosaicity
50-
* domainthickness [micro meter] Thickness of the crystal domains.
51-
* temperature: [K] Temperature of the monochromator in Kelvin.
52-
* optimize: [] Flag to tell if the component should optimize for reflections or not. NOTE: May not work perfectly
53-
* vector x_pos = NULL x-Position of each crystal
54-
* vector y_pos = NULL y-Position of each crystal
55-
* vector z_pos = NULL z-Position of each crystal
56-
* vector x_rot = NULL Rotation around x-axis for each crystal
57-
* vector y_rot = NULL Rotation around y-axis for each crystal
58-
* vector z_rot = NULL Rotation around z-axis for each crystal
59-
* NOTE: Rotations happen around x, then y, then z.
60-
* verbose: [0] Verbosity of the monochromator. Used for debugging.
40+
* zwidth: [m] Width of each crystal without bending.
41+
* yheight: [m] Height of each crystal without bending.
42+
* xthickness: [m] Thickness of each crystal without bending.
43+
* radius_x: [m] Radius of the circle the monochromator bends on in the plane.
44+
* plane_of_reflection: [str] The plane of reflection from the material, e.g. "Si400". The list of possible reflections can can be seen in the source code.
45+
* angle_to_cut_horizontal: [deg] Angle between cut and normal of crystal slab, horizontally
46+
* angle_to_cut_vertical: [deg] Angle between cut and normal of crystal slab, vertically ! NOTE: This may not work as intended.
47+
* mosaicity: [arcmin] Gaussian mosaicity of the crystal. Always the horizontal mosaicity
48+
* mosaic_anisotropy: [1] Anisotropy of the mosaicity, changes vertical mosaicity to be mosaic_anisotropy*mosaicity
49+
* domainthickness: [1e-6m] Thickness of the crystal domains.
50+
* temperature: [K] Temperature of the monochromator in Kelvin.
51+
* optimize: [1] Flag to tell if the component should optimize for reflections or not. NOTE: May not work perfectly
52+
* x_pos: [vector] x-Position of each crystal
53+
* y_pos: [vector] y-Position of each crystal
54+
* z_pos: [vector] z-Position of each crystal
55+
* x_rot: [vector] Rotation around x-axis for each crystal (NOTE: Rotations happen around x, then y, then z.)
56+
* y_rot: [vector] Rotation around y-axis for each crystal
57+
* z_rot: [vector] Rotation around z-axis for each crystal
58+
* verbose: [1] Verbosity of the monochromator. Used for debugging.
59+
* n_crystals: [1] Number of mono crystals
60+
* draw_as_rectangles: [1] Flag to visualise component as individual rectangles pr. mono crystal
61+
*
6162
*
6263
* %E
6364
*******************************************************************************/
6465
DEFINE COMPONENT Monochromator_bent
65-
SETTING PARAMETERS (zwidth = 0.2,
66-
yheight = 0.1,
67-
xthickness = 0.0005,
68-
radius_x = 2,
69-
string plane_of_reflection = "Si400",
70-
angle_to_cut_horizontal = 0,
71-
angle_to_cut_vertical = 0,
72-
mosaicity = 30,
73-
int n_crystals = 1,
74-
mosaic_anisotropy = 1,
75-
domainthickness = 10,
76-
temperature = 300,
77-
int optimize = 1,
78-
vector x_pos = NULL,// x-Position of each lamella
79-
vector y_pos = NULL,// y-Position of each lamella
80-
vector z_pos = NULL,// z-Position of each lamella
81-
vector x_rot = NULL, // Rotation around x-axis
82-
vector y_rot = NULL, // Rotation around y-axis
83-
vector z_rot = NULL, // Rotation around z-axis
84-
int verbose = 0,
66+
SETTING PARAMETERS (zwidth=0.2,
67+
yheight=0.1,
68+
xthickness=0.0005,
69+
radius_x=2,
70+
string plane_of_reflection="Si400",
71+
angle_to_cut_horizontal=0,
72+
angle_to_cut_vertical=0,
73+
mosaicity=30,
74+
int n_crystals=1,
75+
mosaic_anisotropy=1,
76+
domainthickness=10,
77+
temperature=300,
78+
int optimize=1,
79+
vector x_pos=NULL,
80+
vector y_pos=NULL,
81+
vector z_pos=NULL,
82+
vector x_rot=NULL,
83+
vector y_rot=NULL,
84+
vector z_rot=NULL,
85+
int verbose=0,
8586
int draw_as_rectangles=0)
8687
// Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p)
8788
NOACC

0 commit comments

Comments
 (0)