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;
111 QStringList params_list = parameters.split(
";");
113 nL = params_list.at(0).toInt();
114 nR = params_list.at(1).toInt();
115 m = params_list.at(2).toInt();
116 lD = params_list.at(3).toInt();
117 convolveWithNr = (params_list.at(4) ==
"true" ? true :
false);
124 return QString(
"%1;%2;%3;%4;%5")
125 .arg(QString::number(nL))
126 .arg(QString::number(nR))
127 .arg(QString::number(m))
128 .arg(QString::number(lD))
129 .arg(convolveWithNr ?
"true" :
"false");
134class FilterSavitzkyGolay;
155 int nL,
int nR,
int m,
int lD,
bool convolveWithNr =
false);
175 Trace &filter(
Trace &data_points)
const override;
179 char runFilter(
double *y_data_p,
180 double *y_filtered_data_p,
181 int data_point_count)
const;
185 QString name()
const override;
189 QString toString()
const override;
192 void buildFilterFromString(
const QString &strBuildParams)
override;
212 int *ivector(
long nl,
long nh)
const;
214 pappso_double **dmatrix(
long nrl,
long nrh,
long ncl,
long nch)
const;
215 void free_ivector(
int *v,
long nl,
long nh)
const;
218 free_dmatrix(
pappso_double **m,
long nrl,
long nrh,
long ncl,
long nch)
const;
221 void four1(
pappso_double data[],
unsigned long nn,
int isign);
227 void realft(
pappso_double data[],
unsigned long n,
int isign);
234 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)
void initialize(const QString ¶meters)