#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <gsl/gsl_statistics.h>
#include <gsl/gsl_fit.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_multifit_nlin.h>
#include "common.h"
Include dependency graph for peakfit.c:

Data Structures | |
| struct | bg_poly_data |
| Data on the background for fitting. More... | |
| struct | peak_pearson7_data |
| Data on a peak for fitting. More... | |
Defines | |
| #define | MAXITER 100000 |
| The maximum number of iterations for fitting peaks and background. | |
| #define | MINBGPTS 3 |
| Mininum number of background points per side. | |
| #define | BGWIDTH 2 |
| The number of peak widths to look for background if possible. | |
| #define | SEARCHSTEP 0.1 |
| Search step for peak bounds. | |
Functions | |
| void | pf_prunepeaks (struct pf_data *d) |
| Prune peaks without reasonable fits. | |
| void | pf_fitpeaks (struct pf_data *d) |
| Fit peaks in the data set. | |
| double | pf_bgfunc (struct pf_data *d, int peak, double x) |
| Evaluate the background function for a given peak. | |
| double | pf_peakfunc (struct pf_data *d, int peak, double x) |
| Evaluate the peak fit function for a given peak. | |
| double | pf_fitfunc (struct pf_data *d, int peak, double x) |
| Evaluate the total fit function for a given peak. | |
|
|
The number of peak widths to look for background if possible.
|
|
|
The maximum number of iterations for fitting peaks and background.
|
|
|
Mininum number of background points per side. Total from both sides needs to be at least the number of fit parameters |
|
|
Search step for peak bounds.
|
|
||||||||||||||||
|
Evaluate the background function for a given peak.
|
|
||||||||||||||||
|
Evaluate the total fit function for a given peak.
|
Here is the call graph for this function:

|
|
Fit peaks in the data set.
|
|
||||||||||||||||
|
Evaluate the peak fit function for a given peak.
|
|
|
Prune peaks without reasonable fits.
|
1.3.9.1