"Fossies" - the Fresh Open Source Software Archive

Member "scidavis-2.3.0/doc/analysis.tex" (12 Jun 2020, 26232 Bytes) of package /linux/misc/scidavis-2.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TeX and LaTeX source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!--
    2 
    3         SMALL TUTORIAL ON THE ANALYSIS POSSIBILITIES
    4         ============================================
    5 
    6         rewrited and updated for version 0.20
    7 
    8 -->
    9 <title>Analysis of data and curves</title>
   10 
   11 <!--
   12 *************************************************************************
   13 
   14                 FFT
   15 
   16 *************************************************************************
   17 -->
   18 <sect1 id="sec-fft">
   19 <title>Fast Fourier Transform</title>
   20 
   21 <indexterm><primary>Curve analysis</primary><secondary>FFT</secondary></indexterm>
   22 
   23 <para>This function can be accessed by the &fft-on-curves-lnk; of the &analysis-tables-menu-lnk; when a table is selected, or &analysis-plots-menu-lnk; when a plot is selected. The Fourier transform decomposes a signal in its elementary components by assuming that the signal x(t) can be describe as a sum:</para>
   24 
   25 <equation> 
   26   <title>Fourier equation</title>
   27   <mediaobject>
   28     <imageobject>
   29       <imagedata format="PNG" fileref="equations/equation_fourier.png"/>
   30     </imageobject>
   31   </mediaobject>
   32 </equation>
   33 
   34 <para>in which ω<subscript>n</subscript> are the frequencies, a<subscript>n</subscript> are the amplitudes of each frequency and ψ<subscript>n</subscript> are the phase corresponding frequency. &appname; will compute these parameters and build a new plot of the amplitude as a function of the frequency. FFT can be performed on a curve to extract the characteristic frequencies.</para>
   35 <para>Let's assume you have the signal presented in the next figure. You can select the &fft-on-curves-lnk; of the &analysis-plots-menu-lnk; to open the FFT dialog box.</para>
   36 
   37 <figure id="fig-exemple-fft-1">
   38   <title>A signal and the FFT dialog box for a plot.</title>
   39   <mediaobject> 
   40     <imageobject>
   41       <imagedata  format="PNG" fileref="pics/exemple-fft-1.png"/>
   42     </imageobject>
   43   </mediaobject>
   44 </figure>
   45 
   46 <para>If the <emphasis>Normalize Amplitude</emphasis> check box is on, the amplitude curve is normalized to 1. If the <emphasis>Shift Results</emphasis> check box is on, the frequencies are shifted in order to obtain a centered x-scale. By default, the <emphasis>Sampling Interval</emphasis> corresponds to the interval between X-values. Giving a smaller value makes no sense, but you can increase this value in order to sample less values.</para>
   47 <para>&appname; will create a new plot window with the FFT amplitude curve, and a new table which contains the real part, the imaginary part, the amplitude, and the angle of the FFT. In this example, the amplitude curve has been normalized, and the frequencies have been shifted to obtain a centered x-scale.</para>
   48 
   49 <figure id="fig-exemple-fft-2">
   50   <title>The resulting FFT with the characteristic frequencies.</title>
   51   <mediaobject> 
   52     <imageobject>
   53       <imagedata  format="PNG" fileref="pics/exemple-fft-2.png"/>
   54     </imageobject>
   55   </mediaobject>
   56 </figure>
   57 
   58 
   59 <para>In the case of a table, you must select the sampling column (X-values) and one columns (for real numbers) or two columns (for complex numbers) for Y-values.</para>
   60 
   61 <figure id="fig-exemple-fft-3">
   62   <title>The &fft-on-tables-cmd; dialog box for a table.</title>
   63   <mediaobject> 
   64     <imageobject>
   65       <imagedata  format="PNG" fileref="pics/exemple-fft-3.png"/>
   66     </imageobject>
   67   </mediaobject>
   68 </figure>
   69 
   70 </sect1>
   71 
   72 <!--
   73 *******************************************************************************
   74 
   75             Filtering of data and curves
   76 
   77 *******************************************************************************
   78 -->
   79 <sect1 id="sec-filtering">
   80 <title>Filtering of data curves</title>
   81 <indexterm><primary>Filtering</primary><see>Curve analysis</see></indexterm>
   82 <indexterm><primary>Curve analysis</primary><secondary>Curve filtering</secondary></indexterm>
   83 
   84 <para>In this section, it will be assumed that you have the signal presented in the previous section (see figure <xref linkend="fig-exemple-fft-1"/>). We can analyze this signal by doing a FFT on the data curve and it will show that this signal has a power spectrum with high and low frequencies (see figure <xref linkend="fig-exemple-fft-2"/>). The newt sections will show the influence of the different filters on this data curve.</para>
   85 
   86 <sect2 id="sec-fft-filter-low">
   87 <title>FFT low pass filter</title>
   88 <indexterm><primary>Curve analysis</primary><secondary>Curve filtering</secondary><tertiary>Low pass FFT</tertiary></indexterm>
   89 
   90 <para>This filter allows to cut the high frequencies of a signal. You just have to select the cut-off frequency of the filter. Let us assume that we want to keep the frequencies below 1.5 Hz, we will obtain:</para>
   91   <figure id="fig-filter-fft-low-signal">
   92   <title>Signal after a FFT low pass filter</title>
   93     <mediaobject> 
   94       <imageobject>
   95         <imagedata  format="PNG" fileref="pics/filter-fft-low-signal.png"/>
   96       </imageobject>
   97     </mediaobject>
   98   </figure>
   99   <para>The power spectrum of this new signal shows that the frequencies below 1.5 Hz have been kept.</para>
  100   <informalfigure id="fig-filter-fft-low-power">
  101     <mediaobject> 
  102       <imageobject>
  103         <imagedata  format="PNG" fileref="pics/filter-fft-low-power.png"/>
  104       </imageobject>
  105     </mediaobject>
  106   </informalfigure>
  107 </sect2>
  108 
  109 <sect2 id="sec-fft-filter-high">
  110 <title>FFT high pass filter</title>
  111 <indexterm><primary>Curve analysis</primary><secondary>Curve filtering</secondary><tertiary>High pass FFT</tertiary></indexterm>
  112 
  113 <para>This filter allows to cut the low frequencies of a signal. You just have to select the cut-off frequency of the filter. Let us assume that we want to keep the frequencies above 1.5 Hz, we will obtain:</para>
  114   <figure id="fig-filter-fft-high-signal">
  115   <title>Signal after a FFT high pass filter</title>
  116     <mediaobject> 
  117       <imageobject>
  118         <imagedata  format="PNG" fileref="pics/filter-fft-high-signal.png"/>
  119       </imageobject>
  120     </mediaobject>
  121   </figure>
  122   <para>The power spectrum of this new signal shows that the frequencies above 1 Hz have been kept.</para>
  123   <informalfigure id="fig-filter-fft-high-power">
  124     <mediaobject> 
  125       <imageobject>
  126         <imagedata  format="PNG" fileref="pics/filter-fft-high-power.png"/>
  127       </imageobject>
  128     </mediaobject>
  129   </informalfigure>
  130 </sect2>
  131 
  132 <sect2 id="sec-fft-filter-band">
  133 <title>FFT band pass filter</title>
  134 <indexterm><primary>Curve analysis</primary><secondary>Curve filtering</secondary><tertiary>Band pass FFT</tertiary></indexterm>
  135 
  136 <para>This filter allows to cut the low and high frequencies of a signal. You just have to select the high and low cut-off frequencies of the filter. Let us assume that we want to keep the frequencies between 1.5 and 3.5 Hz, we will obtain:</para>
  137   <figure id="fig-filter-fft-band-signal">
  138   <title>Signal after a FFT band pass filter</title>
  139     <mediaobject> 
  140       <imageobject>
  141         <imagedata  format="PNG" fileref="pics/filter-fft-band-signal.png"/>
  142       </imageobject>
  143     </mediaobject>
  144   </figure>
  145   <para>The power spectrum of this new signal shows that only the frequencies at 1.5 and 3.5 Hz have been kept.</para>
  146   <informalfigure id="fig-filter-fft-band-power">
  147     <mediaobject> 
  148       <imageobject>
  149         <imagedata  format="PNG" fileref="pics/filter-fft-band-power.png"/>
  150       </imageobject>
  151     </mediaobject>
  152   </informalfigure>
  153 </sect2>
  154 
  155 <sect2 id="sec-fft-filter-block">
  156 <title>FFT block band filter</title>
  157 <indexterm><primary>Curve analysis</primary><secondary>Curve filtering</secondary><tertiary>Block pass FFT</tertiary></indexterm>
  158 
  159 <para>This filter allows to keep the low and high frequencies of a signal. You just have to select the high and low cut-off frequencies of the filter. Let us assume that we want to remove the frequencies between 1.5 and 3.5 Hz, we will obtain:</para>
  160   <figure id="fig-filter-fft-block-signal">
  161   <title>Signal after a FFT block band filter</title>
  162     <mediaobject> 
  163       <imageobject>
  164         <imagedata  format="PNG" fileref="pics/filter-fft-block-signal.png"/>
  165       </imageobject>
  166     </mediaobject>
  167   </figure>
  168   <para>The power spectrum of this new signal shows that only the frequencies below 1.5 Hz and above 3.5 Hz have been kept.</para>
  169   <informalfigure id="fig-filter-fft-block-power">
  170     <mediaobject> 
  171       <imageobject>
  172         <imagedata  format="PNG" fileref="pics/filter-fft-block-power.png"/>
  173       </imageobject>
  174     </mediaobject>
  175   </informalfigure>
  176 </sect2>
  177 </sect1>
  178 
  179 <!--
  180 *************************************************************************
  181 
  182         Correlation and autocorrelation
  183 
  184 *************************************************************************
  185 -->
  186 <sect1 id="sec-correlate">
  187 <title>Correlation and autocorrelation</title>
  188 
  189 <indexterm><primary>Table analysis</primary><secondary>Correlation function</secondary></indexterm>
  190 
  191 <para>This function can be accessed by the &correlate-lnk; of the &analysis-tables-menu-lnk; when a table is selected. The correlation function, also known as the covariance function is used to test the similarity of two signals <emphasis>x(t)</emphasis> and <emphasis>y(t)</emphasis>. It is computed by:</para>
  192 
  193 <equation> 
  194     <title></title>
  195   <mediaobject>
  196     <imageobject>
  197       <imagedata format="PNG" fileref="equations/equation_covariance.png"/>
  198     </imageobject>
  199   </mediaobject>
  200 </equation>
  201 
  202 <para>in which <inlineequation><graphic fileref="equations/equation_x-m.png"/></inlineequation> and <inlineequation><graphic fileref="equations/equation_y-m.png"/></inlineequation> are the mean values of the signals <emphasis>x(t)</emphasis> and <emphasis>y(t)</emphasis> respectively. If the number of points is <emphasis>N</emphasis>, the function will be computed between <emphasis>-N/2</emphasis> and <emphasis>N/2</emphasis>. The abscissas are therefore point numbers and not <emphasis>t</emphasis> values.</para>
  203 <para>To perform a cross correlation between two signal, they must be in the same table and use the same abscissa. You just have to select the two columns in the table, and select the  &correlate-lnk; from the &analysis-tables-menu-lnk;. A plot will be created and the values of the correlation function will be added as two new columns in the table.</para>
  204 
  205 <figure id="fig-exemple-correlation-1">
  206   <title>An example of a correlation between two functions: the two signals.</title>
  207   <mediaobject> 
  208     <imageobject>
  209       <imagedata  format="PNG" fileref="pics/exemple-correlation-1.png"/>
  210     </imageobject>
  211   </mediaobject>
  212 </figure>
  213 
  214 <figure id="fig-exemple-correlation-2">
  215   <title>An example of a correlation between two functions: the correlation function.</title>
  216   <mediaobject> 
  217     <imageobject>
  218       <imagedata  format="PNG" fileref="pics/exemple-correlation-2.png"/>
  219     </imageobject>
  220   </mediaobject>
  221 </figure>
  222 
  223 <para>The correlation of a signal with itself can also be used in spectral analysis (it is then called autocorrelation or autocovariance function). This operation can be performed by selecting one column in a table and use the &autocorrelate-lnk; from the &analysis-tables-menu-lnk;.</para>
  224 
  225 </sect1>
  226 <!--
  227 *************************************************************************
  228 
  229                 Convolution
  230 
  231 *************************************************************************
  232         TODO, I don't understand the results...
  233 -->
  234 <sect1 id="sec-convolute">
  235 <title>Convolution of functions</title>
  236 <indexterm><primary>Table analysis</primary><secondary>Convolution</secondary></indexterm>
  237 
  238 <para>This function can be accessed by the &convolute-lnk; of the &analysis-tables-menu-lnk; when a table is selected. The convolution of two functions <emphasis>f<subscript>1</subscript>(x)</emphasis> and <emphasis>f<subscript>2</subscript>(x)</emphasis> is the function defined  by:</para>
  239 
  240 <!-- TODO
  241 <equation> 
  242   <mediaobject>
  243     <imageobject>
  244       <imagedata format="PNG" fileref="equations/equation_convolution.png"/>
  245     </imageobject>
  246   </mediaobject>
  247 </equation>
  248 -->
  249 
  250 <para><emphasis>f<subscript>1</subscript>(x)</emphasis> is the signal and <emphasis>f<subscript>2</subscript>(x)</emphasis> is the transfer function.</para>
  251 
  252 </sect1>
  253 <!--
  254 *************************************************************************
  255 
  256                 Deconvolution
  257 
  258 *************************************************************************
  259         TODO...
  260 -->
  261 <sect1 id="sec-deconvolute">
  262 <title>Deconvolution</title>
  263 <indexterm><primary>Table analysis</primary><secondary>Deconvolution</secondary></indexterm>
  264 
  265 <para>This function can be accessed by the &deconvolute-lnk; of the &analysis-tables-menu-lnk; when a table is selected. The deconvolution is the inverse of convolution, that is finding the function <emphasis>f<subscript>1</subscript>(x)</emphasis> which is the solution of the equation <emphasis>f<subscript>1</subscript>*f<subscript>2</subscript>=g</emphasis>.</para>
  266 
  267 </sect1>
  268 <!--
  269 *************************************************************************
  270 
  271             Fitting of data and curves
  272 
  273 *************************************************************************
  274 -->
  275 <sect1 id="sec-fitting">
  276 <title>Fitting of data and curves</title>
  277 
  278 <para>Fitting can be done in two ways:</para>
  279 <itemizedlist>
  280   <listitem>
  281     <para>A general <emphasis>Fit Wizard</emphasis> which allows to use complex functions and to adjust the fitting parameters.</para>
  282   </listitem>
  283   <listitem>
  284     <para>A set of simplified fitting dialog boxes for most used functions like exponential growth or decay, etc.</para>
  285   </listitem>
  286 </itemizedlist>
  287 <!--
  288             General non linear fit
  289 -->
  290 <sect2 id="sec-non-linear-curve-fit">
  291 <title>Non Linear Curve Fit</title>
  292 
  293 <indexterm><primary>Curve analysis</primary><secondary>Curve fitting</secondary><tertiary>Non linear function</tertiary></indexterm>
  294 
  295 <para>This function can be accessed by the &fit-wizard-plot-lnk; of the &analysis-plots-menu-lnk; when a plot is selected, or the &analysis-tables-menu-lnk; when aa table window is selected. In the latter case, this command first creates a new plot window using the list of selected columns in the table.</para>
  296 <para>This Command is used to fit discrete data points with a mathematical function. The fitting is done by minimizing the least square difference between the data points and the Y values of the function.</para>
  297 
  298 <sidebar>
  299   <title>Note:</title>
  300   <para>If the data points are modified, the fit is not re-calculated. Then, you need to remove the old fitted curve and to redo the fit with the same function and the new points.</para>
  301 </sidebar>
  302 
  303 <para>The top of the dialog box is used to choose a function among the one which are already define. Four types of functions are available: the user defined functions which have been saved, the classical functions proposed by &appname; in the analysis menu, the simple elementary built-in functions, and external functions via pluggins.</para>
  304 <para>To choose one of these functions, you just have to select it and to click on the checkbox under the selector.</para>
  305 <para>If you want to define your own function, you can use the bottom half of the dialog box. You can write you own mathematical expression or add expressions obtained with the function selector. Then you need to define the parameters which have to be fitted in a comma separated list.</para>
  306 
  307 <figure id="fig-non-linear-curve-fit-1">
  308   <title>The first step of the &fit-wizard-plot-cmd; dialog box.</title>
  309   <mediaobject> 
  310     <imageobject>
  311       <imagedata  format="PNG" fileref="pics/fit-dialog1.png"/>
  312     </imageobject>
  313   </mediaobject>
  314 </figure>
  315 
  316 <para>The second step is to define the parameters for the fit. You have to give initial guess for the fitting parameters.</para>
  317 
  318 <figure id="fig-non-linear-curve-fit-2">
  319   <title>The second step of the &fit-wizard-plot-cmd; dialog box.</title>
  320   <mediaobject> 
  321     <imageobject>
  322       <imagedata  format="PNG" fileref="pics/fit-dialog2.png"/>
  323     </imageobject>
  324   </mediaobject>
  325 </figure>
  326 
  327 <para> In this second tab you can also choose a weighting method for your fit (the default is <emphasis>No weighting</emphasis>). The available weighting methods are:</para>
  328 <orderedlist>
  329   <listitem>
  330     <para><emphasis>Instrumental</emphasis>: the values of the associated error bars are used as weighting coefficients. You must add Y-error bars to the analyzed curve before performing the fit.</para>
  331   </listitem>
  332   <listitem>
  333     <para><emphasis>Statistical</emphasis>: the weighting coefficients are calculated as the square-roots of each data point in the fitted curve.</para>
  334   </listitem>
  335   <listitem>
  336     <para><emphasis>Arbitrary Dataset</emphasis>: you have the possibility to set the weighting coefficients using an arbitrary data set. The column used for the weighting must have a number of rows equal to the number of points in the fitted curve. </para>
  337   </listitem>
  338 </orderedlist>
  339 
  340 <para>After the fit, the log window is opened to show the results of the fitting process.</para>
  341 <para>Depending on the settings in the <emphasis>Custom Output</emphasis> tab, a function curve (option <emphasis>Uniform X Function</emphasis>) or a new table (if you choose the option <emphasis>Same X as Fitting Data</emphasis>) will be created for each fit. The new table includes all the X and Y values used to compute and to plot the fitted function and is hidden by default, but it can be found and viewed with the <link linkend="project-explorer-cmd">project explorer</link>.</para>
  342 
  343 <figure id="fig-non-linear-curve-fit-3">
  344   <title>The results of the &fit-wizard-plot-cmd;.</title>
  345   <informalexample>
  346     <para>The results are shown in the log window, the curve is plotted in the active window, and a table is created to store the fit.</para>
  347   </informalexample>
  348   <mediaobject> 
  349     <imageobject>
  350       <imagedata  format="PNG"  fileref="pics/fit-dialog3.png"/>
  351     </imageobject>
  352   </mediaobject>
  353 </figure>
  354 
  355 </sect2>
  356 <!--
  357             Fitting to specific functions
  358 -->
  359 <sect2 id="sec-ajustements-specifiques">
  360 <title>Fitting to specific curves</title>
  361 
  362 <para>&appname; include quick access to the most usefull functions for fitting. Beware that when you use these commands, &appname; uses default values as initial guesses for the parameters. Therefore, the convergence may be difficult or even impossible if these initial values are too far from the final values. In this case, you can use the &fit-wizard-table-lnk; or the &fit-wizard-plot-lnk;, select the function in the <emphasis>built-in</emphasis> set and give good initial values for parameters.</para>
  363 
  364 <sect3 id="sec-fit-linear">
  365 
  366   <title>Fitting to a line</title>
  367   <indexterm><primary>Curve analysis</primary><secondary>Curve fitting</secondary><tertiary>line</tertiary></indexterm>
  368 
  369   <para>This command is used to fit a curve which has a linear shape. The results will be given in the <link linkend="sec-intro-log-window">Log panel</link>.</para>
  370 
  371   <figure id="fig-fit-linear">
  372     <title>The results of a &fit-linear-cmd;.</title>
  373     <mediaobject> 
  374       <imageobject>
  375         <imagedata  format="PNG" fileref="pics/fit-linear.png"/>
  376       </imageobject>
  377     </mediaobject>
  378   </figure>
  379 
  380 </sect3>
  381 
  382 <sect3 id="sec-fit-polynomial">
  383 
  384   <title>Fitting to a polynomial</title>
  385   <indexterm><primary>Curve analysis</primary><secondary>Curve fitting</secondary><tertiary>Polynomial</tertiary></indexterm>
  386 
  387   <para>This command is used to fit a curve which has a linear shape. The results will be given in the <link linkend="sec-intro-log-window">Log panel</link></para>
  388 
  389   <informalfigure id="fig-fit-polynomial-dialog">
  390     <mediaobject> 
  391       <imageobject>
  392         <imagedata  format="PNG" fileref="pics/fit-polynomial.png"/>
  393       </imageobject>
  394     </mediaobject>
  395   </informalfigure>
  396 
  397 </sect3>
  398 
  399 
  400 <sect3 id="sec-fit-bolzmann">
  401 <title>Fitting to a Bolzmann function</title>
  402 <indexterm><primary>Curve analysis</primary><secondary>Curve fitting</secondary><tertiary>Bolzmann function</tertiary></indexterm>
  403 
  404 <para>This command is used to fit a curve which has a sigmoidal shape. The function used is:</para>
  405 
  406 <equation> 
  407   <title>Bolzmann equation</title>
  408   <mediaobject>
  409     <imageobject>
  410       <imagedata  format="PNG" fileref="equations/equation_bolzmann.png"/>
  411     </imageobject>
  412   </mediaobject>
  413 </equation>
  414 
  415 <para>in which A<subscript>2</subscript> is the high Y limit, A<subscript>1</subscript> is the low Y limit, x<subscript>0</subscript> is the inflexion point and dx is the width.</para>
  416 
  417   <figure id="fig-fit-bolzman">
  418     <title>The results of a &fit-bolzmann-cmd;.</title>
  419     <mediaobject> 
  420       <imageobject>
  421         <imagedata  format="PNG" fileref="pics/fit-sigmoidal.png"/>
  422       </imageobject>
  423     </mediaobject>
  424   </figure>
  425 
  426 </sect3>
  427 
  428 <sect3 id="sec-fit-gaussian">
  429 <title>Fitting to a Gauss function</title>
  430 <indexterm><primary>Curve analysis</primary><secondary>Curve fitting</secondary><tertiary>Gaussian function</tertiary></indexterm>
  431 
  432 <para>This command is used to fit a curve which has a bell shape. The function used is:</para>
  433 
  434 <equation> 
  435   <title>Gauss equation</title>
  436   <mediaobject>
  437     <imageobject>
  438       <imagedata  format="PNG" fileref="equations/equation_gauss.png"/>
  439     </imageobject>
  440   </mediaobject>
  441 </equation>
  442 
  443 <para>in which A is the height, w is the width, x<subscript>c</subscript> is the center and y<subscript>0</subscript> is the Y-values offset.</para>
  444 
  445   <figure id="fig-fit-gauss">
  446     <title>The results of a &fit-gaussian-cmd;.</title>
  447     <mediaobject> 
  448       <imageobject>
  449         <imagedata  format="PNG" fileref="pics/fit-gaussian.png"/>
  450       </imageobject>
  451    </mediaobject>
  452   </figure>
  453 
  454 </sect3>
  455 
  456 <sect3 id="sec-fit-lorentzian">
  457 <title>Fitting to a Lorentz function</title>
  458 <indexterm><primary>Curve analysis</primary><secondary>Curve fitting</secondary><tertiary>Lorentz function</tertiary></indexterm>
  459 
  460 <para>This command is used to fit a curve which has a bell shape. The function used is:</para>
  461 
  462 <equation> 
  463   <title>Lorentz equation</title>
  464   <mediaobject>
  465     <imageobject>
  466       <imagedata  format="PNG" fileref="equations/equation_lorentz.png"/>
  467     </imageobject>
  468   </mediaobject>
  469 </equation>
  470 
  471 <para>in which A is the area, w is the width, x<subscript>c</subscript> is the center and y<subscript>0</subscript> is the Y-values offset.</para>
  472 
  473   <figure id="fig-fit-lorentz">
  474     <title>The results of a &fit-lorentzian-cmd;.</title>
  475     <mediaobject> 
  476       <imageobject>
  477         <imagedata  format="PNG" fileref="pics/fit-lorentzian.png"/>
  478       </imageobject>
  479     </mediaobject>
  480   </figure>
  481 
  482 </sect3>
  483 
  484 </sect2>
  485 
  486 <sect2 id="sec-fit-multipeak">
  487 <title>Multi-Peaks fitting</title>
  488 <indexterm><primary>Curve analysis</primary><secondary>Curve fitting</secondary><tertiary>Multi peak</tertiary></indexterm>
  489 
  490 <para>This kind of fitting allows to fit your data points to a sum of N Gaussian or Lorentzian functions. The first step is to specify the number of peaks. Then you must define the position of each peak on the curve. This is done by selecting one data point on the plot, then validate your choice for each peak with the <emphasis>ENTER</emphasis> key.</para>
  491   <figure id="fig-fit-multipeak">
  492     <title>The selection of the position of the peaks.</title>
  493     <mediaobject> 
  494       <imageobject>
  495         <imagedata  format="PNG" fileref="pics/fit-multipeak-1.png"/>
  496       </imageobject>
  497     </mediaobject>
  498   </figure>
  499 <para>Then, the fitting is done in the same way as for the other quick-fit commands. For the position of the data points used for the selection of the position of the peaks are just initial guesses for the fitting.</para>
  500   <figure id="fig-fit-multipeak-result">
  501     <title>The results of a &fit-multipeak-gaussian-cmd;.</title>
  502     <mediaobject> 
  503       <imageobject>
  504         <imagedata  format="PNG" fileref="pics/fit-multipeak-2.png"/>
  505       </imageobject>
  506     </mediaobject>
  507   </figure>
  508 <para>As for the other quick-fit commands, if you want to fit with a sum of more complex curves (e.g. a combination of lorentzian and gaussian functions), use the <link linkend="sec-non-linear-curve-fit">Fit Wizard</link>.</para>
  509   
  510 </sect2>
  511 
  512 <sect2 id="sec-default-parameters-fitting">
  513 <title>Changing default parameters for fitting</title>
  514 
  515 <para>This dialog can be accessed by the &preferences-lnk; of the &edit-menu-lnk;. It allows to modify the way the fitted curves are drawn on the plots and some options for the presentation of the fitted values. If you want to modify some parameters related to the fitting itself, like the tolerance, you have to do it in the <link linkend="sec-non-linear-curve-fit">Fit Wizard</link>.</para>
  516 
  517  <figure id="fig-fit-preference">
  518     <title>The preference dialog for fitting.</title>
  519     <mediaobject> 
  520       <imageobject>
  521         <imagedata  format="PNG" fileref="pics/preferences-dialog5.png"/>
  522       </imageobject>
  523     </mediaobject>
  524   </figure>
  525 
  526 </sect2>
  527 
  528 </sect1>
  529 
  530 <sect1 id="sec-interpolate">
  531 <title>Interpolation</title>
  532 <indexterm><primary>Curve analysis</primary><secondary>interpolation</secondary></indexterm>
  533 
  534 <para>The interpolation command will create a new data curve with a high number of points by interpolation of your data. The dialog box allows to define this number of points (default value = 1000). Then the method used for interpolation, the interval of X-values and the color of the interpolated curve can be chosen. In addition to the new curve in the active plot, a new table will be created.</para>
  535   <informalfigure id="fig-interpolate-dialog-b">
  536     <mediaobject> 
  537       <imageobject>
  538         <imagedata  format="PNG" fileref="pics/interpolate-1.png"/>
  539       </imageobject>
  540     </mediaobject>
  541   </informalfigure>
  542 <para>The simplest interpolation method is the <emphasis>linear</emphasis> method. In this case, a linear variation is used to compute the data points between two values. The <emphasis>cubic</emphasis> method will use the Cubic Splines method (in this case at least 4 points are needed). The last method <emphasis>Akima</emphasis> is a polynomial interpolation. You can refer to the corresponding section of the <ulink url="http://www.gnu.org/software/gsl/manual/html_node/Interpolation.html#Interpolation">GNU Scientific Library</ulink> for more details.</para>
  543   <figure id="fig-interpolate-methods">
  544   <title>Comparison of the three methods of interpolation</title>
  545     <mediaobject> 
  546       <imageobject>
  547         <imagedata  format="PNG" fileref="pics/interpolate-2.png"/>
  548       </imageobject>
  549     </mediaobject>
  550   </figure>
  551 </sect1>
  552