Main Page | Data Structures | File List | Data Fields | Globals

calibrate.c File Reference


Detailed Description

Author:
Hal Finkel
Calibration and fitting functions

#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 calibrate.c:

Include dependency graph

Data Structures

struct  cal_fit_info
 Data to which the calibration curve is fit. More...

Defines

#define MAXITER   1000
 The maximum number of fitting iterations.
#define MAXFLEX   6
 The maximum number of channels by which a peak location can vary from the fit.

Functions

int pf_calibrate (struct pf_data *d, struct pf_cal_fit *f, char *fn)
 Calibrate input using known data points.
double pf_calfunc (struct pf_cal_fit *f, double ch)
 Evaluate the calibration fit function for a given peak.

Define Documentation

#define MAXFLEX   6
 

The maximum number of channels by which a peak location can vary from the fit.

#define MAXITER   1000
 

The maximum number of fitting iterations.


Function Documentation

double pf_calfunc struct pf_cal_fit f,
double  ch
 

Evaluate the calibration fit function for a given peak.

Parameters:
[in] f The calibration fit
[in] ch The value at which to evaluate the function
Returns:
The value of the function

int pf_calibrate struct pf_data d,
struct pf_cal_fit f,
char *  fn
 

Calibrate input using known data points.

Parameters:
[in] d The data set
[out] f The calibration fit
[in] fn The file containing the calibration points
Returns:
Boolean success flag


Generated on Sun Feb 20 17:46:16 2005 for peakfinder-0.1 by  doxygen 1.3.9.1