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

Baseline estimation using Statistics-sensitive Non-linear Iterative Peak-clipping(SNIP)(implementation). More...

#include <algorithm>
#include <cmath>
#include <Eigen/Eigen>
#include "snip.h"

Go to the source code of this file.

Functions

const std::vector< double > sablib::BaselineSnip (const std::vector< double > &y, const unsigned int m, const bool decreasing=true, const SnipPreprocess preprocess=SnipPreprocess::None, const unsigned int loop=1)
 Performs baseline estimation using the Statistics-sensitive Non-linear Iterative Peak-clipping (SNIP) algorithm.

Detailed Description

Baseline estimation using Statistics-sensitive Non-linear Iterative Peak-clipping(SNIP)(implementation).

Author
Izadori

Definition in file snip.cpp.

Function Documentation

◆ BaselineSnip()

const std::vector< double > sablib::BaselineSnip ( const std::vector< double > & y,
const unsigned int m,
const bool decreasing = true,
const SnipPreprocess preprocess = SnipPreprocess::None,
const unsigned int loop = 1 )

Performs baseline estimation using the Statistics-sensitive Non-linear Iterative Peak-clipping (SNIP) algorithm.

Parameters
yThe input data vector (signal to be processed).
mThe maximum half-window size (maximum clipping distance).
decreasingIf true, iterates from m down to 1 (recommended). If false, iterates from 1 up to m.
preprocessThe preprocessing transformation to apply before clipping (None, LL, or LLS).
loopThe number of times to repeat the entire SNIP process (usually 1 is sufficient).
Returns
A vector of the estimated baseline.
Exceptions
std::invalid_argumentOne or more parameters are wrong.

Definition at line 17 of file snip.cpp.