|
DDASToys for NSCLDAQ
6.2-000
|
Implementation of analytic fitting functions we use in GSL's LM fitter. More...
#include "lmfit_analytic.h"#include <algorithm>#include <stdexcept>#include <gsl/gsl_rng.h>#include <gsl/gsl_blas.h>#include <gsl/gsl_fit.h>#include <gsl/gsl_multimin.h>#include <gsl/gsl_multifit_nlin.h>#include "functions_analytic.h"#include "jacobian_analytic.h"
Functions | |
| double | estimateK1 (int xmax, double C0, const std::vector< uint16_t > &trace) |
| Estimate a value for the steepness parameter of the rising side of the pulse. More... | |
Implementation of analytic fitting functions we use in GSL's LM fitter.
| double estimateK1 | ( | int | xmax, |
| double | C0, | ||
| const std::vector< uint16_t > & | trace | ||
| ) |
Estimate a value for the steepness parameter of the rising side of the pulse.
| xmax | Where the maximum point is. |
| C0 | Estimate for the constant offset. |
| trace | The trace data. |
We approximate xmax as 0.9 of maximum and use that ln(9)/(xmax - xhalf) gives k where xhalf is the position of 1/2 height. If we can't find xhalf then we fall back on a guess of 0.1.