-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndirectDataAnalysisFileStructure.html
232 lines (189 loc) · 12.9 KB
/
IndirectDataAnalysisFileStructure.html
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>IndirectDataAnalysis File Structure</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="_static/bootstrap-sphinx.css?v=fadd4351" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=77160d70" />
<script src="_static/documentation_options.js?v=a8da1a53"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Inelastic Data Processor Class Structure" href="InelasticDataProcessorFileStructure.html" />
<link rel="prev" title="Adding a new fitting function to IDA" href="IndirectDataAnalysisAddingFitType.html" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-59110517-1', 'auto');
ga('send', 'pageview');
</script>
</head><body>
<div id="navbar" class="navbar navbar-default ">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://www.mantidproject.org">
</a>
<span class="navbar-text navbar-version pull-left"><b>main</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="divider-vertical"></li>
<li><a href="index.html">Home</a></li>
<li><a href="https://download.mantidproject.org">Download</a></li>
<li><a href="https://docs.mantidproject.org">User Documentation</a></li>
<li><a href="http://www.mantidproject.org/contact">Contact Us</a></li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<p>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="nav-item nav-item-0"><a href="index.html">Documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">IndirectDataAnalysis File Structure</a></li>
</ul>
</div> </p>
</div>
<div class="container">
<div class="row">
<div class="body col-md-12 content" role="main">
<section id="indirectdataanalysis-file-structure">
<span id="ida-structure-ref"></span><h1>IndirectDataAnalysis File Structure<a class="headerlink" href="#indirectdataanalysis-file-structure" title="Link to this heading">¶</a></h1>
<p>The many levels of inheritance in the indirect data analysis codebase can be confusing. it is not always clear how they
all interact.</p>
<p>The Elwin and I(Q,t) are the most different as their components are all contained within a single UI file. This is
something that should be fixed to be more modular but it could be left till the fit tabs are separated out entirely.</p>
</section>
<section id="fit-tab-structure">
<h1>Fit Tab structure<a class="headerlink" href="#fit-tab-structure" title="Link to this heading">¶</a></h1>
<p>The QENS fit tabs in Inelastic Data analysis have this general structure. Different tabs will feature different derived
classes for the IndirectDataAnalysisTab, FitDataView, FunctionTemplateBrowser, and the AddWorkspaceDialog</p>
<figure class="align-default">
<a class="reference internal image-reference" href="_images/IndirectFitTabStructure.png"><img alt="_images/IndirectFitTabStructure.png" src="_images/IndirectFitTabStructure.png" style="width: 400px;" />
</a>
</figure>
</section>
<section id="qens-fit-class-structure">
<h1>QENS Fit class structure<a class="headerlink" href="#qens-fit-class-structure" title="Link to this heading">¶</a></h1>
<figure class="align-default">
<a class="reference internal image-reference" href="_images/IndirectFitClassStructure.png"><img alt="_images/IndirectFitClassStructure.png" src="_images/IndirectFitClassStructure.png" style="width: 2000px;" />
</a>
</figure>
<p>The ideal structure for the interface should include MVP for each defined section. As part of the refactoring of the old
IndirectFittingModel has been broken up, the IndirectFitData and IndirectFitPlot all previously used the same instance
of the fitting model, now communication is handled with signals through the presenters and they each have their own.
Some objects are shared between models, but as a design rule only one object should ever make changes to it e.g. the
IndirectFitData is controlled by IndirectFitDataModel, but is sometimes read by IndirectFitPlot.</p>
<p>The IndirectFitPlotModel also contains a pointer to the active fit function and the IndirectFitOutput from the
IndirectFittingModel, again should only ever READ FROM THESE OBJECTS only the IndirectFittingModel should control it.</p>
<section id="indirectdataanalysistab">
<h2>IndirectDataAnalysisTab<a class="headerlink" href="#indirectdataanalysistab" title="Link to this heading">¶</a></h2>
<p>The IndirectDataAnalysisTab is the master container for each IDA tab, contained in this are the individual
tabs IndirectFittingModel and View, as well as the sub widgets that make up the interface. Each Tab contains:
- an IndirectFitDataInterface that manages the input of data to the tab
- an IndirectFitPlot that contains two mini-plots: one for the data, and one for the fit difference.
- an IndirectFitPropertyBrowser that contains the processes for manipulating the fit function and fit methods.
- an IndirectFitOutputOptions that contains methods of producing plots of fitted data.</p>
</section>
<section id="indirectfittingmodel">
<h2>IndirectFittingModel<a class="headerlink" href="#indirectfittingmodel" title="Link to this heading">¶</a></h2>
<p>The fitting function for the interface is run from the IndirectFittingModel, the fitting model controls an
IndirectFitOutput, this object contains data from fits run through the model so that the results can then be read by the
IndirectFitPlotModel to be used in the mini-plot. The IndirectFittingModel also contains specifics for the functions that
can be utilized by the IndirectFitPropertyBrowser, listing the available functions and their ties.</p>
</section>
<section id="indirectfitdatainterface">
<h2>IndirectFitDataInterface<a class="headerlink" href="#indirectfitdatainterface" title="Link to this heading">¶</a></h2>
<p>The IndirectFitDataInterface is the container that controls data input for the tab, it contains a table of spectra added
through the AddWorkspaceDialog, some tabs require different inputs, for example, the ConvFitTab requires each data entry
to have both a sample and resolution workspace. Because of this, some tabs have their version of this widget that
allows for these specific additions. The data input is stored in the IndirectFitData object that can then be read by the
IndirectFitPlotModel to be used in the mini-plot.</p>
<p>On construction, the IndirectFitDataPresenter is passed a Model (IIndirectFitDataModel) and a view (IIndirectFitDataView)
these define the usage of the widget and the data to be contained within. The Presenter connects the signals when the
editable entries in the view’s data table with the model that records the contents of the table in the IndirectFitData
container. The presenter also contains the command for creating the AddWorkspaceDialog object which is overwritten when
a different version is needed (e.g. ConvFitDataPresenter creates ConvfitAddWorkspaceDialogue) the presenter then
connects signals from the dialogue for data being added. Different versions of the presenter utilize a different form of
the <cite>addTableEntry</cite> function to use their unique layouts for their data and store the relevant data through the
model. The IndirectFitDataModel is identical for all tabs and contains the functionality required for all even if some
parts are not required such as the resolution in ConvFit. The model contains functions for manipulating the contents of
IndirectFitData (m_fittingData) and recalling information from it to be passed to the FittingModel. The contents of the
model can be queried using either the FitDomainIndex (the position of a workspace-spectra on the data table) or with
WorkspaceID (the position of a workspace in m_fittingData) and WorkspaceIndex (the WorkspaceIndex of spectra within
the workspace)</p>
</section>
<section id="indirectfitplot">
<h2>IndirectFitPlot<a class="headerlink" href="#indirectfitplot" title="Link to this heading">¶</a></h2>
<p>The IndirectFitPlot is the container that controls the miniplots within the tab, this consists of two miniplot frames.
One to contains the selected spectra, the guess for the fit function if selected, and the fitted function if ran. and
the second to contain the fit difference once the tab has been run. this widget also contains the controls for which
spectra should be plotted.</p>
</section>
<section id="indirectfitpropertybrowser">
<h2>IndirectFitPropertyBrowser<a class="headerlink" href="#indirectfitpropertybrowser" title="Link to this heading">¶</a></h2>
<p>The IndirectFitPropertyBrowser is the container that controls the fitting function to be used within the tab. These each
has their own sets of functions that are stored within the TemplateBrowser, the TemplateBrowser is a simplified version
of the normal Mantid fit property browser that contains only the factors relevant to the processes used in the tab. the
contents of this Browser are given to the FittingModel to be processed.</p>
</section>
<section id="indirectfitoutputoptions">
<h2>IndirectFitOutputOptions<a class="headerlink" href="#indirectfitoutputoptions" title="Link to this heading">¶</a></h2>
<p>The IndirectFitOutputOptions contains a set of controls that allow for the output of fits from the interface to be plotted
separately, including plotting fit parameters from simultaneous or sequential fits.</p>
</section>
<section id="indirectfitdata">
<h2>IndirectFitData<a class="headerlink" href="#indirectfitdata" title="Link to this heading">¶</a></h2>
<p>The IndirectFitData container serves as a storage container for the data contained within the IndirectFitDataInterface,
it allows for data to be communicated between the plot and the data input without extraneous signals. By design, the only
thing that should manipulate to contents of IndirectFitData is the IndirectFitDataInterface. IndirectFitPlot should only
ever read the contents of IndirectFitData.</p>
</section>
<section id="indirectfitoutput">
<h2>IndirectFitOutput<a class="headerlink" href="#indirectfitoutput" title="Link to this heading">¶</a></h2>
<p>The IndirectFitData container serves as a storage container for the output of fits from the tabs, it allows for data to
be communicated between the plot and the FittingModel without extraneous signals. By design, the only
thing that should manipulate to contents of IndirectFitOutput is the IndirectFittingModel. IndirectFitPlot should only
ever read the contents of IndirectFitOutput.</p>
</section>
</section>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<ul class="nav navbar-nav" style=" float: right;">
<li>
<a href="IndirectDataAnalysisAddingFitType.html" title="Previous Chapter: Adding a new fitting function to IDA"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« Adding a new ...</span>
</a>
</li>
<li>
<a href="InelasticDataProcessorFileStructure.html" title="Next Chapter: Inelastic Data Processor Class Structure"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Inelastic Dat... »</span>
</a>
</li>
<li><a href="#">Back to top</a></li>
</ul>
<p>
</p>
</div>
</footer>
</body>
</html>