39 #include "../../trace/trace.h"
40 #include "../../exportinmportconfig.h"
61 bool convolveWithNr =
false;
71 convolveWithNr{other.convolveWithNr}
76 int nLParam,
int nRParam,
int mParam,
int lDParam,
bool convolveWithNrParam)
82 convolveWithNr = convolveWithNrParam;
87 int nLParam,
int nRParam,
int mParam,
int lDParam,
bool convolveWithNrParam)
93 convolveWithNr = convolveWithNrParam;
109 return QString(
"%1;%2;%3;%4;%5")
110 .arg(QString::number(nL))
111 .arg(QString::number(nR))
112 .arg(QString::number(m))
113 .arg(QString::number(lD))
114 .arg(convolveWithNr ?
"true" :
"false");
119 class FilterSavitzkyGolay;
139 int nL,
int nR,
int m,
int lD,
bool convolveWithNr =
false);
159 Trace &filter(
Trace &data_points)
const override;
163 char runFilter(
double *y_data_p,
164 double *y_filtered_data_p,
165 int data_point_count)
const;
169 QString name()
const override;
173 QString toString()
const override;
176 void buildFilterFromString(
const QString &strBuildParams)
override;
196 int *ivector(
long nl,
long nh)
const;
198 pappso_double **dmatrix(
long nrl,
long nrh,
long ncl,
long nch)
const;
199 void free_ivector(
int *v,
long nl,
long nh)
const;
202 free_dmatrix(
pappso_double **m,
long nrl,
long nrh,
long ncl,
long nch)
const;
205 void four1(
pappso_double data[],
unsigned long nn,
int isign);
211 void realft(
pappso_double data[],
unsigned long n,
int isign);
218 char sgcoeff(
pappso_double c[],
int np,
int nl,
int nr,
int ld,
int m)
const;
Interface that allows to build filter objects from strings.
uses Savitsky-Golay filter on trace
pappso_double * m_yr
C array of raw values of the Trace.
void filteredData(std::vector< pappso_double > &data)
pappso_double * m_x
C array of keys of the Trace.
pappso_double * m_yf
C array of filtered values after the computation has been performed.
A simple container of DataPoint instances.
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::shared_ptr< FilterSavitzkyGolay > FilterSavitzkyGolaySPtr
std::shared_ptr< const FilterSavitzkyGolay > FilterSavitzkyGolayCstSPtr
double pappso_double
A type definition for doubles.
Parameters for the Savitzky-Golay filter.
SavGolParams(int nLParam, int nRParam, int mParam, int lDParam, bool convolveWithNrParam)
SavGolParams(const SavGolParams &other)
void initialize(int nLParam, int nRParam, int mParam, int lDParam, bool convolveWithNrParam)
int nR
number of data points on the right of the filtered point
int nL
number of data points on the left of the filtered point
bool convolveWithNr
set to false for best results
void initialize(const SavGolParams &other)