OpenMS
EGHTraceFitter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, 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 $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 
13 namespace OpenMS
14 {
15 
28  class OPENMS_DLLAPI EGHTraceFitter :
29  public TraceFitter
30  {
31 public:
35  {
36 public:
37 
38  EGHTraceFunctor(int dimensions,
39  const TraceFitter::ModelData* data);
40 
41  ~EGHTraceFunctor() override;
42 
43  int operator()(const Eigen::VectorXd& x, Eigen::VectorXd& fvec) override;
44 
45  // compute Jacobian matrix for the different parameters
46  int df(const Eigen::VectorXd& x, Eigen::MatrixXd& J) override;
47 
48 protected:
50  };
51 
53 
55 
57 
58  ~EGHTraceFitter() override;
59 
60  // override important methods
62 
63  double getLowerRTBound() const override;
64 
65  double getTau() const;
66 
67  double getUpperRTBound() const override;
68 
69  double getHeight() const override;
70 
71  double getSigma() const;
72 
73  double getCenter() const override;
74 
75  bool checkMaximalRTSpan(const double max_rt_span) override;
76 
77  bool checkMinimalRTSpan(const std::pair<double, double>& rt_bounds, const double min_rt_span) override;
78 
79  double getValue(double rt) const override;
80 
81  double getArea() override;
82 
83  double getFWHM() const override;
84 
85  String getGnuplotFormula(const FeatureFinderAlgorithmPickedHelperStructs::MassTrace& trace, const char function_name, const double baseline, const double rt_shift) override;
86 
87 protected:
88  double apex_rt_;
89  double height_;
90 
91  double sigma_;
92  double tau_;
93 
94  std::pair<double, double> sigma_5_bound_;
95 
97 
99  static const double EPSILON_COEFS_[];
100 
101  static const Size NUM_PARAMS_;
102 
108  std::pair<double, double> getAlphaBoundaries_(const double alpha) const;
109 
110  void getOptimizedParameters_(const Eigen::VectorXd& x_init) override;
111 
113 
114  void updateMembers_() override;
115  };
116 
117 } // namespace OpenMS
118 
Definition: IsobaricIsotopeCorrector.h:17
Definition: EGHTraceFitter.h:35
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec) override
EGHTraceFunctor(int dimensions, const TraceFitter::ModelData *data)
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &J) override
const TraceFitter::ModelData * m_data
Definition: EGHTraceFitter.h:49
A RT Profile fitter using an Exponential Gaussian Hybrid background model.
Definition: EGHTraceFitter.h:30
double getLowerRTBound() const override
double getHeight() const override
std::pair< double, double > getAlphaBoundaries_(const double alpha) const
Return an ordered pair of the positions where the EGH reaches a height of alpha * height of the EGH.
bool checkMaximalRTSpan(const double max_rt_span) override
double tau_
Definition: EGHTraceFitter.h:92
double getTau() const
double getFWHM() const override
double getArea() override
double sigma_
Definition: EGHTraceFitter.h:91
void fit(FeatureFinderAlgorithmPickedHelperStructs::MassTraces &traces) override
double getUpperRTBound() const override
double getValue(double rt) const override
String getGnuplotFormula(const FeatureFinderAlgorithmPickedHelperStructs::MassTrace &trace, const char function_name, const double baseline, const double rt_shift) override
double getCenter() const override
std::pair< double, double > sigma_5_bound_
Definition: EGHTraceFitter.h:94
void getOptimizedParameters_(const Eigen::VectorXd &x_init) override
double height_
Definition: EGHTraceFitter.h:89
double getSigma() const
~EGHTraceFitter() override
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: EGHTraceFitter.h:101
double region_rt_span_
Definition: EGHTraceFitter.h:96
EGHTraceFitter(const EGHTraceFitter &other)
EGHTraceFitter & operator=(const EGHTraceFitter &source)
void setInitialParameters_(FeatureFinderAlgorithmPickedHelperStructs::MassTraces &traces)
bool checkMinimalRTSpan(const std::pair< double, double > &rt_bounds, const double min_rt_span) override
double apex_rt_
Definition: EGHTraceFitter.h:88
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:97
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
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