Skip to content
2 changes: 1 addition & 1 deletion mcstas-comps/contrib/ISIS_moderator.comp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
DEFINE COMPONENT ISIS_moderator

SETTING PARAMETERS (string Face="hydrogen", Emin = 49.0,Emax = 51.0, dist = 1.0, focus_xw = 0.01,
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)
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)

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@
* L_g1: [m] Length of the guide number 1
* w_g1: [m] Width of the guide number 1
* h_g1: [m] Height of the guide number 1
* Offset_deg_SC1: [deg] Phase source chopper phase disk 1
* Offset_deg_SC2: [deg] Phase source chopper phase disk 2
* Offset_deg_BC1: [deg] Phase bandwidth chopper phase disk 1
* Offset_deg_BC2: [deg] Phase bandwidth chopper phase disk 2
* Offset_deg_WFM1: [deg] Phase wavelength frame maltiplication chopper disk 1
* Offset_deg_WFM2: [deg] Phase wavelength frame maltiplication chopper disk 2
* Offset_deg_SC1: [deg] Phase source chopper disk 1
* Offset_deg_SC2: [deg] Phase source chopper disk 2
* Offset_deg_BC1: [deg] Phase bandwidth chopper disk 1
* Offset_deg_BC2: [deg] Phase bandwidth chopper disk 2
* Offset_deg_WFM1: [deg] Phase wavelength frame multiplication chopper disk 1
* Offset_deg_WFM2: [deg] Phase wavelength frame multiplication chopper disk 2
* Offset_deg_FOC1: [deg] Phase frame overlap chopper disk 1
* Offset_deg_FOC2: [deg] Phase frame overlap chopper disk 2
* Z: [m] Distance between to Wavelength frame multiplication chopper disks 0.1 - 0.5
* Z: [m] Distance between Wavelength frame multiplication chopper disks 0.1 - 0.5
* s1_x: [m] slit 1 width
* s1_y: [m] slit 1 height
* s2_x: [m] slit 1 width
* s2_y: [m] slit 1 height
* s3_x: [m] slit 1 width
* s3_y: [m] slit 1 height
* s2_x: [m] slit 2 width
* s2_y: [m] slit 2 height
* s3_x: [m] slit 3 width
* s3_y: [m] slit 3 height
* sp: [m] sample position
* npulses: [1] Number of pulses to simulate
* Choppers_WFM1_in: [1] Flag to indicate if WFM1 is active
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
*
* %INSTRUMENT_SITE: FZ_Juelich
*
* Test instrument for the H Frielinghaus SANS_benchmark2 component.
*
* The below test uses defaults of the instrument (SANS_benchmark2 modnum=11)
* %Example: -y Detector: PSDnear_I=8000
*
* %Parameters
* 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
* lbdmin: []
Expand Down Expand Up @@ -53,6 +58,13 @@ bandwidth for detector distances:
DECLARE
%{
%}

USERVARS
%{
int BS1; // Flag to signal if below radius of "virtual beamstop 1"
int BS2; // Flag to signal if below radius of "virtual beamstop 2"
%}

