Skip to content

Commit

Permalink
Automatic update of developer site
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-builder committed Jun 19, 2024
1 parent 7c819b8 commit 1bf49c0
Show file tree
Hide file tree
Showing 8 changed files with 247 additions and 31 deletions.
20 changes: 10 additions & 10 deletions IndirectDataAnalysisAddingFitType.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,26 @@ <h3>Navigation</h3>
<span id="ida-addingfittype-ref"></span><h1>Adding a new fitting function to IDA<a class="headerlink" href="#adding-a-new-fitting-function-to-ida" title="Link to this heading"></a></h1>
<p>The tabs in Indirect Data Analysis use each fit spectra to a predefined list of functions, adding new functions to the
list of available ones can seem daunting at first but it can be done by following some steps.</p>
<section id="fqfit">
<h2>FqFit<a class="headerlink" href="#fqfit" title="Link to this heading"></a></h2>
<section id="function-q">
<h2>Function(Q)<a class="headerlink" href="#function-q" title="Link to this heading"></a></h2>
<p>In the <cite>FitTabConstants.h</cite> file, there are sets of maps of {“Fit function class name”, “Fit function class initialization string”}, e.g.
<cite>{std::string(“TeixeiraWater”), std::string(“name=TeixeiraWater, Tau=1, L=1.5, constraints=(Tau&gt;0, L&gt;0)”)}</cite>. To add
a new fit function to FqFit you simply need to add it to this list of available functions. Currently, we divide up the
a new fit function to Function(Q) you simply need to add it to this list of available functions. Currently, we divide up the
functions into Width, EISF, and All with the intent that the list of functions would change depending on what data is
loaded into the tab, however as it is not yet implemented for the workspace input it uses the list for All.</p>
</section>
<section id="msdfit">
<h2>MSDFit<a class="headerlink" href="#msdfit" title="Link to this heading"></a></h2>
<p>The fit function strings for MSDFit are also stored in the <cite>FitTabConstants.h</cite> file.</p>
<section id="msd">
<h2>MSD<a class="headerlink" href="#msd" title="Link to this heading"></a></h2>
<p>The fit function strings for MSD are also stored in the <cite>FitTabConstants.h</cite> file.</p>
</section>
<section id="iqtfit">
<h2>IqtFit<a class="headerlink" href="#iqtfit" title="Link to this heading"></a></h2>
<p>The fitting functions in IqtFit are hard coded into the template browser. These should be moved into the <cite>FitTabConstants.h</cite> file to
allow us to add more functions easily in the future.</p>
</section>
<section id="convfit">
<h2>ConvFit<a class="headerlink" href="#convfit" title="Link to this heading"></a></h2>
<p>ConvFit has the most involved process of adding a function to it’s library and it needs to be added in its entirety.</p>
<section id="convolution">
<h2>Convolution<a class="headerlink" href="#convolution" title="Link to this heading"></a></h2>
<p>Convolution has the most involved process of adding a function to it’s library and it needs to be added in its entirety.</p>
<p>Firstly, in <cite>ConvTypes.h</cite> add the function name to the enumerated list FitType e.g. <cite>TeixeiraWater</cite>, and in the paramID
enum add an entry for each parameter in the function along with a unique prefix denoting which function they are for.
e.g. <cite>TW_HEIGHT, TW_DIFFCOEFF, TW_TAU, TW_CENTRE</cite>. Make sure to preserve the ordering of the current enum and
Expand Down Expand Up @@ -151,7 +151,7 @@ <h2>ConvFit<a class="headerlink" href="#convfit" title="Link to this heading">¶
<p>Moreover, to tie it all together add param ranges to g_typeMap in the form
<cite>{FitType, {“Function name displayed in tab”, “Function class name”, {ParamID::first, ParamID::last}}}</cite> this allows the template
to construct a function out of the related parameters. There are several places where this can be added, those being FitType,
LorentzianType, and BackgroundType. ConvFit can run fits with one of each Fit, Lorentzian, and Background but only one of each.</p>
LorentzianType, and BackgroundType. Convolution can run fits with one of each Fit, Lorentzian, and Background but only one of each.</p>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="n">FitType</span><span class="o">::</span><span class="n">TeixeiraWater</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="s">&quot;Teixeira Water SQE&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;TeixeiraWaterSQE&quot;</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="n">ParamID</span><span class="o">::</span><span class="n">TW_HEIGHT</span><span class="p">,</span><span class="w"> </span><span class="n">ParamID</span><span class="o">::</span><span class="n">TW_CENTRE</span><span class="p">}}},</span>
</pre></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions Testing/Indirect/DataReductionTests.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<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 Testing" href="../Inelastic/DataProcessorTests.html" />
<link rel="next" title="Inelastic Corrections Testing" href="../Inelastic/CorrectionsTests.html" />
<link rel="prev" title="Indirect Diffraction Testing" href="DiffractionTests.html" />

<script>
Expand Down Expand Up @@ -248,7 +248,7 @@ <h2><a class="toc-backref" href="#id5" role="doc-backlink">Transmission</a><a cl
</a>
</li>
<li>
<a href="../Inelastic/DataProcessorTests.html" title="Next Chapter: Inelastic Data Processor Testing"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Inelastic Dat... &raquo;</span>
<a href="../Inelastic/CorrectionsTests.html" title="Next Chapter: Inelastic Corrections Testing"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">Inelastic Cor... &raquo;</span>
</a>
</li>

Expand Down
Loading

0 comments on commit 1bf49c0

Please sign in to comment.