libpappsomspp
Library for mass spectrometry
pappso::SavGolParams Struct Reference

Parameters for the Savitzky-Golay filter. More...

#include <savgolfilter.h>

Public Member Functions

 SavGolParams ()
 
 SavGolParams (const SavGolParams &other)
 
 SavGolParams (int nLParam, int nRParam, int mParam, int lDParam, bool convolveWithNrParam)
 
void initialize (int nLParam, int nRParam, int mParam, int lDParam, bool convolveWithNrParam)
 
void initialize (const SavGolParams &other)
 

Public Attributes

int nL = 15
 number of data points on the left of the filtered point More...
 
int nR = 15
 number of data points on the right of the filtered point More...
 
int m = 4
 
int lD = 0
 
bool convolveWithNr = false
 set to false for best results More...
 

Detailed Description

Parameters for the Savitzky-Golay filter.

Definition at line 48 of file savgolfilter.h.

Constructor & Destructor Documentation

◆ SavGolParams() [1/3]

pappso::SavGolParams::SavGolParams ( )
inline

Definition at line 63 of file savgolfilter.h.

63 {};

◆ SavGolParams() [2/3]

pappso::SavGolParams::SavGolParams ( const SavGolParams other)
inline

Definition at line 65 of file savgolfilter.h.

66  : nL{other.nL},
67  nR{other.nR},
68  m{other.m},
69  lD{other.lD},
70  convolveWithNr{other.convolveWithNr}
71  {
72  }

References nL.

◆ SavGolParams() [3/3]

pappso::SavGolParams::SavGolParams ( int  nLParam,
int  nRParam,
int  mParam,
int  lDParam,
bool  convolveWithNrParam 
)
inline

Definition at line 74 of file savgolfilter.h.

76  {
77  nL = nLParam;
78  nR = nRParam;
79  m = mParam;
80  lD = lDParam;
81  convolveWithNr = convolveWithNrParam;
82  }

Member Function Documentation

◆ initialize() [1/2]

void pappso::SavGolParams::initialize ( const SavGolParams other)
inline

Definition at line 96 of file savgolfilter.h.

97  {
98  nL = other.nL;
99  nR = other.nR;
100  m = other.m;
101  lD = other.lD;
102  convolveWithNr = other.convolveWithNr;
103  }

References convolveWithNr, lD, m, nL, and nR.

◆ initialize() [2/2]

void pappso::SavGolParams::initialize ( int  nLParam,
int  nRParam,
int  mParam,
int  lDParam,
bool  convolveWithNrParam 
)
inline

Definition at line 85 of file savgolfilter.h.

87  {
88  nL = nLParam;
89  nR = nRParam;
90  m = mParam;
91  lD = lDParam;
92  convolveWithNr = convolveWithNrParam;
93  }

Member Data Documentation

◆ convolveWithNr

bool pappso::SavGolParams::convolveWithNr = false

set to false for best results

Definition at line 60 of file savgolfilter.h.

Referenced by initialize().

◆ lD

int pappso::SavGolParams::lD = 0

specifies the order of the derivative to extract from the Savitzky-Golay smoothing algorithm (for regular smoothing, use 0)

Definition at line 57 of file savgolfilter.h.

Referenced by initialize().

◆ m

int pappso::SavGolParams::m = 4

order of the polynomial to use in the regression analysis leading to the Savitzky-Golay coefficients (typically between 2 and 6)

Definition at line 54 of file savgolfilter.h.

Referenced by initialize().

◆ nL

int pappso::SavGolParams::nL = 15

number of data points on the left of the filtered point

Definition at line 50 of file savgolfilter.h.

Referenced by SavGolParams(), and initialize().

◆ nR

int pappso::SavGolParams::nR = 15

number of data points on the right of the filtered point

Definition at line 52 of file savgolfilter.h.

Referenced by initialize().


The documentation for this struct was generated from the following file:
pappso::SavGolParams::m
int m
Definition: savgolfilter.h:54
pappso::SavGolParams::lD
int lD
Definition: savgolfilter.h:57
pappso::SavGolParams::nR
int nR
number of data points on the right of the filtered point
Definition: savgolfilter.h:52
pappso::SavGolParams::nL
int nL
number of data points on the left of the filtered point
Definition: savgolfilter.h:50
pappso::SavGolParams::convolveWithNr
bool convolveWithNr
set to false for best results
Definition: savgolfilter.h:60