You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set alpha 0 #this and the following two lines are equivalent
7
6
set alpha 0deg
8
7
set alpha "0 deg"
9
8
10
-
#Default cross sections can be changed easily between the built-in models, see other examples on how to define reactions
9
+
#Default cross sections can be changed easily between the built-in models, see other examples on how to define reactions using e.g. R33 files
11
10
#set cs_rbs Rutherford
12
11
13
-
#Fluence is actually total number of ions, not ions/cm2... this should not be multiplied by detector solid angle (JaBS will do that)
14
-
set fluence 2.0e13
12
+
#RBS (and ERD) reactions are added automatically when running a simulation or a fit, if no reactions are specified
13
+
#load reactions RBS
14
+
#add reaction RBS 197Au
15
+
16
+
17
+
set fluence 2.0e13 #Fluence is actually total number of ions, not ions/cm2... this should *not* be multiplied by detector solid angle (JaBS will do that)
15
18
load exp "experimental.dat"
16
19
17
20
#sample can be set with one command
@@ -20,30 +23,31 @@ set sample Au 30tfu rough 20tfu n_rough 20 SiO2 6500tfu Si 20000tfu
20
23
#or loaded from a file (tabular data)
21
24
#load sample "sample.txt"
22
25
23
-
#Scripts can be loaded (run). It is convenient to store detector in a separate script.
24
-
load script "detector.jbs"
26
+
load script "detector.jbs" #Scripts can be loaded (run). It is convenient to store detector in a separate script.
25
27
#The following line can be uncommented after this script is run. We save the detector calibration at the end of the script.
26
28
#load script "calibration_out.jbs"
27
29
30
+
set emin 150keV #Speed up by setting the minimum energy in the simulation (optional)
31
+
32
+
#show sim
33
+
simulate #Run a simulation
34
+
35
+
save spectra "simulated_out.csv" #Save spectra
36
+
37
+
#fit ranges (channels) must be specified before fitting. We can define multiple ranges with one command.
28
38
add fit range [200:449] [450:700]
29
39
add fit range [1050:1110]
30
-
#Iterations can be limited if there is reason to suspect it won't converge...
31
-
set maxiter 100
32
-
#Speed up by setting the minimum energy in the simulation
33
-
set emin 150keV
34
-
simulate
35
-
save spectra "simulated_out.csv"
36
-
37
-
set fit normal
40
+
#Number of iterations can be limited if there is reason to suspect the fit won't converge...
41
+
#set maxiter 100
38
42
43
+
#Run a fit
39
44
fit *calib*,fluence,thick1,thick2,rough1,conc2_O
40
45
save spectra "example_out.csv"
41
-
#detector calibration can be saved to a script file. This can be loaded back in.
42
-
save calibration "calibration_out.jbs"
43
-
#fitted sample can be saved (and loaded back in later!)
44
-
save sample "sample_out.txt"
46
+
save calibration "calibration_out.jbs" #detector calibration can be saved to a script file. This can be loaded back in.
47
+
save sample "sample_out.txt" #fitted sample can be saved (and loaded back in later!)
0 commit comments