OpenMS
GaussTraceFitter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg$
6 // $Authors: Stephan Aiche, Marc Sturm$
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 
13 namespace OpenMS
14 {
15 
23  class OPENMS_DLLAPI GaussTraceFitter :
24  public TraceFitter
25  {
26 public:
28 
30 
32 
33  ~GaussTraceFitter() override;
34 
35  // override important methods
37 
38  double getLowerRTBound() const override;
39 
40  double getUpperRTBound() const override;
41 
42  double getHeight() const override;
43 
44  double getCenter() const override;
45 
46  double getFWHM() const override;
47 
51  double getSigma() const;
52 
53  bool checkMaximalRTSpan(const double max_rt_span) override;
54 
55  bool checkMinimalRTSpan(const std::pair<double, double>& rt_bounds, const double min_rt_span) override;
56 
57  double getValue(double rt) const override;
58 
59  double getArea() override;
60 
61  String getGnuplotFormula(const FeatureFinderAlgorithmPickedHelperStructs::MassTrace& trace, const char function_name, const double baseline, const double rt_shift) override;
62 
63 protected:
64  double sigma_;
65  double x0_;
66  double height_;
68 
69  static const Size NUM_PARAMS_;
70 
71  void getOptimizedParameters_(const Eigen::VectorXd& s) override;
72 
75  {
76 public:
77  GaussTraceFunctor(int dimensions,
78  const TraceFitter::ModelData* data);
79 
80  int operator()(const Eigen::VectorXd& x, Eigen::VectorXd& fvec) override;
81 
82  // compute Jacobian matrix for the different parameters
83  int df(const Eigen::VectorXd& x, Eigen::MatrixXd& J) override;
84 protected:
86  };
87 
89 
90  void updateMembers_() override;
91 
92  };
93 
94 } // namespace OpenMS
95 
Definition: GaussTraceFitter.h:75
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec) override
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &J) override
GaussTraceFunctor(int dimensions, const TraceFitter::ModelData *data)
const TraceFitter::ModelData * m_data
Definition: GaussTraceFitter.h:85
Fitter for RT profiles using a Gaussian background model.
Definition: GaussTraceFitter.h:25
double getLowerRTBound() const override
double getHeight() const override
double x0_
Definition: GaussTraceFitter.h:65
bool checkMaximalRTSpan(const double max_rt_span) override
double getFWHM() const override
double getArea() override
double sigma_
Definition: GaussTraceFitter.h:64
void fit(FeatureFinderAlgorithmPickedHelperStructs::MassTraces &traces) override
double getUpperRTBound() const override
double getValue(double rt) const override
GaussTraceFitter(const GaussTraceFitter &other)
String getGnuplotFormula(const FeatureFinderAlgorithmPickedHelperStructs::MassTrace &trace, const char function_name, const double baseline, const double rt_shift) override
void getOptimizedParameters_(const Eigen::VectorXd &s) override
double getCenter() const override
GaussTraceFitter & operator=(const GaussTraceFitter &source)
double height_
Definition: GaussTraceFitter.h:66
double getSigma() const
Returns the sigma of the fitted gaussian model.
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
static const Size NUM_PARAMS_
Definition: GaussTraceFitter.h:69
double region_rt_span_
Definition: GaussTraceFitter.h:67
void setInitialParameters_(FeatureFinderAlgorithmPickedHelperStructs::MassTraces &traces)
bool checkMinimalRTSpan(const std::pair< double, double > &rt_bounds, const double min_rt_span) override
A more convenient string class.
Definition: String.h:34
Definition: TraceFitter.h:44
Abstract fitter for RT profile fitting.
Definition: TraceFitter.h:38
Definition: TraceFitter.h:149
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Definition: IsobaricIsotopeCorrector.h:17
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
Helper struct for mass traces used in FeatureFinderAlgorithmPicked.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:54
Helper struct for a collection of mass traces used in FeatureFinderAlgorithmPicked.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:85