sablib
Loading...
Searching...
No Matches
spline.cpp File Reference

Baseline estimation from cubic spline(implementation). More...

#include "../misc/cubic_spline.h"
#include "spline.h"

Go to the source code of this file.

Functions

const BaselineResult sablib::BaselineSpline (const std::vector< double > &y, const std::vector< unsigned int > &indices)
 Performs baseline estimation using cubic spline interpolation.

Detailed Description

Baseline estimation from cubic spline(implementation).

Author
Izadori

Definition in file spline.cpp.

Function Documentation

◆ BaselineSpline()

SABLIB_EXPORT const BaselineResult sablib::BaselineSpline ( const std::vector< double > & y,
const std::vector< unsigned int > & indices )

Performs baseline estimation using cubic spline interpolation.

Parameters
yThe input data for baseline estimation.
indicesThe indices of the points to be used as knots for the cubic spline.
Returns
The estimated baseline and baseline-corrected data.
Exceptions
std::invalid_argumentOne or more parameters are wrong.

Definition at line 16 of file spline.cpp.

References sablib::BaselineResult::baseline, sablib::BaselineResult::corrected, and sablib::CubicSpline< Scalar >::Interpolate().