|
NSCL DDAS
1.0
Support for XIA DDAS at the NSCL
|
: Contains the functions needed to drive GSL's Levenberg Marquart fitter. More...
#include "functions.h"#include "lmfit.h"#include <gsl/gsl_rng.h>#include <gsl/gsl_blas.h>#include <gsl/gsl_vector.h>#include <gsl/gsl_fit.h>#include <gsl/gsl_multimin.h>#include <gsl/gsl_multifit_nlin.h>#include <algorithm>#include <stdexcept>Functions | |
| double | DDAS_FALLBACK_K1 (0.1) |
| double | DDAS_FALLBACK_K2 (0.1) |
| int | SINGLE_MAXITERATIONS (50) |
| int | DOUBLE_MAXITERATIONS (50) |
| double | estimateK1 (int xmax, double C0, const std::vector< uint16_t > &trace) |
: Contains the functions needed to drive GSL's Levenberg Marquart fitter.
| double estimateK1 | ( | int | xmax, |
| double | C0, | ||
| const std::vector< uint16_t > & | trace | ||
| ) |
estimateK1 Estimate a value for the steepness parameter of the rising side of the pulse. We approximate xmax as 0.9 of maximum and use that ln(9)/(xmax - x0.5) gives k where x0.5 is the position of 1/2 height.
If we can't find x0.5 then we fall back on a guess of 0.1
| xmax | - where the maximum point is. |
| C0 | - Estimate for the constant offset. |
| trace | - The trace data. |
1.8.8