INITIALIZE
%{
%}
Expand Down Expand Up @@ -178,17 +190,42 @@ COMPONENT det = TOFSANSdet( plength=0.003163, ssdist=22.0124+2.0*bendL+PolTot
AT (0,0,20.0100) RELATIVE guide2
ROTATED (0,0,0) RELATIVE vorpl

/*
COMPONENT det1 = Monitor_nD_mod(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, xytr=0.1,
COMPONENT Virtual_Beamstop_near = Arm()
AT (0,0,Clen*0.2-0.001) RELATIVE sample
EXTEND %{
PROP_Z0;
double r2=x*x + y*y;
if ( r2 < 0.1*0.1 || r2 > 0.5*0.5 ) {
BS1=1;
}
%}

COMPONENT PSDnear = PSD_monitor(xwidth=1, yheight=1, restore_neutron=1, nx=300, ny=300)
WHEN !BS1 AT (0,0,Clen*0.2) RELATIVE sample

COMPONENT det1 = Monitor_nD(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5,
options ="kxy bins=300 limits=[0.0025,0.80]", filename ="short_dist.txt")
AT (0,0, Clen*0.2) RELATIVE sample
WHEN !BS1 AT (0,0, Clen*0.2) RELATIVE sample
ROTATED (0,0,0) RELATIVE vorpl

COMPONENT det2 = Monitor_nD_mod(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5, xytr=0.02,
COMPONENT Virtual_Beamstop_far = Arm()
AT (0,0,Clen-0.001) RELATIVE sample
EXTEND %{
PROP_Z0;
double r2=x*x + y*y;
if ( r2 < 0.02*0.02 || r2 > 0.5*0.5 ) {
BS2=1;
}
%}

COMPONENT PSDfar = PSD_monitor(xwidth=1, yheight=1, restore_neutron=1, nx=300, ny=300)
WHEN !BS2 AT (0,0,Clen) RELATIVE sample

COMPONENT det2 = Monitor_nD(xmin=-0.5, xmax=0.5, ymin=-0.5, ymax=0.5,
options ="kxy bins=300 limits=[0.0005,0.16]", filename ="long__dist.txt")
AT (0,0, Clen ) RELATIVE sample
WHEN !BS2 AT (0,0, Clen ) RELATIVE sample
ROTATED (0,0,0) RELATIVE vorpl
*/


FINALLY
%{
Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/examples/HighNESS/WOFSANS/WOFSANS.instr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Instrument developed for the HighNESS EU project, describing a Wolter Optics
* Focusing SANS (WOFSANS_v2), applied for the study of moderator parameters.
*
* Example: WOFSANS width=0.15
* %Example: WOFSANS width=0.15 Detector: PSD_10_I=4e+09
*
* %Parameters
* focusing_rectangle: [m] Dimensions, both width and height of the source focusing area
Expand Down
2 changes: 2 additions & 0 deletions mcstas-comps/examples/ILL/ILL_H143_LADI/ILL_H143_LADI.instr
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* Detector: image plate 1250 x 450 mm2
* Sample: at 2.710 mm from the end of the guide H143.
*
* %Example: -y Detector: ImagePlate_I=855288
*
* %Parameters
* lambda: [Angs] wavelength
* dlambda: [Angs] wavelength HALF spread.
Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/obsolete/ESS_moderator_short.comp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ DEFINE COMPONENT ESS_moderator_short
SETTING PARAMETERS (size, Lmin, Lmax, dist, focus_xw, focus_yh,
nu=50, T=325, tau=22e-6, tau1=0, tau2=7e-6, n=5, n2=5,
chi2=2.5, I0=9e10, I2=4.6e10, branch1=0, branch2=0.5 ,
branchframe=0, int target_index=+1)
branchframe=0, int target_index=1)

SHARE
%{
Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/sources/Moderator.comp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

DEFINE COMPONENT Moderator

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)
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)

/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
DECLARE
Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/sources/Source_Maxwell_3.comp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ DEFINE COMPONENT Source_Maxwell_3
SETTING PARAMETERS (size=0, yheight=0, xwidth=0, Lmin, Lmax, dist,
focus_xw, focus_yh,
T1, T2=300, T3=300, I1, I2=0, I3=0,
int target_index=+1,lambda0=0, dlambda=0)
int target_index=1,lambda0=0, dlambda=0)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/sources/Source_adapt.comp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ SETTING PARAMETERS (
xmin=0, xmax=0, ymin=0, ymax=0, xwidth=0, yheight=0,
string filename=0, dist=0, focus_xw=0.05, focus_yh=0.1,
E0=0, dE=0, lambda0=0, dlambda=0, flux=1e13,
int target_index=+1, alpha=0.25, beta=0.25)
int target_index=1, alpha=0.25, beta=0.25)


/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/sources/Source_gen.comp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ radius=0.0, dist=0, focus_xw=0.045, focus_yh=0.12, focus_aw=0, focus_ah=0,
E0=0, dE=0, lambda0=0, dlambda=0, I1=1,
yheight=0.1, xwidth=0.1, verbose=0, T1=0,
flux_file_perAA=0, flux_file_log=0,
Lmin=0,Lmax=0,Emin=0,Emax=0,T2=0,I2=0,T3=0,I3=0,zdepth=0, int target_index=+1)
Lmin=0,Lmax=0,Emin=0,Emax=0,T2=0,I2=0,T3=0,I3=0,zdepth=0, int target_index=1)

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

Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/sources/Source_simple.comp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ DEFINE COMPONENT Source_simple
SETTING PARAMETERS (radius=0.1, yheight=0, xwidth=0,
dist=0, focus_xw=.045, focus_yh=.12,
E0=0, dE=0, lambda0=0, dlambda=0,
flux=1, gauss=0, int target_index=+1)
flux=1, gauss=0, int target_index=1)

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