Skip to content

Commit fbe7bc6

Browse files
authored
Merge pull request #2332 from willend/main
2 parents 8384c28 + 7ef4c00 commit fbe7bc6

11 files changed

Lines changed: 64 additions & 25 deletions

File tree

mcstas-comps/contrib/ISIS_moderator.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
DEFINE COMPONENT ISIS_moderator
5656

5757
SETTING PARAMETERS (string Face="hydrogen", Emin = 49.0,Emax = 51.0, dist = 1.0, focus_xw = 0.01,
58-
focus_yh = 0.01, xwidth = 0.074, yheight = 0.074, CAngle = 0.0,SAC= 1, Lmin=0, Lmax=0, int target_index=+1, verbose=0)
58+
focus_yh = 0.01, xwidth = 0.074, yheight = 0.074, CAngle = 0.0,SAC= 1, Lmin=0, Lmax=0, int target_index=1, verbose=0)
5959

6060
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
6161

mcstas-comps/examples/ESS/ESS_Testbeamline_HZB_V20/ESS_Testbeamline_HZB_V20.instr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@
2727
* L_g1: [m] Length of the guide number 1
2828
* w_g1: [m] Width of the guide number 1
2929
* h_g1: [m] Height of the guide number 1
30-
* Offset_deg_SC1: [deg] Phase source chopper phase disk 1
31-
* Offset_deg_SC2: [deg] Phase source chopper phase disk 2
32-
* Offset_deg_BC1: [deg] Phase bandwidth chopper phase disk 1
33-
* Offset_deg_BC2: [deg] Phase bandwidth chopper phase disk 2
34-
* Offset_deg_WFM1: [deg] Phase wavelength frame maltiplication chopper disk 1
35-
* Offset_deg_WFM2: [deg] Phase wavelength frame maltiplication chopper disk 2
30+
* Offset_deg_SC1: [deg] Phase source chopper disk 1
31+
* Offset_deg_SC2: [deg] Phase source chopper disk 2
32+
* Offset_deg_BC1: [deg] Phase bandwidth chopper disk 1
33+
* Offset_deg_BC2: [deg] Phase bandwidth chopper disk 2
34+
* Offset_deg_WFM1: [deg] Phase wavelength frame multiplication chopper disk 1
35+
* Offset_deg_WFM2: [deg] Phase wavelength frame multiplication chopper disk 2
3636
* Offset_deg_FOC1: [deg] Phase frame overlap chopper disk 1
3737
* Offset_deg_FOC2: [deg] Phase frame overlap chopper disk 2
38-
* Z: [m] Distance between to Wavelength frame multiplication chopper disks 0.1 - 0.5
38+
* Z: [m] Distance between Wavelength frame multiplication chopper disks 0.1 - 0.5
3939
* s1_x: [m] slit 1 width
4040
* s1_y: [m] slit 1 height
41-
* s2_x: [m] slit 1 width
42-
* s2_y: [m] slit 1 height
43-
* s3_x: [m] slit 1 width
44-
* s3_y: [m] slit 1 height
41+
* s2_x: [m] slit 2 width
42+
* s2_y: [m] slit 2 height
43+
* s3_x: [m] slit 3 width
44+
* s3_y: [m] slit 3 height
4545
* sp: [m] sample position
4646
* npulses: [1] Number of pulses to simulate
4747
* Choppers_WFM1_in: [1] Flag to indicate if WFM1 is active

