-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsample_parameters
92 lines (73 loc) · 5.96 KB
/
sample_parameters
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
EXPERIMENT_DATA(Ring_ECalABSuppSum0p2a.mca)
ADD_BACKGROUND(quad)
PEAK_SEARCH(no)
PEAK_SEARCH_SET_WINDOW(60)
COMMON_SCALING(no)
FORCE_POSITIVE_SCALING(no)
INDEPENDENT_SP(no)
COMMON_SP_FITTING(yes)
PLOT_OUTPUT(yes)
SAVE_OUTPUT(yes)
CHANNEL_SCALING(1.0)
VERBOSITY(normal)
DATA(test.mca)
DATA(test2.mca,rel,0.1,0.2,0.2,0.1)
SP(3,5500,6000,no,4.58171E+03,-1.29663E+01,9.29144E-03)
SP(4,5600,6100,no,4.58171E+03,-1.29663E+01)
SP(5,5700,6200,no,4.58171E+03,-1.29663E+01,9.29144E-03)
SP(6,5800,6300,no,4.58171E+03)
<---END_OF_PARAMETERS--->
This is a parameter file for the topspek code. The code will analyze and compare data in the specified .mca files, in the specified range of spectra and channels. If you change the format of the file, prepare for unforeseen consequences.
Parameters and their descriptions follow. If a parameter is not specified, the program will attempt to use a default value if availiable.
EXPERIMENT_DATA(file_path)
Contains the path to the .mca file containing experiment data.
ADD_BACKGROUND(value)
no: Don't add any background.
const: Add a constant (linear, slope = 0) background to the simulated data.
const_pos: Add a constant background, but force it to be positive.
lin: Add a linear background to the simulated data.
quad: Add a quadratic/parabolic background to the simulated data.
PEAK_SEARCH(value)
no: Data will be fit over the specified channel range (default).
yes: The program will search for a peak in the experiment data over the specified channel range, and shift the fit channel range to be centered on that peak.
PEAK_SEARCH_SET_WINDOW(value)
If using PEAK_SEARCH, this option can be used to specify the window size (number of channels of data) to fit around each found peak.
COMMON_SCALING(value)
no: Individual spectra in simulated data files will have their own scaling and background parameters (default).
yes: Individual spectra in simulated data files will have the same scaling and background parameters.
FORCE_POSITIVE_SCALING(value)
no: Scaling parameters for simulated data may be negative values (default).
yes: Scaling parameters for simulated data will be forced to a value of 0 or higher.
INDEPENDENT_SP(value)
no: Individual spectra specified using the SP command will not be treated as independent measurements (calculated total reduced chisq value will treat all spectra as part of one set of data) (default).
yes: Individual spectra specified using the SP command will be treated as independent measurements (calculated total reduced chisq value will be the sum of the values calculated for each spectrum).
COMMON_SP_FITTING(value)
yes: Individual entries specified using the SP command with the same spectrum number will be fit with the same scaling factors and background (default).
no: Individual entries specified using the SP command with the same spectrum number will not be fit with the same scaling factors and background.
CHANNEL_SCALING(value)
Can be used to specify a factor to scale all fit window (channel ranges) values by. This can be useful if looking at the same dataset using different contraction factors.
PLOT_OUTPUT(value)
no: Show chisq stats only (default).
yes: Show a plot of the simulated and experimental data alongside chisq stats.
detailed: Same as 'yes', except plot all simulated datasets and background as well.
SAVE_OUTPUT(value)
yes: Save fitted simulation data to mca files. Filenames are fit_background.mca (background data), fit_simN.mca, where N is a number corresponding to each simulated data set.
no: Don't save fitted simulation data.
VERBOSITY(value)
normal: Print various information when running the program (default).
chisq: Don't show any plots and only print the chisq value of the fit (if fitting is successful). Useful for interfacing the program with shell scripts.
redchisq: Don't show any plots and only print the reduced chisq value of the fit (if fitting is successful).
scaling: Don't show any plots and only print the scaling factor(s) determined in the fit (if fitting is successful). Scaling factors are printed with one line per input dataset, with the scaling factors for each spectrum separated by spaces.
DATA(file_path)
DATA(file_path, fix_scaling, scaling_arg0, scaling_arg1...)
Specifies the path(s) to the .mca file(s) containing simulated data. Multiple datasets may be specified, each on a separate line.
Values of 'fix_scaling' (optional):
no - The specified data will be fit via chisq minimization to find its scaling factor.
abs - The specified data will be scaled by the value specified in the following argument, rather than the value obtained by chisq minimization (scaling factors for other data will still be determined via chisq minimization). If multiple following arguments are specified, they will be interpreted as scaling factors for each individual spectrum (in the order of spectra specified using the SP parameter).
rel - The specified data will be scaled by the value specified in the following argument, relative to the scaling factor of the previous dataset (if there is no previous dataset, the scaling will be set to 0). If multiple following arguments are specified, they will be interpreted as relative scaling factors for each individual spectrum (in the order of spectra specified using the SP parameter).
SP(spectrum_number, start_channel, end_channel)
SP(spectrum_number, start_channel, end_channel, fix_background, background_arg0, background_arg1, background_arg2)
Each SP line specifies a simulated spectrum to analyze against the experiment data, along with the channel range to analyze (first three arguments). Multiple spectra may be specified, each on a separate line. For .spe files (which only contain a single spectrum), the same spectrum will always be used regardless of the spectrum number specified.
Values of fix_background (optional):
no - Allow background to be fit (default).
yes - Fix background to the parameters specified in the next three arguments. The first background parameter is constant, second is linear, third is quadratic. Unspecified background parameters will be set to 0 by default.