Skip to content

Commit 4a60a26

Browse files
authored
Merge pull request #2337 from willend/main
2 parents 0d79bd6 + f377b82 commit 4a60a26

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

mcstas-comps/examples/PSI/RITA-II/RITA-II.instr

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
* <li> Phonon sample, inelastic scattering, no Bragg peaks in sample </li>
5050
* mcrun RITA-II.instr -n1e6 L0=3.418 BPL=0.97 BPH=1.03 EI=7 EF=5 SAMPLE=4 REP=10 QH=2 QK=0.16 QM=0 AS=4.95 BS=4.95 CS=4.95 AAX=-4.95 BBZ=4.95 CCY=4.95 AH=0 AK=1 AL=0 BH=1 BK=0 BL=0 SAMPLEFILE="Pb.laz" -d RITA-II_SXPb200_2meV <br>
5151
* </ul>
52+
*
53+
* %Example: BPL=0.97 BPH=1.03 EI=5 EN=0 COLL_MS=40 SAMPLE=1 OUTFILTER=0 REP=10 Detector: psd_detector_I=216.427
54+
*
5255
* %Parameters
5356
* ITAR: [mA] Relative neutron yield from the spallation target. Value relative to 2009
5457
* EI: [meV] Incoming neutron energy. Also used to set range of energy monitors
@@ -432,7 +435,7 @@ int YwinMax[10];
432435

433436
/* positioning of monochromator and analyser */
434437
arg = PI/machine_hkl.dm/machine_hkl.ki;
435-
if (fabs(arg > 1))
438+
if (fabs(arg) > 1)
436439
sprintf(machine_real.message, "Monochromator can not reach this KI. arg=%g", arg);
437440
else {
438441
if (machine_hkl.dm <= 0 || machine_hkl.ki <= 0)
@@ -444,7 +447,7 @@ int YwinMax[10];
444447
machine_real.a2=2*machine_real.a1;
445448

446449
arg = PI/machine_hkl.da/machine_hkl.kf;
447-
if (fabs(arg > 1))
450+
if (fabs(arg) > 1)
448451
sprintf(machine_real.message, "Analyzer can not reach this KF. arg=%g",arg);
449452
else {
450453
if (machine_hkl.da <= 0 || machine_hkl.kf <= 0)
@@ -460,7 +463,7 @@ int YwinMax[10];
460463
/* code from TASMAD/t_conv.F:SAM_CASE */
461464
arg = (machine_hkl.ki*machine_hkl.ki + machine_hkl.kf*machine_hkl.kf - machine_real.qs)
462465
/ (2*machine_hkl.ki*machine_hkl.kf);
463-
if (fabs(arg) < 1)
466+
if (fabs(arg) < 1.0)
464467
machine_real.a4 = RAD2DEG*acos(arg);
465468
else
466469
sprintf(machine_real.message, "Q modulus too big. Can not close triangle. arg=%g", arg);
@@ -484,7 +487,7 @@ machine_real.aa5 = -RAD2DEG*(acos((sin(DEG2RAD*machine_real.a6)-(cos(DEG2RAD*mac
484487
/*printf("(RITA Analyzer Rack Angle: AA5=%.4g[deg])\n", machine_real.aa5);*/
485488
/*A4 angle between blades */
486489
dsb = sqrt(dsa*dsa + ana_d*ana_d - 2*dsa*ana_d*cos(DEG2RAD*machine_real.aa5));
487-
machine_real.da4 = RAD2DEG*asin(ana_d*sin(DEG2RAD*abs(machine_real.aa5))/dsb);
490+
machine_real.da4 = RAD2DEG*asin(ana_d*sin(DEG2RAD*fabs(machine_real.aa5))/dsb);
488491
//machine_real.da4 = RAD2DEG*atan(ana_d*cos(DEG2RAD*machine_real.aa5)/dsa);
489492
printf("(RITA Analyzer Angle between blades: DA4=%.4g[deg])\n", machine_real.da4);
490493
/*Blade angle rotation */

mcstas-comps/examples/TRIGA/RTP_DIF/RTP_DIF.instr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* %Description
1515
*
1616
*
17-
* Example: mcrun RTP_DIF.instr lambda=2.36 Detector: det_I=170
17+
* %Example: mcrun RTP_DIF.instr lambda=2.36 Detector: det_big_I=123752
1818
*
1919
* %Parameters
2020
* lambda: [Angs] Monochromator selected wavelength

mcstas-comps/examples/TRIGA/RTP_Laue/RTP_Laue.instr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* This is a radiography installed on a radial beam port 3 at the Reactor TRIGA
1616
* PUSPATI (RTP). It uses a thermal beam port.
1717
*
18-
* Example: mcrun RTP_SANS.instr lambda=5
18+
* %Example: -y Detector: image_plate_scattered_I=179284
1919
*
2020
* %Parameters
2121
* theta: [deg] horizontal rotation of the object

mcstas-comps/examples/TRIGA/RTP_NeutronRadiography/RTP_NeutronRadiography.instr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* PUSPATI (RTP). It uses the thermal beam port 3.
1717
* The sample is made of 2 concentric cylinders made of Cu and Fe.
1818
*
19-
* Example: mcrun RTP_NeutronRadiography.instr theta=20 phi=10
19+
* %Example: theta=20 phi=10 Detector: image_plate_eff_I=9.54919e+07
2020
*
2121
* %Parameters
2222
* theta: [deg] horizontal rotation of the object

mcstas-comps/examples/Tests_samples/Test_SANS/Test_SANS.instr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* %Example: SAMPLE=4 Detector: PSDMonitor_I=1.326e-05
3636
* %Example: SAMPLE=5 Ncount=1e6 Detector: PSDMonitor_I=2.714e-09
3737
* %Example: SAMPLE=6 Ncount=1e6 Detector: PSDMonitor_I=2.051e-09
38-
* %Example: SAMPLE=7 Ncount=1e6 Detector: PSDMonitor_I=1.687e-09
38+
* %Example: SAMPLE=7 Ncount=1e5 Detector: PSDMonitor_I=1.687e-09
3939
* %Example: SAMPLE=9 Detector: PSDMonitor_I=2.071e-09
4040
* %Example: SAMPLE=10 Detector: PSDMonitor_I=2.079e-09
4141
* %Example: SAMPLE=11 Detector: PSDMonitor_I=1.642e-09

0 commit comments

Comments
 (0)