mcstas-comps/examples/FZ_Juelich/FZJ_BenchmarkSfin2/FZJ_BenchmarkSfin2.instr

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
*
1313
* %INSTRUMENT_SITE: FZ_Juelich
1414
*
15+
* Test instrument for the H Frielinghaus SANS_benchmark2 component.
16+
*
17+
* The below test uses defaults of the instrument (SANS_benchmark2 modnum=11)
18+
* %Example: -y Detector: PSDnear_I=8000
19+
*
1520
* %Parameters
1621
* cnum: [] Set to 0.0 for no polarizer as for benchmarking the normal SANS samples, to 2.0 for two cavities, keep default values as much as possible
1722
* lbdmin: []
@@ -53,6 +58,13 @@ bandwidth for detector distances:
5358
DECLARE
5459
%{
5560
%}
61+
62+
USERVARS
63+
%{
64+
int BS1; // Flag to signal if below radius of "virtual beamstop 1"
65+
int BS2; // Flag to signal if below radius of "virtual beamstop 2"
66+
%}
67+
5668
INITIALIZE
5769
%{
5870
%}
@@ -178,17 +190,42 @@ COMPONENT det = TOFSANSdet( plength=0.003163, ssdist=22.0124+2.0*bendL+PolTot
178190
AT (0,0,20.0100) RELATIVE guide2
179191
ROTATED (0,0,0) RELATIVE vorpl
180192

181-
/*
182-
COMPONENT det1 = Monitor_nD_mod(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, xytr=0.1,
193+
COMPONENT Virtual_Beamstop_near = Arm()
194+
AT (0,0,Clen*0.2-0.001) RELATIVE sample
195+
EXTEND %{
196+
PROP_Z0;
197+
double r2=x*x + y*y;
198+
if ( r2 < 0.1*0.1 || r2 > 0.5*0.5 ) {
199+
BS1=1;
200+
}
201+
%}
202+
203+
COMPONENT PSDnear = PSD_monitor(xwidth=1, yheight=1, restore_neutron=1, nx=300, ny=300)
204+
WHEN !BS1 AT (0,0,Clen*0.2) RELATIVE sample
205+
206+
COMPONENT det1 = Monitor_nD(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5,
183207
options ="kxy bins=300 limits=[0.0025,0.80]", filename ="short_dist.txt")
184-
AT (0,0, Clen*0.2) RELATIVE sample
208+
WHEN !BS1 AT (0,0, Clen*0.2) RELATIVE sample
185209
ROTATED (0,0,0) RELATIVE vorpl
186210

187-
COMPONENT det2 = Monitor_nD_mod(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, xytr=0.02,
211+
COMPONENT Virtual_Beamstop_far = Arm()
212+
AT (0,0,Clen-0.001) RELATIVE sample
213+
EXTEND %{
214+
PROP_Z0;
215+
double r2=x*x + y*y;
216+
if ( r2 < 0.02*0.02 || r2 > 0.5*0.5 ) {
217+
BS2=1;
218+
}
219+
%}
220+
221+
COMPONENT PSDfar = PSD_monitor(xwidth=1, yheight=1, restore_neutron=1, nx=300, ny=300)
222+
WHEN !BS2 AT (0,0,Clen) RELATIVE sample
223+
224+
COMPONENT det2 = Monitor_nD(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5,
188225
options ="kxy bins=300 limits=[0.0005,0.16]", filename ="long__dist.txt")
189-
AT (0,0, Clen ) RELATIVE sample
226+
WHEN !BS2 AT (0,0, Clen ) RELATIVE sample
190227
ROTATED (0,0,0) RELATIVE vorpl
191-
*/
228+
192229

193230
FINALLY
194231
%{

mcstas-comps/examples/HighNESS/WOFSANS/WOFSANS.instr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* Instrument developed for the HighNESS EU project, describing a Wolter Optics
2121
* Focusing SANS (WOFSANS_v2), applied for the study of moderator parameters.
2222
*
23-
* Example: WOFSANS width=0.15
23+
* %Example: WOFSANS width=0.15 Detector: PSD_10_I=4e+09
2424
*
2525
* %Parameters
2626
* focusing_rectangle: [m] Dimensions, both width and height of the source focusing area

mcstas-comps/examples/ILL/ILL_H143_LADI/ILL_H143_LADI.instr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* Detector: image plate 1250 x 450 mm2
4646
* Sample: at 2.710 mm from the end of the guide H143.
4747
*
48+
* %Example: -y Detector: ImagePlate_I=855288
49+
*
4850
* %Parameters
4951
* lambda: [Angs] wavelength
5052
* dlambda: [Angs] wavelength HALF spread.

mcstas-comps/obsolete/ESS_moderator_short.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ DEFINE COMPONENT ESS_moderator_short
9292
SETTING PARAMETERS (size, Lmin, Lmax, dist, focus_xw, focus_yh,
9393
nu=50, T=325, tau=22e-6, tau1=0, tau2=7e-6, n=5, n2=5,
9494
chi2=2.5, I0=9e10, I2=4.6e10, branch1=0, branch2=0.5 ,
95-
branchframe=0, int target_index=+1)
95+
branchframe=0, int target_index=1)
9696

9797
SHARE
9898
%{

mcstas-comps/sources/Moderator.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
DEFINE COMPONENT Moderator
4141

42-
SETTING PARAMETERS (radius=0.07, Emin, Emax, dist=0, focus_xw=0.02, focus_yh=0.02, t0=37.15, Ec=9.0, gamma=39.1, int target_index=+1, flux=1)
42+
SETTING PARAMETERS (radius=0.07, Emin, Emax, dist=0, focus_xw=0.02, focus_yh=0.02, t0=37.15, Ec=9.0, gamma=39.1, int target_index=1, flux=1)
4343

4444
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
4545
DECLARE

mcstas-comps/sources/Source_Maxwell_3.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ DEFINE COMPONENT Source_Maxwell_3
6060
SETTING PARAMETERS (size=0, yheight=0, xwidth=0, Lmin, Lmax, dist,
6161
focus_xw, focus_yh,
6262
T1, T2=300, T3=300, I1, I2=0, I3=0,
63-
int target_index=+1,lambda0=0, dlambda=0)
63+
int target_index=1,lambda0=0, dlambda=0)
6464

6565

6666
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */

mcstas-comps/sources/Source_adapt.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ SETTING PARAMETERS (
9696
xmin=0, xmax=0, ymin=0, ymax=0, xwidth=0, yheight=0,
9797
string filename=0, dist=0, focus_xw=0.05, focus_yh=0.1,
9898
E0=0, dE=0, lambda0=0, dlambda=0, flux=1e13,
99-
int target_index=+1, alpha=0.25, beta=0.25)
99+
int target_index=1, alpha=0.25, beta=0.25)
100100

101101

102102
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */

mcstas-comps/sources/Source_gen.comp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ radius=0.0, dist=0, focus_xw=0.045, focus_yh=0.12, focus_aw=0, focus_ah=0,
131131
E0=0, dE=0, lambda0=0, dlambda=0, I1=1,
132132
yheight=0.1, xwidth=0.1, verbose=0, T1=0,
133133
flux_file_perAA=0, flux_file_log=0,
134-
Lmin=0,Lmax=0,Emin=0,Emax=0,T2=0,I2=0,T3=0,I3=0,zdepth=0, int target_index=+1)
134+
Lmin=0,Lmax=0,Emin=0,Emax=0,T2=0,I2=0,T3=0,I3=0,zdepth=0, int target_index=1)
135135

136136
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
137137

0 commit comments

Comments
 (0)