/usr/share/gtk-doc/html/libgwyddion/GwyNLFitPreset.html is in libgwyddion20-doc 2.34-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Gwyddion Library Reference Manual: GwyNLFitPreset</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="prev" href="libgwyddion-GwyNLFitter.html" title="GwyNLFitter">
<link rel="next" href="GwyFDCurvePreset.html" title="GwyFDCurvePreset">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left">
<a href="#" class="shortcut">Top</a>
|
<a href="#GwyNLFitPreset.description" class="shortcut">Description</a>
|
<a href="#GwyNLFitPreset.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="libgwyddion-GwyNLFitter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GwyFDCurvePreset.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GwyNLFitPreset"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GwyNLFitPreset.top_of_page"></a>GwyNLFitPreset</span></h2>
<p>GwyNLFitPreset — NL fitter preset functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GwyNLFitPreset.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <libgwyddion/gwyddion.h>
struct <a class="link" href="GwyNLFitPreset.html#GwyNLFitPreset-struct" title="struct GwyNLFitPreset">GwyNLFitPreset</a>;
struct <a class="link" href="GwyNLFitPreset.html#GwyNLFitPresetClass" title="struct GwyNLFitPresetClass">GwyNLFitPresetClass</a>;
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-value" title="gwy_nlfit_preset_get_value ()">gwy_nlfit_preset_get_value</a> (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fres</code></em>);
const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-formula" title="gwy_nlfit_preset_get_formula ()">gwy_nlfit_preset_get_formula</a> (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-nparams" title="gwy_nlfit_preset_get_nparams ()">gwy_nlfit_preset_get_nparams</a> (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>);
const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-param-name" title="gwy_nlfit_preset_get_param_name ()">gwy_nlfit_preset_get_param_name</a> (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> param</code></em>);
<a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> * <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-param-units" title="gwy_nlfit_preset_get_param_units ()">gwy_nlfit_preset_get_param_units</a> (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> param</code></em>,
<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit_x</code></em>,
<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit_y</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-guess" title="gwy_nlfit_preset_guess ()">gwy_nlfit_preset_guess</a> (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_dat</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fres</code></em>);
<a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="returnvalue">GwyNLFitter</span></a> * <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-fit" title="gwy_nlfit_preset_fit ()">gwy_nlfit_preset_fit</a> (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="type">GwyNLFitter</span></a> *fitter</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_dat</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *err</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fixed_param</code></em>);
<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> * <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-presets" title="gwy_nlfit_presets ()">gwy_nlfit_presets</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="GwyNLFitPreset.html#GwyNLFitPresetBuiltin" title="GwyNLFitPresetBuiltin">GwyNLFitPresetBuiltin</a>;
</pre>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+----<a class="link" href="GwyResource.html" title="GwyResource">GwyResource</a>
+----GwyNLFitPreset
+----<a class="link" href="GwyFDCurvePreset.html" title="GwyFDCurvePreset">GwyFDCurvePreset</a>
</pre>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.description"></a><h2>Description</h2>
<p>
<a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter">Non-linear fitter</a> presets are predefined
fitting functions, with guessing, weighting, etc. to ease fitting of
common functions. Most of those currently implemented are related to
one-dimensional statistical characteristics of randomly rough surfaces,
however, several general-purpose fitting functions are also available.
</p>
<p>
The presets are identified by name and can be obtained from the
corresponding <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a>, see <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-presets" title="gwy_nlfit_presets ()"><code class="function">gwy_nlfit_presets()</code></a>. All their properties
can be queried with methods such as <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-nparams" title="gwy_nlfit_preset_get_nparams ()"><code class="function">gwy_nlfit_preset_get_nparams()</code></a> or
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-formula" title="gwy_nlfit_preset_get_formula ()"><code class="function">gwy_nlfit_preset_get_formula()</code></a>. A generic method to derive units of
fitting parameters from units of fitted data is also available:
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-param-units" title="gwy_nlfit_preset_get_param_units ()"><code class="function">gwy_nlfit_preset_get_param_units()</code></a>.
</p>
<p>
As of version 2.7 the defined functions include:
</p>
<table border="0" summary="Simple list" class="simplelist">
<tr><td><code class="literal">"Gaussian"</code></td></tr>
<tr><td><code class="literal">"Gaussian (PSDF)"</code></td></tr>
<tr><td><code class="literal">"Gaussian (ACF)"</code></td></tr>
<tr><td><code class="literal">"Gaussian (HHCF)"</code></td></tr>
<tr><td><code class="literal">"Gaussian (RPSDF)"</code></td></tr>
<tr><td><code class="literal">"Exponential"</code></td></tr>
<tr><td><code class="literal">"Exponential (PSDF)"</code></td></tr>
<tr><td><code class="literal">"Exponential (ACF)"</code></td></tr>
<tr><td><code class="literal">"Exponential (HHCF)"</code></td></tr>
<tr><td><code class="literal">"Exponential (RPSDF)"</code></td></tr>
<tr><td><code class="literal">"Polynomial (order 0)"</code></td></tr>
<tr><td><code class="literal">"Polynomial (order 1)"</code></td></tr>
<tr><td><code class="literal">"Polynomial (order 2)"</code></td></tr>
<tr><td><code class="literal">"Polynomial (order 3)"</code></td></tr>
<tr><td><code class="literal">"Square wave"</code></td></tr>
<tr><td><code class="literal">"Power"</code></td></tr>
<tr><td><code class="literal">"Lorentzian"</code></td></tr>
<tr><td><code class="literal">"Sinc"</code></td></tr>
</table>
<p>
</p>
<p>
The result of the fitting is stored in a normal <a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="type">GwyNLFitter</span></a>, therefore the
typical use is:
</p>
<p>
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="usertype">GwyNLFitPreset</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">preset</span><span class="symbol">;</span>
<span class="usertype">GwyNLFitter</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">fitter</span><span class="symbol">;</span>
<span class="usertype">gdouble</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">params</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">errors</span><span class="symbol">;</span>
<span class="normal">preset </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GwyInventory.html#gwy-inventory-get-item">gwy_inventory_get_item</a></span><span class="symbol">(</span><span class="function"><a href="#gwy-nlfit-presets">gwy_nlfit_presets</a></span><span class="symbol">(),</span><span class="normal"> </span><span class="string">"Gaussian"</span><span class="symbol">);</span>
<span class="normal">params </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-new">g_new</a></span><span class="symbol">(</span><span class="normal"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a></span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="#gwy-nlfit-preset-get-nparams">gwy_nlfit_preset_get_nparams</a></span><span class="symbol">(</span><span class="normal">preset</span><span class="symbol">));</span>
<span class="normal">errors </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-new">g_new</a></span><span class="symbol">(</span><span class="normal"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a></span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="#gwy-nlfit-preset-get-nparams">gwy_nlfit_preset_get_nparams</a></span><span class="symbol">(</span><span class="normal">preset</span><span class="symbol">));</span>
<span class="comment">/* Use a priori parameter value information, or: */</span>
<span class="function"><a href="#gwy-nlfit-preset-guess">gwy_nlfit_preset_guess</a></span><span class="symbol">(</span><span class="normal">preset</span><span class="symbol">,</span><span class="normal"> ndata</span><span class="symbol">,</span><span class="normal"> xdata</span><span class="symbol">,</span><span class="normal"> ydata</span><span class="symbol">,</span><span class="normal"> params</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">ok</span><span class="symbol">);</span>
<span class="normal">fitter </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="#gwy-nlfit-preset-fit">gwy_nlfit_preset_fit</a></span><span class="symbol">(</span><span class="normal">preset</span><span class="symbol">,</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
<span class="normal"> ndata</span><span class="symbol">,</span><span class="normal"> xdata</span><span class="symbol">,</span><span class="normal"> ydata</span><span class="symbol">,</span><span class="normal"> params</span><span class="symbol">,</span>
<span class="normal"> params</span><span class="symbol">,</span><span class="normal"> errors</span><span class="symbol">,</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
<span class="comment">/* Examine fitting status, parameters and errors... */</span>
<span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free">g_free</a></span><span class="symbol">(</span><span class="normal">params</span><span class="symbol">);</span>
<span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free">g_free</a></span><span class="symbol">(</span><span class="normal">errors</span><span class="symbol">);</span>
<span class="function"><a href="libgwyddion-GwyNLFitter.html#gwy-math-nlfit-free">gwy_math_nlfit_free</a></span><span class="symbol">(</span><span class="normal">fitter</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GwyNLFitPreset-struct"></a><h3>struct GwyNLFitPreset</h3>
<pre class="programlisting">struct GwyNLFitPreset;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GwyNLFitPresetClass"></a><h3>struct GwyNLFitPresetClass</h3>
<pre class="programlisting">struct GwyNLFitPresetClass {
GwyResourceClass parent_class;
void (*reserved1)(void);
void (*reserved2)(void);
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-value"></a><h3>gwy_nlfit_preset_get_value ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> gwy_nlfit_preset_get_value (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fres</code></em>);</pre>
<p>
Calculates preset function value in a single point with given parameters.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>preset</code></em> :</span></p></td>
<td>A NL fitter function preset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>The point to compute value at.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>Preset parameter values.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fres</code></em> :</span></p></td>
<td>Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if succeeds, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The function value.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-formula"></a><h3>gwy_nlfit_preset_get_formula ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gwy_nlfit_preset_get_formula (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>);</pre>
<p>
Gets function formula of <em class="parameter"><code>preset</code></em> (with Pango markup).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>preset</code></em> :</span></p></td>
<td>A NL fitter function preset.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The preset function formula.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-nparams"></a><h3>gwy_nlfit_preset_get_nparams ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gwy_nlfit_preset_get_nparams (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>);</pre>
<p>
Return the number of parameters of <em class="parameter"><code>preset</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>preset</code></em> :</span></p></td>
<td>A NL fitter function preset.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The number of function parameters.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-param-name"></a><h3>gwy_nlfit_preset_get_param_name ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gwy_nlfit_preset_get_param_name (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> param</code></em>);</pre>
<p>
Gets the name of a fitting parameter of a fitter preset.
</p>
<p>
The name may contain Pango markup.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>preset</code></em> :</span></p></td>
<td>A NL fitter function preset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>param</code></em> :</span></p></td>
<td>A parameter number.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The name of parameter <em class="parameter"><code>param</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-get-param-units"></a><h3>gwy_nlfit_preset_get_param_units ()</h3>
<pre class="programlisting"><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="returnvalue">GwySIUnit</span></a> * gwy_nlfit_preset_get_param_units (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> param</code></em>,
<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit_x</code></em>,
<em class="parameter"><code><a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> *siunit_y</code></em>);</pre>
<p>
Derives the SI unit of a fitting parameter from the units of abscissa and
ordinate.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>preset</code></em> :</span></p></td>
<td>A NL fitter function preset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>param</code></em> :</span></p></td>
<td>A parameter number.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit_x</code></em> :</span></p></td>
<td>SI unit of abscissa.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>siunit_y</code></em> :</span></p></td>
<td>SI unit of ordinate.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly created <a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a> with the units of the parameter <em class="parameter"><code>param</code></em>.
If the units of <em class="parameter"><code>param</code></em> are not representable as <a class="link" href="GwySIUnit.html" title="GwySIUnit"><span class="type">GwySIUnit</span></a>,
the result is unitless (i.e. it will be presented as a mere
number).</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.5</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-guess"></a><h3>gwy_nlfit_preset_guess ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_nlfit_preset_guess (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_dat</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fres</code></em>);</pre>
<p>
Performs initial parameter estimate for a NL fitter.
</p>
<p>
The initial estimate method depends on the function used. There is no
absolute guarantee of quality, however if the data points approximately
match the fitted function the fit will typically converge from the returned
estimate.
</p>
<p>
The parameters are filled also on failure, though just with some neutral
values that should not give raise to NaNs and infinities.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>preset</code></em> :</span></p></td>
<td>A NL fitter function preset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_dat</code></em> :</span></p></td>
<td>The number of data points (number of items in <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>Abscissa points.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Ordinate points.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>The array to fill with estimated parameter values. It has to be
at least <a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-nparams" title="gwy_nlfit_preset_get_nparams ()"><code class="function">gwy_nlfit_preset_get_nparams()</code></a> long.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fres</code></em> :</span></p></td>
<td>Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if succeeds, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-preset-fit"></a><h3>gwy_nlfit_preset_fit ()</h3>
<pre class="programlisting"><a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="returnvalue">GwyNLFitter</span></a> * gwy_nlfit_preset_fit (<em class="parameter"><code><a class="link" href="GwyNLFitPreset.html" title="GwyNLFitPreset"><span class="type">GwyNLFitPreset</span></a> *preset</code></em>,
<em class="parameter"><code><a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="type">GwyNLFitter</span></a> *fitter</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_dat</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *x</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *y</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *params</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *err</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fixed_param</code></em>);</pre>
<p>
Performs a nonlinear fit with a preset.
</p>
<p>
See <a class="link" href="libgwyddion-GwyNLFitter.html#gwy-math-nlfit-fit-full" title="gwy_math_nlfit_fit_full ()"><code class="function">gwy_math_nlfit_fit_full()</code></a> for details.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>preset</code></em> :</span></p></td>
<td>A NL fitter function preset.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fitter</code></em> :</span></p></td>
<td>A Marquardt-Levenberg nonlinear fitter already initialized for
<em class="parameter"><code>preset</code></em>'s function, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_dat</code></em> :</span></p></td>
<td>The number of data points (number of items in <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>Abscissa points.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Ordinate points.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>Initial parameter estimate (the number of parameters depends on
the fitted preset and it can be obtained with
<a class="link" href="GwyNLFitPreset.html#gwy-nlfit-preset-get-nparams" title="gwy_nlfit_preset_get_nparams ()"><code class="function">gwy_nlfit_preset_get_nparams()</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
<td>Array to store parameter errros to, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fixed_param</code></em> :</span></p></td>
<td>Which parameters should be treated as fixed (set
corresponding element to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for them). May be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
all parameters are variable.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Either <em class="parameter"><code>fitter</code></em> itself, or a newly created fitter if it was <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-nlfit-presets"></a><h3>gwy_nlfit_presets ()</h3>
<pre class="programlisting"><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> * gwy_nlfit_presets (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Gets inventory with all the NLFit presets.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>NLFit preset inventory.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyNLFitPresetBuiltin"></a><h3>GwyNLFitPresetBuiltin</h3>
<pre class="programlisting">typedef struct _GwyNLFitPresetBuiltin GwyNLFitPresetBuiltin;</pre>
<p>
</p>
</div>
</div>
<div class="refsect1">
<a name="GwyNLFitPreset.see-also"></a><h2>See Also</h2>
<a class="link" href="libgwyddion-GwyNLFitter.html#GwyNLFitter" title="struct GwyNLFitter"><span class="type">GwyNLFitter</span></a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|