Go to the documentation of this file.
36 #include <gsl/gsl_bspline.h>
37 #include <gsl/gsl_multifit.h>
39 #ifndef DOXYGEN_NO_O2NS
99 void set_x(
const gsl_vector *ix) {
106 int smooth_data(
const gsl_vector *y,
const gsl_vector *e, gsl_vector *ys);
110 int smooth_data(
const gsl_vector *y, gsl_vector *ys);
127 gsl_bspline_workspace *
bw;
136 gsl_multifit_linear_workspace *
mw;
148 int fit(
const gsl_vector *y);
151 int fit_errors(
const gsl_vector *y,
const gsl_vector *e);
173 #ifndef DOXYGEN_NO_O2NS
gsl_vector * B
Spline temporary vector.
gsl_matrix * cov
Covariance matrix.
gsl_vector * c
Parameters of linear fit, y=X*c.
int smooth_data(const gsl_vector *y, const gsl_vector *e, gsl_vector *ys)
Smooth data in y with errors e returning result ys.
size_t nbreak
internally calculated, number of "segment" to split the data into
The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
const gsl_vector * x
Values of the independent variable.
void set_ncoeff(int incoeffs)
Set the number of coefficients.
double calc_for_x(double xi)
calculate smoothed curve value for a certain xi
Smooth a GSL vector using GSL bsplines.
void set_x(const gsl_vector *ix)
Set the x-values.
smooth_gsl(const gsl_vector *ix)
Begin using x-values from vector ix.
void set_pars(int incoeffs, int order)
Set parameters.
int fit(const gsl_vector *y)
Construct un-weighted fit.
gsl_multifit_linear_workspace * mw
Linear fit workspace.
int init()
Allocate memory and initialize splines.
gsl_matrix * X
Workspace for spline fitting.
int fit_errors(const gsl_vector *y, const gsl_vector *e)
Construct weighted fit.
bool x_set
True of the x values have been set.
gsl_bspline_workspace * bw
Spline workspace.
void set_order(int order)
Set order.
size_t ncoeffs
Number of free coefficients for spline.
void init_pointers_and_defs()
Set default values and zero pointers.
size_t norder
Order of spline to be used (4=cubic)
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).