1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """The statistics user function definitions."""
24
25
26 from graphics import WIZARD_IMAGE_PATH
27 from pipe_control.statistics import aic, model_statistics
28 from user_functions.data import Uf_info; uf_info = Uf_info()
29 from user_functions.objects import Desc_container
30
31
32
33 uf_class = uf_info.add_class('statistics')
34 uf_class.title = "Class containing the statistics related functions."
35 uf_class.menu_text = "&statistics"
36 uf_class.gui_icon = "oxygen.actions.office-chart-pie"
37
38
39
40 uf = uf_info.add_uf('statistics.aic')
41 uf.title = "Calculate and store Akaike's Information Criterion (AIC) for each model."
42 uf.title_short = "Calculate AIC values."
43
44 uf.desc.append(Desc_container())
45 uf.desc[-1].add_paragraph("This will perform a calculation to obtain the chi-squared statistic for the current parameter values for each model, count the number of parameters per model and calculate Akaike's Information Criterion (AIC) using the formula AIC = chi2 + 2k. The AIC values, chi-squared values, and number of parameters will be stored in the appropriate location for the model in the relax data store.")
46 uf.backend = aic
47 uf.menu_text = "&aic"
48 uf.gui_icon = "relax.discrepancy_curve"
49 uf.wizard_apply_button = False
50 uf.wizard_size = (700, 400)
51 uf.wizard_image = WIZARD_IMAGE_PATH + 'statistics.png'
52
53
54
55 uf = uf_info.add_uf('statistics.model')
56 uf.title = "Calculate and store the model statistics."
57 uf.title_short = "Model statistics."
58
59 uf.desc.append(Desc_container())
60 uf.desc[-1].add_paragraph("This will perform a back-calculation to obtain the chi-squared statistic for the current parameter values, count the number of parameters and data points per model, and place all the values in the relax data store.")
61 uf.backend = model_statistics
62 uf.menu_text = "&model"
63 uf.gui_icon = "oxygen.categories.applications-education"
64 uf.wizard_apply_button = False
65 uf.wizard_size = (700, 400)
66 uf.wizard_image = WIZARD_IMAGE_PATH + 'statistics.png'
67